Re: [PATCH] drivers/char/moxa.c, kernel 2.6.23.14

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jiri Slaby <jirislaby@...>
Cc: <linux-kernel@...>
Date: Tuesday, January 22, 2008 - 6:23 am

On Mon, 21 Jan 2008, Jiri Slaby wrote:

=2E

:-)

=20

Well, yes, it's ugly, but anything else breaks moxaload ...

t,=20

Yes, I could do that.

I can see your point about the non-portability of it, but
how about this scenario, to provide backwards compatibility:

* We keep the (ugly and non-compatible) MOXA_GET_CONF
   ioctl, to avoid breaking the old moxaload.
   Let's rename it to MOXA_GET_CONF_OLD or MOXA_GET_CONF_BAD in the driver.
* Create a new MOXA_GET_CONF ioctl (with a new
   number, of course), that does it "the right way".
   If you don't like renaming ioctl's, we need a new name for this one.
* Rewrite moxaload to either do a kernel version check
   and use the new ioctl if available or the old if not.
   Or skip that and let it call the new ioctl first.
   If it succeeds (system running a newer kernel): fine, and
   if not (system running an older kernel), use the old ioctl.

The MOXA Intellio driver and moxaload have been "broken" ever since they
were written in 1999, and this way, we don't break anything - you can
use old or new kernel, and old or new moxaload in any combination.

Whaddaya think ?


Oops, you're right, I don't have any ISA cards,
so I totally forgot about those dinosaurs :-)
The necessary code is available in the old
version of moxa.c, so it's easily fixed.

I guess ISA isn't _quite_ dead yet, although I don't think I have a
single system with ISA cards (or even ISA slots) in it anymore ...


=D8yvind.

**************************************************************************
* =D8yvind Aabling     E-mail : Oyvind.Aabling@uni-c.dk    /~\ The ASCII   =
*
* UNI-C Lyngby       Phone  : +45 35 87 88 89            \ / Ribbon      *
* DTU Building 304   Phone  : +45 35 87 89 51 (direct)    X  Campaign    *
* DK-2800 LYNGBY     Fax    : +45 35 87 89 90            / \ Against     *
* Denmark                                                    HTML Email! *
**************************************************************************
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] drivers/char/moxa.c, kernel 2.6.23.14, Jiri Slaby, (Mon Jan 21, 6:51 pm)
Re: [PATCH] drivers/char/moxa.c, kernel 2.6.23.14, Oyvind Aabling, (Tue Jan 22, 6:23 am)
[RFC 5/5] Char: moxa, add firmware loading, Jiri Slaby, (Thu Jan 24, 5:32 am)
[RFC 6/6] Char: moxa, timer cleanup, Jiri Slaby, (Sun Jan 27, 3:16 pm)
[RFC 5/6] Char: moxa, centralize board readiness, Jiri Slaby, (Sun Jan 27, 3:16 pm)
[RFC 4/6] Char: moxa, remove unused port entries, Jiri Slaby, (Sun Jan 27, 3:16 pm)
[RFC 3/6] Char: moxa, remove port-&gt;port, Jiri Slaby, (Sun Jan 27, 3:16 pm)
[RFC 1/6] Char: moxa, add firmware loading, Jiri Slaby, (Sun Jan 27, 3:16 pm)
[RFC 4/5] Char: moxa, fix TIOC(G/S)SOFTCAR param, Jiri Slaby, (Thu Jan 24, 5:32 am)
[RFC 3/5] Char: moxa, pci io space fixup, Jiri Slaby, (Thu Jan 24, 5:32 am)
[RFC 1/5] Char: moxa, remove static isa support, Jiri Slaby, (Thu Jan 24, 5:32 am)
Re: [PATCH] drivers/char/moxa.c, kernel 2.6.23.14, Jiri Slaby, (Wed Jan 23, 11:37 am)
Re: [PATCH] drivers/char/moxa.c, kernel 2.6.23.14, Oyvind Aabling, (Thu Jan 24, 7:34 pm)
Re: [PATCH] drivers/char/moxa.c, kernel 2.6.23.14, Jiri Slaby, (Thu Jan 24, 7:38 pm)