2001-03-20 10:43:30

by Alessandro Suardi

[permalink] [raw]
Subject: PCMCIA serial CardBus support vanished in 2.4.3-pre3 and later

Sorry to repost the issue but I got no reply...

2.4.3-pre3 and synced-up versions of the -ac series remove support for
PCMCIA serial CardBus. In drivers/char/pcmcia the Makefile and Config.in
files are modified to exclude serial_cb and the serial_cb.c file itself
is removed by the patch. As a net result, my Xircom modem port becomes
invisible to the kernel and I can't dial out through it.

As a temporary measure I backed out the changes in drivers/char/pcmcia
and my 2.4.3-pre4 kernel seems happy (in fact I am dialing out through
said Xircom modem).

Did I miss some announcement for replacement features for serial_cb or
did a bad patch slip in ?


Thanks & ciao,

--alessandro <[email protected]> <[email protected]>

Linux: kernel 2.2.19p17/2.4.3p4 glibc-2.2 gcc-2.96-69 binutils-2.11.90.0.1
Oracle: Oracle8i 8.1.7.0.1 Enterprise Edition for Linux
motto: Tell the truth, there's less to remember.


2001-03-20 12:08:04

by Jeff Garzik

[permalink] [raw]
Subject: Re: PCMCIA serial CardBus support vanished in 2.4.3-pre3 and later

Alessandro Suardi wrote:
>
> Sorry to repost the issue but I got no reply...
>
> 2.4.3-pre3 and synced-up versions of the -ac series remove support for
> PCMCIA serial CardBus. In drivers/char/pcmcia the Makefile and Config.in
> files are modified to exclude serial_cb and the serial_cb.c file itself
> is removed by the patch. As a net result, my Xircom modem port becomes
> invisible to the kernel and I can't dial out through it.
>
> As a temporary measure I backed out the changes in drivers/char/pcmcia
> and my 2.4.3-pre4 kernel seems happy (in fact I am dialing out through
> said Xircom modem).
>
> Did I miss some announcement for replacement features for serial_cb or
> did a bad patch slip in ?

Neither. serial.c does serial_cb's job now. It looks like serial.c
needs to scan for modems as well as serial ports, and tytso agrees with
me on that. We just need to check and see if winmodems reports
themselves as real modems before fixing this.

--
Jeff Garzik | May you have warm words on a cold evening,
Building 1024 | a full mooon on a dark night,
MandrakeSoft | and a smooth road all the way to your door.

2001-03-20 14:12:51

by Jeff Garzik

[permalink] [raw]
Subject: Re: PCMCIA serial CardBus support vanished in 2.4.3-pre3 and later

On Tue, 20 Mar 2001, Alessandro Suardi wrote:
> Jeff Garzik wrote:
> > Neither. serial.c does serial_cb's job now. It looks like serial.c
> > needs to scan for modems as well as serial ports, and tytso agrees with
> > me on that. We just need to check and see if winmodems reports
> > themselves as real modems before fixing this.

> OK, thanks. I assume you mean "serial.c should do serial_cb's job now",
> since it doesn't :) If you want me to test patches etc. just let me know.

Re-CC'd to linux-kernel, hope you don't mind.

