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);