- Subject: PCTel Driver fails to compile, found a fix for 2.6.38.8
- From: Antonio Olivares <olivares14031@xxxxxxxxx>
- Date: Tue, 14 Jun 2011 22:29:13 +0000
Dear folks, Robert & Marv,
I don't have a dialup connection anymore, but I try to maintain some
scripts that will generate a working driver formerly for slax and now
for porteus live cd. I had a build script that generated the module
(a working package that is inserted on the fly and modem would be
accessible and working). In the newer kernels, the driver was not
compiling.
root@porteus:~/Downloads/pctel-0.9.7-9-rht-11/src# cat make.log | more
CC vuart.o
LD binary.a
make -C /lib/modules/2.6.38.8-porteus/build
M=/root/Downloads/pctel-0.9.7-9-rht-11/src
make[1]: Entering directory `/usr/src/linux-2.6.38.8'
LD /root/Downloads/pctel-0.9.7-9-rht-11/src/built-in.o
CC [M] /root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.o
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c:89:8: warning:
type defaults to 'int' in decla
ration of 'DECLARE_MUTEX'
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c:89:1: warning:
parameter names (without types)
in function declaration
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c: In function
'linmodem_find_by_port':
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c:304:8: error:
'linmodem_sem' undeclared (first
use in this function)
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c:304:8: note:
each undeclared identifier is rep
orted only once for each function it appears in
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c: In function
'linmodem_find_by_line':
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c:327:8: error:
'linmodem_sem' undeclared (first
use in this function)
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c: At top level:
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c:1204:8:
warning: type defaults to 'int' in dec
laration of 'DECLARE_MUTEX'
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c:1204:1:
warning: parameter names (without type
s) in function declaration
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c: In function
'linmodem_register_port':
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c:1231:8: error:
'serial_sem' undeclared (first
use in this function)
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c: In function
'__unregister_port':
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c:1265:8: error:
'serial_sem' undeclared (first
use in this function)
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c: In function
'linmodem_exit':
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c:1325:8: error:
'linmodem_sem' undeclared (firs
t use in this function)
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c: In function
'linmodem_new':
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c:1349:8: error:
'linmodem_sem' undeclared (firs
t use in this function)
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c: In function
'linmodem_del':
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c:1396:8: error:
'linmodem_sem' undeclared (firs
t use in this function)
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c: At top level:
/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.c:1204:8:
warning: 'DECLARE_MUTEX' declared 'sta
tic' but never defined
make[2]: *** [/root/Downloads/pctel-0.9.7-9-rht-11/src/linmodem-2.6.o] Error 1
make[1]: *** [_module_/root/Downloads/pctel-0.9.7-9-rht-11/src] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.38.8'
make: *** [all] Error 2
However, by making some changes, the compilation goes through and the
driver is compiled:
Line 89 in original source
from
static DECLARE_MUTEX(linmodem_sem);
to
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
static DECLARE_MUTEX(linmodem_sem);
#else
static DEFINE_SEMAPHORE(linmodem_sem);
#endif
Line 1204 or so add:
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
static DECLARE_MUTEX(serial_sem);
#else
static DEFINE_SEMAPHORE(serial_sem);
#endif
I will try to write a script with sed that fixes this so I could patch
up a build script for porteus:
http://www.forum.porteus.org/viewtopic.php?f=39&t=37&sid=83038aa01e399928c2a6e5b99bb96eb8
I was looking for a fix and I saw the fix applied in this page:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=602367
Hope to fix it so that users that need a working module for porteus
are not left in the dark.
Regards,
Antonio
[Linux DVB]
[Asterisk]
[Photo]
[DCCP]
[Netdev]
[Xorg]
[Xfree86]
[Fedora Women]
[Linux USB]