Patch for mxser.c driver
Subsystems (2)
Hi,
mxser driver in kernel 2.6.16 can compile but it does not drive the serial multiport adapter from Moxa.
According to Moxa documentation for version 1.8, msmknod script, downloaded from their support site, creates ttyM0-7 and cum0-7 tty devices with major numbers 30 and 35 by defaults.
However, in mxser.c major device numbers are still 174 and 175.
Here is a patch to change major tty device numbers to proper default values.
drivers/char/mxser.c 2006-04-11 22:36:49.000000000 +0200 renamed from drivers/char/mxser.c.old 2006-04-11 22:35:16.000000000 +0200 +2 -2
@@ -68,8 +68,8 @@ #include "mxser.h" #define MXSER_VERSION "1.8" -#define MXSERMAJOR 174 -#define MXSERCUMAJOR 175 +#define MXSERMAJOR 30 +#define MXSERCUMAJOR 35 #define MXSER_EVENT_TXLOW 1 #define MXSER_EVENT_HANGUP 2
BTW, driver source that can be downloaded from Moxa support site will not compile :
make -C /lib/modules/2.6.16/build SUBDIRS=/temp/mxser1.8/driver modules
make[1]: Entering directory `/usr/src/linux-2.6.16'
CC [M] /temp/mxser1.8/driver/mxser.o
/temp/mxser1.8/driver/mxser.c:722: warning: initialization from incompatible pointer type /temp/mxser1.8/driver/mxser.c: In function 'mxser_init':
/temp/mxser1.8/driver/mxser.c:1035: warning: assignment from incompatible pointer type /temp/mxser1.8/driver/mxser.c: In function 'mxser_ioctl':
/temp/mxser1.8/driver/mxser.c:1685: warning: implicit declaration of function 'verify_area' /temp/mxser1.8/driver/mxser.c: In function 'mxser_receive_chars':
/temp/mxser1.8/driver/mxser.c:2631: error: 'struct tty_ldisc' has no member named 'receive_room' /temp/mxser1.8/driver/mxser.c:2638: error: 'struct tty_struct' has no member named 'flip' /temp/mxser1.8/driver/mxser.c:2639: error: 'struct tty_struct' has no member named 'flip' /temp/mxser1.8/driver/mxser.c:2783: error: 'struct tty_struct' has no member named 'flip' /temp/mxser1.8/driver/mxser.c:2783: error: 'struct tty_struct' has no member named 'flip' make[2]: *** [/temp/mxser1.8/driver/mxser.o] Erreur 1
make[1]: *** [_module_/temp/mxser1.8/driver] Erreur 2
make[1]: Leaving directory `/usr/src/linux-2.6.16'
make: *** [module] Erreur 2
If any comments please Cc: to me.
Regards from,
Bernard Pidoux, f6bvp
http://f6bvp.org
http://rose.fpac.free.fr/MINI-HOWTO/
http://rose.fpac.free.fr/MINI-HOWTO-FR/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bernard Pidoux napsal(a):
Quoted 18 lines
Hi,
mxser driver in kernel 2.6.16 can compile but it does not drive the serial multiport adapter from Moxa.
According to Moxa documentation for version 1.8, msmknod script, downloaded from their support site, creates ttyM0-7 and cum0-7 tty devices with major numbers 30 and 35 by defaults.
However, in
mxser.cmajor device numbers are still 174 and 175.Here is a patch to change major tty device numbers to proper default values.
drivers/char/mxser.c 2006-04-11 22:36:49.000000000 +0200 line 72
Quoted 5 lines
drivers/char/mxser.c 2006-04-11 22:36:49.000000000 +0200 renamed from drivers/char/mxser.c.old 2006-04-11 22:35:16.000000000 +0200 +0
-2@@ -68,8 +68,8 @@ #include "mxser.h" #define MXSER_VERSION "1.8" -#define MXSERMAJOR 174 -#define MXSERCUMAJOR 175
Strange:
172 char Moxa Intellio serial card 173 char Moxa Intellio serial card - alternate devices 174 char SmartIO serial card 175 char SmartIO serial card - alternate devices
drivers/char/mxser.c 2006-04-11 22:36:49.000000000 +0200 line 72
Quoted 2 lines
drivers/char/mxser.c 2006-04-11 22:36:49.000000000 +0200 renamed from drivers/char/mxser.c.old 2006-04-11 22:35:16.000000000 +0200 +2
-0+#define MXSERMAJOR 30 +#define MXSERCUMAJOR 35
They are not free:
30 char iBCS-2 compatibility devices
35 char tclmidi MIDI driver
Quoted 7 lines
drivers/char/mxser.c 2006-04-11 22:36:49.000000000 +0200 renamed from drivers/char/mxser.c.old 2006-04-11 22:35:16.000000000 +0200 +0
-0#define MXSER_EVENT_TXLOW 1 #define MXSER_EVENT_HANGUP 2BTW, driver source that can be downloaded from Moxa support site will not compile :
old tty API
see Documentation/devices.txt
regards,
- --
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~ [email protected] ~\-/~
B67499670407CE62ACC8 22A032CC55C339D47A7E -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFEPCv0MsxVwznUen4RAjgzAJ48FiKNDUCDE2Aru39U3HceOI+v2QCeL09m qR35e/cdR+Cjgz7SpZjmaeQ=
=ZT4r
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bernard Pidoux napsal(a):
Quoted 8 lines
Hi,
mxser driver in kernel 2.6.16 can compile but it does not drive the serial multiport adapter from Moxa.
According to Moxa documentation for version 1.8, msmknod script, downloaded from their support site, creates ttyM0-7 and cum0-7 tty devices with major numbers 30 and 35 by defaults.
Anyway, it should be /proc/devices dependent.
regards,
- --
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~ [email protected] ~\-/~
B67499670407CE62ACC8 22A032CC55C339D47A7E -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFEPCynMsxVwznUen4RAgUVAKDCCrpJ+Gc6C08k1PmwB/k1aELs/ACfUIA9 RxAwuNyDP0mrPLbx2bn9OFk=
=VGac
-----END PGP SIGNATURE-----
Alan Cox
NAKQuoted 5 lines · Jiri Slaby
Quoted 5 lines
However, in
mxser.cmajor device numbers are still 174 and 175.Here is a patch to change major tty device numbers to proper default values.
NAK
mxser.c is not the Moxa intellio card support, it is SmartIO/IndustIO support. The IntellIO is different and no longer supported in 2.6
Hi,
The multiport serial adapter I wanted to use is a four ports C104H/PCI SmartIO.
I just received from Moxa support a beta version of the driver (mxser_1.9.1.tgz).
Acording to readme.txt file
The Smartio/Industio/UPCI family Linux driver supports following
multiport
boards.
- 2 ports multiport board
CP-102U, CP-102UL
CP-132U-I, CP-132UL,
CP-132, CP-132I, CP132S, CP-132IS,
CI-132, CI-132I, CI-132IS,
(C102H, C102HI, C102HIS, C102P, CP-102, CP-102S)
- 4 ports multiport board
CP-104EL,
CP-104UL, CP-104JU,
CP-134U, CP-134U-I
C104H/PCI, C104HS/PCI,
CP-114, CP-114I, CP-114S, CP-114IS,
C104H, C104HS,
CI-104J, CI-104JS
CI-134, CI-134I, CI-134IS,
(C114HI, CT-114I, C104P)
- 8 ports multiport board
CP-118EL, CP-168EL,
CP-118U, CP-168U,
C168H/PCI,
C168H, C168HS,
(C168P)I did not have any problem to compile this beta version of driver 1.9 and utilities under kernel 2.6.16 with gcc 4.0.3
73 de Bernard, f6bvp
http://f6bvp.org
http://rose.fpac.free.fr/MINI-HOWTO/
http://rose.fpac.free.fr/MINI-HOWTO-FR/
Bernard Pidoux napsal(a):
Quoted 7 lines
Hi,
The multiport serial adapter I wanted to use is a four ports C104H/PCI SmartIO.
I just received from Moxa support a beta version of the driver (mxser_1.9.1.tgz).
Could you send me a copy, or publish on the Net?
Quoted 32 lines
Acording to readme.txt file
The Smartio/Industio/UPCI family Linux driver supports following
multiport
boards.- 2 ports multiport board CP-102U, CP-102UL CP-132U-I, CP-132UL, CP-132, CP-132I, CP132S, CP-132IS, CI-132, CI-132I, CI-132IS, (C102H, C102HI, C102HIS, C102P, CP-102, CP-102S) - 4 ports multiport board CP-104EL, CP-104UL, CP-104JU, CP-134U, CP-134U-I C104H/PCI, C104HS/PCI, CP-114, CP-114I, CP-114S, CP-114IS, C104H, C104HS, CI-104J, CI-104JS CI-134, CI-134I, CI-134IS, (C114HI, CT-114I, C104P) - 8 ports multiport board CP-118EL, CP-168EL, CP-118U, CP-168U, C168H/PCI, C168H, C168HS, (C168P)
Quoted 2 lines
I did not have any problem to compile this beta version of driver 1.9 and utilities under kernel 2.6.16 with gcc 4.0.3
thanks,
Signature · 3 lines
Jiri Slaby www.fi.muni.cz/~xslaby \_.-^-._ [email protected] _.-^-._/ B67499670407CE62ACC8 22A032CC55C339D47A7E
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bernard Pidoux napsal(a):
Quoted 39 lines
Hi,
The multiport serial adapter I wanted to use is a four ports C104H/PCI SmartIO.
I just received from Moxa support a beta version of the driver (mxser_1.9.1.tgz).
Acording to readme.txt file
The Smartio/Industio/UPCI family Linux driver supports following
multiport
boards.- 2 ports multiport board CP-102U, CP-102UL CP-132U-I, CP-132UL, CP-132, CP-132I, CP132S, CP-132IS, CI-132, CI-132I, CI-132IS, (C102H, C102HI, C102HIS, C102P, CP-102, CP-102S) - 4 ports multiport board CP-104EL, CP-104UL, CP-104JU, CP-134U, CP-134U-I C104H/PCI, C104HS/PCI, CP-114, CP-114I, CP-114S, CP-114IS, C104H, C104HS, CI-104J, CI-104JS CI-134, CI-134I, CI-134IS, (C114HI, CT-114I, C104P) - 8 ports multiport board CP-118EL, CP-168EL, CP-118U, CP-168U, C168H/PCI, C168H, C168HS, (C168P)
Quoted 2 lines
I did not have any problem to compile this beta version of driver 1.9 and utilities under kernel 2.6.16 with gcc 4.0.3
Thanks for sources. The problem is, they still use deprecated api, they still pci_find_device, despite I applied them to correct it and they promise to at least try their best, unfortunately with no effect :(. I guess, if they don't convert it to pci probing, the driver won't be altered (delete 'if LINUXVERSION' and so on) to be re-merged as a new version.
The driver needs to be rewritten as a whole (macros, whitespace, probing, maybe it missed some new tty api changes and so on). Maybe I get into that on summer holidays or somebody may do so earlier, but merging driver in present state is maybe unwanted.
regards,
- --
Jiri Slaby www.fi.muni.cz/~xslaby
\_.-^-._ [email protected] _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFETRrRMsxVwznUen4RAvxBAJwIhDvzgs0zGJfkfUp8U2bOU3N3kwCeNk3Z e5f+9FVPKtVd+JbmVuMDeGg=
=niri
-----END PGP SIGNATURE-----
Quoted 5 lines · Jiri Slaby
Thanks for sources. The problem is, they still use deprecated api, they still
pci_find_device, despite I applied them to correct it and they promise to at least try their best, unfortunately with no effect :(. I guess, if they don't convert it to pci probing, the driver won't be altered (delete 'if LINUXVERSION' and so on) to be re-merged as a new version.
Far better would be to diff their old driver and their new driver then import the changes into the Linux driver proper.
I've got their December 2004 driver (the one we originally worked from) as an archive here if someone wants to do the work. Some of their later changes did get imported but not all.