Anyone interested in testing patches, this simple change is what needs
testing on various PCI and CardBus modems:
http://www.mail-archive.com/[email protected]/msg34097.html
(since it's a web archive, you may have to hack the patch in manually...)

It seems straightforward enough, and both tytso and I think the change
is ok, but (at tytso's suggestion) I'm going to test some various
winmodem and other use cases because assuring ourselves that it is good
enough for a general rule...

Regards,

Jeff



2001-03-20 15:23:29

by Alessandro Suardi

[permalink] [raw]
Subject: Re: PCMCIA serial CardBus support vanished in 2.4.3-pre3 and later

Jeff Garzik wrote:
>
> On Tue, 20 Mar 2001, Alessandro Suardi wrote:
> > Jeff Garzik wrote:
> > > Neither. serial.c does serial_cb's job now. It looks like serial.c
> > > needs to scan for modems as well as serial ports, and tytso agrees with
> > > me on that. We just need to check and see if winmodems reports
> > > themselves as real modems before fixing this.
>
> > OK, thanks. I assume you mean "serial.c should do serial_cb's job now",
> > since it doesn't :) If you want me to test patches etc. just let me know.
>
> Re-CC'd to linux-kernel, hope you don't mind.

No problem for me, of course.

> Anyone interested in testing patches, this simple change is what needs
> testing on various PCI and CardBus modems:
> http://www.mail-archive.com/[email protected]/msg34097.html
> (since it's a web archive, you may have to hack the patch in manually...)

I performed this hand-diff...

[asuardi@princess char]$ diff serial.c serial.c-2.4.3p4
4613,4614c4613
< if (!((dev->class >> 8) == PCI_CLASS_COMMUNICATION_SERIAL ||
< (dev->class >> 8) == PCI_CLASS_COMMUNICATION_MODEM) ||
---
> if ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL ||

...and still my Xircom modem tty isn't detected :(

> It seems straightforward enough, and both tytso and I think the change
> is ok, but (at tytso's suggestion) I'm going to test some various
> winmodem and other use cases because assuring ourselves that it is good
> enough for a general rule...

Available for further testing (or fixing my diff if I patched it badly).


Thanks & ciao,

--alessandro <[email protected]> <[email protected]>

Linux: kernel 2.2.19p17/2.4.3p4 glibc-2.2 gcc-2.96-69 binutils-2.11.90.0.1
Oracle: Oracle8i 8.1.7.0.1 Enterprise Edition for Linux
motto: Tell the truth, there's less to remember.

2001-03-20 15:39:10

by Jeff Garzik

[permalink] [raw]
Subject: [PATCH] Re: PCMCIA serial CardBus support vanished in 2.4.3-pre3 and later

Index: drivers/char/serial.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/char/serial.c,v
retrieving revision 1.1.1.33
diff -u -r1.1.1.33 serial.c
--- drivers/char/serial.c 2001/03/20 12:59:44 1.1.1.33
+++ drivers/char/serial.c 2001/03/20 15:35:47
@@ -59,8 +59,8 @@
*
*/

-static char *serial_version = "5.05";
-static char *serial_revdate = "2000-12-13";
+static char *serial_version = "5.05a";
+static char *serial_revdate = "2001-03-20";

/*
* Serial driver configuration section. Here are the various options:
@@ -4610,7 +4610,8 @@
* (Should we try to make guesses for multiport serial devices
* later?)
*/
- if ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL ||
+ if ((((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL) &&
+ ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MODEM)) ||
(dev->class & 0xff) > 6)
return 1;

@@ -4708,6 +4709,8 @@
static struct pci_device_id serial_pci_tbl[] __devinitdata = {
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xffff00, },
+ { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+ PCI_CLASS_COMMUNICATION_MODEM << 8, 0xffff00, },
{ 0, }
};


Attachments:
serial-modem.patch (1.23 kB)

2001-03-20 16:18:20

by Linus Torvalds

[permalink] [raw]
Subject: Re: PCMCIA serial CardBus support vanished in 2.4.3-pre3 and later



On Tue, 20 Mar 2001, Alessandro Suardi wrote:
>
> 2.4.3-pre3 and synced-up versions of the -ac series remove support for
> PCMCIA serial CardBus. In drivers/char/pcmcia the Makefile and Config.in
> files are modified to exclude serial_cb and the serial_cb.c file itself
> is removed by the patch. As a net result, my Xircom modem port becomes
> invisible to the kernel and I can't dial out through it.

The regular serial.c should handle it natively. Just make sure you have
CONFIG_SERIAL enabled, along with hotplugging support etc.

Linus

2001-03-20 16:58:22

by Pau

[permalink] [raw]
Subject: Re: PCMCIA serial CardBus support vanished in 2.4.3-pre3 and later

On Tue, 20 Mar 2001, Linus Torvalds wrote:

>
>
> On Tue, 20 Mar 2001, Alessandro Suardi wrote:
> >
> > 2.4.3-pre3 and synced-up versions of the -ac series remove support for
> > PCMCIA serial CardBus. In drivers/char/pcmcia the Makefile and Config.in
> > files are modified to exclude serial_cb and the serial_cb.c file itself
> > is removed by the patch. As a net result, my Xircom modem port becomes
> > invisible to the kernel and I can't dial out through it.
>
> The regular serial.c should handle it natively. Just make sure you have
> CONFIG_SERIAL enabled, along with hotplugging support etc.

In fact it does. I discovered it last weekend when my modem -them same one
than Alessandro's- stopped working.

Removing "alias char-major-4 serial_cb" from modules.conf did the trick
and the serial driver worked flawlessly. Modules serial got loaded
instead.

Pau

2001-03-20 17:12:52

by Pau

[permalink] [raw]
Subject: Re: PCMCIA serial CardBus support vanished in 2.4.3-pre3 and later

On Tue, 20 Mar 2001, Alessandro Suardi wrote:

> > Removing "alias char-major-4 serial_cb" from modules.conf did the trick
> > and the serial driver worked flawlessly. Modules serial got loaded
> > instead.
>
> Cool... but I have used for a while serial_cb in kernel, not as a module
> so there is nothing to remove here :) as for Jeff's surprise I have had
> basically no problem in using kernel PCMCIA stuff in 2.4 series, apart
> from the usual Tx hang bug of the Xircom.

I've been using it since first 2.3 series :)
I still have the Tx hang basically with NFS, but also when moving high
amount of Mb in the LAN.
I've moved from pcmcia-cs to hotplug and it works too :)

Pau

2001-03-20 17:06:32

by Alessandro Suardi

[permalink] [raw]
Subject: Re: PCMCIA serial CardBus support vanished in 2.4.3-pre3 and later

Pau wrote:
>
> On Tue, 20 Mar 2001, Linus Torvalds wrote:
>
> >
> >
> > On Tue, 20 Mar 2001, Alessandro Suardi wrote:
> > >
> > > 2.4.3-pre3 and synced-up versions of the -ac series remove support for
> > > PCMCIA serial CardBus. In drivers/char/pcmcia the Makefile and Config.in
> > > files are modified to exclude serial_cb and the serial_cb.c file itself
> > > is removed by the patch. As a net result, my Xircom modem port becomes
> > > invisible to the kernel and I can't dial out through it.
> >
> > The regular serial.c should handle it natively. Just make sure you have
> > CONFIG_SERIAL enabled, along with hotplugging support etc.
>
> In fact it does. I discovered it last weekend when my modem -them same one
> than Alessandro's- stopped working.
>
> Removing "alias char-major-4 serial_cb" from modules.conf did the trick
> and the serial driver worked flawlessly. Modules serial got loaded
> instead.

Cool... but I have used for a while serial_cb in kernel, not as a module
so there is nothing to remove here :) as for Jeff's surprise I have had
basically no problem in using kernel PCMCIA stuff in 2.4 series, apart
from the usual Tx hang bug of the Xircom.

Built with Jeff's latest patch, rebooting....

--alessandro <[email protected]> <[email protected]>

Linux: kernel 2.2.19p17/2.4.3p4 glibc-2.2 gcc-2.96-69 binutils-2.11.90.0.1
Oracle: Oracle8i 8.1.7.0.1 Enterprise Edition for Linux
motto: Tell the truth, there's less to remember.

2001-03-20 18:19:43

by Miles Lane

[permalink] [raw]
Subject: Re: [PATCH] Re: PCMCIA serial CardBus support vanished in 2.4.3-pre3 and later

On 20 Mar 2001 10:37:40 -0500, Jeff Garzik wrote:
> On closer inspection, that patch I linked to appears to be incomplete.
>
> Can you try the attached patch, to see if it fixes the
> absence-of-serial_cb problem?
>
> Thanks,
>
> Jeff
>
>
> P.S. I'm surprised serial_cb in 2.4 worked at all, for anybody. I guess
> they must be using pcmcia_cs's serial_cb, not the kernel's serial_cb...


Yes. Well, this just strengthens the case for getting PCMCIA support
migrated fully into the kernel tree so that we can pry people's finger
loose from pcmcia_cs. David Woodhouse is planning to take up this
project early in the 2.5 development cycle.

It's kind of a shame that more testing of the 2.4.x Cardbus/PCMCIA
drivers isn't happening, because a lot of the Cardbus/PCMCIA support
in the kernel tree is really just fine. We should all be using it and
testing it and reporting bugs.

One of the work items will be getting the in-kernel PCMCIA support
to work with the new hotplug stuff.


Miles