Re: Patch for kernel version 2.6.24

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






3.17 wrote:
> 
> 
> grujakg wrote:
>> 
>> 
>>> martian: error: Common area unrecognized, no terminating signature
>> --------
>> 
>> If you are still getting this error message after modifying
>> the modem/mport.c file, the only explanation seems to be 
>> that the modification had an error (like martian instead of martiaN)
>> or something trivial, such as forgetting 'make clean'. 
>> 
>> However, I feel that the martian modem is completely OK,
>> but the real problem is that 2.6.24 doesn't want us 
>> to use (among many others) CPPFLAGS. It should still accept it and 
>> warn us when we use it but there seems to be a bug in that part of 
>> 2.6.24/build/Makefile. Probably it will be corrected, eventually,
>> 
>> So the simplest full patch list that should make martian modem functional
>> for 2.6.24 should be (starting from martian-full-20071011):
>> 
>> ---------------------
>> 
>> in kmodule/martian.c: replace
>> SA_INTERRUPT | SA_SHIRQ,
>> by 
>> IRQF_DISABLED | IRQF_SHARED,
>> 
>> and
>> in kmodule/Makefile replace 
>> CPPFLAGS += -DKMARTIAN_STAMP=20061202
>> by
>> KBUILD_CPPFLAGS += -DKMARTIAN_STAMP=20061202
>> 
>> ---------------------
>> 
>> Of course, with these patches it won't work with old kernels, 
>> so conditioning on kernel version (and perhaps using
>> #define KMARTIAN_STAMP in martian.h instead of in CPPFLAGS?)
>> would make sense. 
>> 
>> D
>> 
>> 
> 
> Well, result is the same. martian_dev eventually goes detached. I think
> that problem, as you have mentioned, lies in kernel.
> 
> I'm sorry for just vaining around. Don't have much free time, if it is
> excuse at all.
> 
> Thanks
> 
> 

Well, at the end I must report success :)

After removing tainted source by my failed interventions, I've again untared
latest martian bundle, done patching of kmodule/Makefile and
kmodule/martian.c with:

--- kmodule/Makefile    2008-04-05 19:30:34.000000000 +0200
+++ /home/grujakg/tmp/Makefile.orig  2006-12-03 00:39:24.000000000 +0100
@@ -2,7 +2,7 @@
 KBUILD_DIR = /lib/modules/$(KRELEASE)/build
 MSRC_DIR = $(shell pwd)
 
-EXTRA_CFLAGS += -DKMARTIAN_STAMP=20061202
+EXTRA_CPPFLAGS += -DKMARTIAN_STAMP=20061202
 CPPFLAGS += -DKMARTIAN_STAMP=20061202
 
 # kbuild

===========

--- kmodule/martian.c   2008-04-05 21:08:32.000000000 +0200
+++ /home/grujakg/tmp/martian.c.orig 2007-10-11 11:06:30.000000000 +0200
@@ -50,9 +50,9 @@
 #include <linux/poll.h>                /*** POLLIN .. */
 #include <linux/interrupt.h>
 
-//#ifdef CONFIG_COMPAT
-//#  include <linux/ioctl32.h>
-//#endif
+#ifdef CONFIG_COMPAT
+#  include <linux/ioctl32.h>
+#endif
 
 #if defined (CONFIG_SMP) && (defined (__i386__) || defined (__x86_64__))
 #  include <linux/delay.h>
@@ -657,8 +657,7 @@
        ret = request_irq(
                metrics->irq, 
                martian_isr,  
-//             SA_INTERRUPT | SA_SHIRQ, 
-               IRQF_DISABLED | IRQF_SHARED,
+               SA_INTERRUPT | SA_SHIRQ, 
                "164x", 
                mdev
        );

===========

take some worrying time about
warning: passing argument 2 of ‘request_irq’ from incompatible pointer type

taking look at include/linux/interrupt.h and
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.24.y.git;a=blob;f=kernel/irq/manage.c;h=203a518b6f1437d134c115ce7d43e1e04e1d5c25;hb=0e81c666dbf95546b3d9ea6ff7d29ea19b988950

and after concluding nothing relevant, took a shot, and viola, it works.

Apr  6 00:49:57 galatea kernel: martian loaded - 20061202
Apr  6 00:49:57 galatea kernel: ACPI: PCI Interrupt 0000:02:0a.0[A] -> Link
[APC3] -> GSI 18 (level, low) -> IRQ 18
Apr  6 00:49:57 galatea kernel: "martian_dev": added device 11c1:440
BaseAddress = 0xa400, CommAddres = 0xa000, irq = 18
Apr  6 00:51:11 galatea kernel: "martian_dev": serving irqs in module
Apr  6 00:51:11 galatea kernel: "martian_dev": martian_modem is attached.
Apr  6 00:51:11 galatea martian: info: Your port is /dev/ttySM0

Thanks to all of you good people for helping me.

-- 
View this message in context: http://www.nabble.com/Patch-for-kernel-version-2.6.24-tp15101327p16519280.html
Sent from the Linux Winmodem Support - Discussion mailing list archive at Nabble.com.



[Index of Archives]     [Linux Media Development]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Fedora Women]     [Linux USB]

  Powered by Linux