All of lore.kernel.org
 help / color / mirror / Atom feed
* [kernel 2.6] Patch for mxser.c driver
@ 2006-04-11 21:20 Bernard Pidoux
  2006-04-11 22:21 ` Jiri Slaby
  2006-04-11 22:24 ` Jiri Slaby
  0 siblings, 2 replies; 8+ messages in thread
From: Bernard Pidoux @ 2006-04-11 21:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: Bernard Pidoux

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.


--- linux/drivers/char/mxser.c.old 2006-04-11 22:35:16.000000000 +0200
+++ linux/drivers/char/mxser.c     2006-04-11 22:36:49.000000000 +0200
@@ -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/


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [kernel 2.6] Patch for mxser.c driver
  2006-04-11 21:20 [kernel 2.6] Patch for mxser.c driver Bernard Pidoux
@ 2006-04-11 22:21 ` Jiri Slaby
  2006-04-12  9:36   ` Alan Cox
  2006-04-11 22:24 ` Jiri Slaby
  1 sibling, 1 reply; 8+ messages in thread
From: Jiri Slaby @ 2006-04-11 22:21 UTC (permalink / raw)
  To: Bernard Pidoux; +Cc: linux-kernel, Bernard Pidoux

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bernard Pidoux napsal(a):
> 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.
> 
> 
> --- linux/drivers/char/mxser.c.old 2006-04-11 22:35:16.000000000 +0200
> +++ linux/drivers/char/mxser.c     2006-04-11 22:36:49.000000000 +0200
> @@ -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
> +#define        MXSERMAJOR       30
> +#define        MXSERCUMAJOR     35
They are not free:
 30 char        iBCS-2 compatibility devices
 35 char        tclmidi MIDI driver
> 
>  #define        MXSER_EVENT_TXLOW        1
>  #define        MXSER_EVENT_HANGUP       2
> 
> 
> BTW, 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
~\-/~      jirislaby@gmail.com      ~\-/~
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-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [kernel 2.6] Patch for mxser.c driver
  2006-04-11 21:20 [kernel 2.6] Patch for mxser.c driver Bernard Pidoux
  2006-04-11 22:21 ` Jiri Slaby
@ 2006-04-11 22:24 ` Jiri Slaby
  1 sibling, 0 replies; 8+ messages in thread
From: Jiri Slaby @ 2006-04-11 22:24 UTC (permalink / raw)
  To: Bernard Pidoux; +Cc: linux-kernel, Bernard Pidoux

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bernard Pidoux napsal(a):
> 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
~\-/~      jirislaby@gmail.com      ~\-/~
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-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [kernel 2.6] Patch for mxser.c driver
  2006-04-11 22:21 ` Jiri Slaby
@ 2006-04-12  9:36   ` Alan Cox
  2006-04-24  8:50     ` Bernard Pidoux
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2006-04-12  9:36 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: Bernard Pidoux, linux-kernel, Bernard Pidoux

On Mer, 2006-04-12 at 00:21 +0200, Jiri Slaby wrote:
> > 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.
> > 

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [kernel 2.6] Patch for mxser.c driver
  2006-04-12  9:36   ` Alan Cox
@ 2006-04-24  8:50     ` Bernard Pidoux
  2006-04-24 10:52       ` Jiri Slaby
  2006-04-24 18:37       ` Jiri Slaby
  0 siblings, 2 replies; 8+ messages in thread
From: Bernard Pidoux @ 2006-04-24  8:50 UTC (permalink / raw)
  To: Alan Cox; +Cc: Jiri Slaby, Bernard Pidoux, linux-kernel

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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [kernel 2.6] Patch for mxser.c driver
  2006-04-24  8:50     ` Bernard Pidoux
@ 2006-04-24 10:52       ` Jiri Slaby
  2006-04-24 18:37       ` Jiri Slaby
  1 sibling, 0 replies; 8+ messages in thread
From: Jiri Slaby @ 2006-04-24 10:52 UTC (permalink / raw)
  To: Bernard Pidoux; +Cc: Alan Cox, Bernard Pidoux, linux-kernel

Bernard Pidoux napsal(a):
> 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?
> 
> 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

thanks,
-- 
Jiri Slaby         www.fi.muni.cz/~xslaby
\_.-^-._   jirislaby@gmail.com   _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [kernel 2.6] Patch for mxser.c driver
  2006-04-24  8:50     ` Bernard Pidoux
  2006-04-24 10:52       ` Jiri Slaby
@ 2006-04-24 18:37       ` Jiri Slaby
  2006-04-24 20:16         ` Alan Cox
  1 sibling, 1 reply; 8+ messages in thread
From: Jiri Slaby @ 2006-04-24 18:37 UTC (permalink / raw)
  To: Bernard Pidoux; +Cc: Alan Cox, Bernard Pidoux, linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bernard Pidoux napsal(a):
> 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
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
\_.-^-._   jirislaby@gmail.com   _.-^-._/
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-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [kernel 2.6] Patch for mxser.c driver
  2006-04-24 18:37       ` Jiri Slaby
@ 2006-04-24 20:16         ` Alan Cox
  0 siblings, 0 replies; 8+ messages in thread
From: Alan Cox @ 2006-04-24 20:16 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: Bernard Pidoux, Bernard Pidoux, linux-kernel

On Llu, 2006-04-24 at 20:36 +0159, Jiri Slaby wrote:
> 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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-04-24 20:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-11 21:20 [kernel 2.6] Patch for mxser.c driver Bernard Pidoux
2006-04-11 22:21 ` Jiri Slaby
2006-04-12  9:36   ` Alan Cox
2006-04-24  8:50     ` Bernard Pidoux
2006-04-24 10:52       ` Jiri Slaby
2006-04-24 18:37       ` Jiri Slaby
2006-04-24 20:16         ` Alan Cox
2006-04-11 22:24 ` Jiri Slaby

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.