Intel536ep drajveri za 2.6.10 ili novije kernele

Lol, evo uz poprilično googlanja natjerao sam Intel536 modem da proradi i na novijem kernelu od 2.6.9

Kernel 2.6.11.9
ck patchevi ( http://members.optusnet.com.au/ckolivas/kernel/ )
Intel 536 drajveri, verzija 4.69.1

Ovo bi trebalo raditi na bilo kojem kernelu >= 2.6.10
(stariji već rade sa “normalnim” drajverima)

Pratite generalna uputstva sa http://start.linux.org.ba/I536ep
Patch primjenjujete iz raspakovanog direktorija sa drajverom:

$ cd intel-536EP-2.56.76.1
$ patch -p1 < ../intel536ep.diff

intel536ep.diff

diff -ur intel-536EP-2.56.76.1-orig/coredrv/coredrv.c intel-536EP-2.56.76.1/coredrv/coredrv.c
--- intel-536EP-2.56.76.1-orig/coredrv/coredrv.c	2005-05-13 11:12:40.000000000 +0200
+++ intel-536EP-2.56.76.1/coredrv/coredrv.c	2005-05-13 12:09:59.000000000 +0200
@@ -292,7 +292,7 @@
         case PM_RESUME:
 			open();
             break;
-//      case PM_SAVE_STATE:
+//      case PM_SUSPEND_MEM:
 //          printk(KERN_WARNING"Saving power state is not implementedn");
 //          break;
         default:
@@ -858,7 +858,7 @@
 asmlinkage void kScheduleDPC(void)
 {
 #ifdef CONFIG_PM
-    pm_access(power_dev);
+    //pm_access(power_dev);
 #endif
    #if defined(TARGET_CATAWBA)
       dpc_function( 0 );
diff -ur intel-536EP-2.56.76.1-orig/coredrv/softserial.h intel-536EP-2.56.76.1/coredrv/softserial.h
--- intel-536EP-2.56.76.1-orig/coredrv/softserial.h	2005-05-13 11:12:40.000000000 +0200
+++ intel-536EP-2.56.76.1/coredrv/softserial.h	2005-05-13 12:09:59.000000000 +0200
@@ -86,7 +86,7 @@
 int  softserial_open           (struct tty_struct*, struct file*);
 void softserial_put_char       (struct tty_struct*, unsigned char);
 void softserial_set_termios    (struct tty_struct*, struct termios*);
-int  softserial_write          (struct tty_struct*, int, const unsigned char*, int);
+int  softserial_write          (struct tty_struct*, const unsigned char*, int);
 int  softserial_ioctl          (struct tty_struct*, struct file*, unsigned int, unsigned long);
 
 
diff -ur intel-536EP-2.56.76.1-orig/coredrv/softserial_io.c intel-536EP-2.56.76.1/coredrv/softserial_io.c
--- intel-536EP-2.56.76.1-orig/coredrv/softserial_io.c	2005-05-13 11:12:40.000000000 +0200
+++ intel-536EP-2.56.76.1/coredrv/softserial_io.c	2005-05-13 12:09:59.000000000 +0200
@@ -55,7 +55,6 @@
 //=============================================================================
 static DECLARE_MUTEX(softserial_write_sem);
 int softserial_write(struct tty_struct* ptty,
-                      int from_user_space,
                       const unsigned char* input_buffer,
                       int write_count_asked)  //why is it a signed int?
 {
@@ -73,60 +72,25 @@
    //printk("softserial:softserial_write()n");
    //printk("write: fus%d, count%dn",from_user_space, write_count_asked);
    
-   if(from_user_space)
+   while(write_count_asked - written_count > 0)
    {
-      down(&softserial_write_sem); //this may not be enough
-      while(write_count_asked - written_count > 0)
+      softcore_space = G.softcore.write_free();
+      if(softcore_space == 0) break;  //try again?  potential infinite loop?
+      
+	  if(write_count_asked > softcore_space)
       {
-         softcore_space = G.softcore.write_free();
-         if(softcore_space == 0) break;  //try again?  potential infinite loop?
-         //printk("space free %dn",softcore_space);
-	 
-         if(write_count_asked > softcore_space)
-         {
-            copy_size = softcore_space;
-         }
-         else
-         {
-            copy_size = write_count_asked;
-         }
-
-         copy_from_user(G.softcore.tx_fifo, input_buffer_ptr, copy_size);
-         //printk("tx_fifo[0]=%c copysize=%d",*(G.softcore.tx_fifo),copy_size);
-	// if(copy_size <= 0)
-        // {
-        //    return(-EFAULT);
-        // }
-	
-
-         G.softcore.write(copy_size);
-
-         input_buffer_ptr += copy_size;
-         written_count += copy_size;
+         copy_size = softcore_space;
       }
-      up(&softserial_write_sem);
-   }
-   else           //data is from kernel space
-   {
-      while(write_count_asked - written_count > 0)
+      else
       {
-         softcore_space = G.softcore.write_free();
-         if(softcore_space == 0) break;  //try again?  potential infinite loop?
-         if(write_count_asked > softcore_space)
-         {
-            copy_size = softcore_space;
-         }
-         else
-         {
-            copy_size = write_count_asked;
-         }
+         copy_size = write_count_asked;
+      }
 
-         memcpy(G.softcore.tx_fifo, input_buffer_ptr, copy_size);
-         G.softcore.write(copy_size);
+      memcpy(G.softcore.tx_fifo, input_buffer_ptr, copy_size);
+      G.softcore.write(copy_size);
 
-         input_buffer_ptr += copy_size;
-         written_count += copy_size;
-      }
+      input_buffer_ptr += copy_size;
+      written_count += copy_size;
    }
 
    return(written_count);

nice work :smiley:

stavi ga na start.linux.org.ba ako ti nije sta :slight_smile:

[quote]Lol, evo uz poprilično googlanja natjerao sam Intel536 modem da proradi i na novijem kernelu od 2.6.9

Kernel 2.6.11.9
ck patchevi ( http://members.optusnet.com.au/ckolivas/kernel/ )
Intel 536 drajveri, verzija 4.69.1

Ovo bi trebalo raditi na bilo kojem kernelu >= 2.6.10
(stariji već rade sa “normalnim” drajverima)[/quote]

ima li ikakve šanse da proradi sa onim driverima koji dodju na suse 9.3 cd-ovima, mislim ja sam ih instalirao i probao preko kinterneta i bilo mi je exit code 2

drugo, kompajlirao sam patchovane drivere i konektovao sam se ali samo oko minut-dva, tada prestane prenos podataka…

jednom si mi govorio da bi mu možda trebao promijeniti period slanja na manje vrijeme ali neznam gdje da to naštimam, jer on izgleda ako nakon nekog vremena ne primi nista od ISP-a ulijeni se i nece vise da trazi odgovor…

Datoteka /etc/ppp/options

Povećati nešto od ovo dvoje:
lcp-echo-interval 30
lcp-echo-failure 4

(30 sec * 4 = 120 sec)

(SuSE inače ima problema sa dial-upom; mutantski kerneli i stvarno duga priča …)

[quote]Lol, evo uz poprilično googlanja natjerao sam Intel536 modem da proradi i na novijem kernelu od 2.6.9

Kernel 2.6.11.9
ck patchevi ( http://members.optusnet.com.au/ckolivas/kernel/ )
Intel 536 drajveri, verzija 4.69.1

Ovo bi trebalo raditi na bilo kojem kernelu >= 2.6.10
(stariji već rade sa “normalnim” drajverima)

Pratite generalna uputstva sa http://start.linux.org.ba/I536ep
Patch primjenjujete iz raspakovanog direktorija sa drajverom:

$ cd intel-536EP-2.56.76.1
$ patch -p1 < ../intel536ep.diff

[/quote]
dok nisam ovo uradio (vidio sam negdje na ubuntu stranici):

patch -l  -p1 < ../intel536ep.diff

uvijek sam dobijao error:

linux:/home/aldin/intel-536EP-2.56.76.1 # make install rm -f /etc/hamregistry.bin bash Intel536_inst running kernel 2.6.11.4-20a-default installing hamregistry, used for persistant storage installing Intel536 driver SuSE version 9.3 SuSE boot scripts starting module and utilities error loading Intel536 ERROR: Module Intel536 does not exist in /proc/modules done

Vjerovatno imaš problema sa “white space” znakovima kad kopiraš iz web browsera. Postaviću negdje diff datoteku, a ako kome hitno treba uvijek me može kontaktirati na email.

vidi ovo (pazi na komandu&rezultat):

linux:/home/aldin/intel-536EP-2.56.76.1 # patch -p1 < ../intel536ep.diff patching file coredrv/coredrv.c Hunk #1 FAILED at 292. Hunk #2 FAILED at 858. 2 out of 2 hunks FAILED -- saving rejects to file coredrv/coredrv.c.rej patching file coredrv/softserial.h Hunk #1 FAILED at 86. 1 out of 1 hunk FAILED -- saving rejects to file coredrv/softserial.h.rej patching file coredrv/softserial_io.c Hunk #1 FAILED at 55. Hunk #2 FAILED at 72. 2 out of 2 hunks FAILED -- saving rejects to file coredrv/softserial_io.c.rej

linux:/home/aldin/intel-536EP-2.56.76.1 # patch -l -p1 < ../intel536ep.diff patching file coredrv/coredrv.c patching file coredrv/softserial.h patching file coredrv/softserial_io.c

u ovom drugom slučaju sam stavio “-l” i nisam imao “hunkova”.

Pa dobro, to je i za očekivati :slight_smile:

btw, da ne koristiš slučajno kwrite (ili neki drugi editor koji ti pretvara space -> tab, ili obrnuto)

kwrite ne pretvara space u tab (osim ako tako odrediš)[/b]

[quote]Pa dobro, to je i za očekivati :slight_smile:

btw, da ne koristiš slučajno kwrite (ili neki drugi editor koji ti pretvara space -> tab, ili obrnuto)[/quote]

moze biti jer sam prije ovog “posla” bio postavio na “convert tabs to spaces” na kwrite… jer mi treba kada exportujem u html da mi bude kao na originalu kojeg kucam u kwrite, pa valjda je to to…

Hi. I have a problem with this patch. When I try to patch drivers i get such screen :

Debian:/tmp/3/intel-536EP-2.56.76.1# patch -p1 < ../intel536ep.diff patching file coredrv/coredrv.c Hunk #1 succeeded at 292 with fuzz 2. patching file coredrv/softserial.h patching file coredrv/softserial_io.c Hunk #2 FAILED at 72. 1 out of 2 hunks FAILED -- saving rejects to file coredrv/softserial_io.c.rej

Please send me (brovko_anton@tut.by) this patch, which really works or (it will be better) send me plz patched files. Thanks. I am really need in theese drivers.

try this command with “-l”