Skip to contentSkip to conversation

PCMCIA serial CardBus support vanished in 2.4.3-pre3 and later

DISCUSSION Jeff Garzik 3 participants 4 messages Mar 20, 2001 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 8 lines · Alessandro Suardi
Quoted 4 lines · Jeff Garzik

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

#2 lore raw
Quoted 8 lines · Jeff Garzik
Quoted 5 lines · Alessandro Suardi
Quoted 4 lines · Jeff Garzik

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.

Quoted 4 lines
Quoted 2 lines

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.

Quoted 4 lines

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) ||
---

Quoted 1 line
	if ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL ||

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

Quoted 4 lines

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.
#3 lore raw
In reply to Jeff Garzik

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...

Signature · 3 lines
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.

Index: drivers/char/serial.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/char/serial.c,v retrieving revision 1.1.1.33

char/serial.c +6 -3
diff -u -r1.1.1.33 serial.c
@@ -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, }
 };
 
#4 lore raw
Quoted 5 lines · Jeff Garzik

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?

Quoted 7 lines

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