Can't get serial.c to work with Xircom Cardbus Ethernet+Modem
Hi all,
I saw a discussion on this list about this problem earlier, but could not find that it had actually been resolved.
With the removal of serial_cb from the 2.4.3pre kernels I can no longer use the modem of my Xircom adapter. According to the posts in the other thread serial.c should now provide this functionality, however it still does not, at least for me.
The thread seemed to come to the conclusion that this was caused because the serial driver only looks for PCI devices of class SERIAL and not MODEM. I tried the patch shown there for the 5.05 serial driver but it still doesn't find the serial interface on my Xircom 10/100 Ethernet+56K Modem combo card.
I'm pretty sure the issue is not caused by the problem above, because as far as I can tell the modem on the adapter does present itself as a PCI SERIAL class device as shown by the following lspci output:
[root@iso-2146-l1 ttsig]# /sbin/lspci
02:00.0 Ethernet controller: Xircom Cardbus Ethernet 10/100 (rev 03) 02:00.1 Serial controller: Xircom Cardbus Ethernet + 56k Modem (rev 03)
[root@iso-2146-l1 ttsig]# /sbin/lspci -n
02:00.0 Class 0200: 115d:0003 (rev 03)
02:00.1 Class 0700: 115d:0103 (rev 03)
[root@iso-2146-l1 ttsig]# /sbin/lspci -v
02:00.0 Ethernet controller: Xircom Cardbus Ethernet 10/100 (rev 03)
Subsystem: Xircom Cardbus Ethernet 10/100
Flags: bus master, medium devsel, latency 64, IRQ 11
I/O ports at 1800 [size=128]
Memory at 14800000 (32-bit, non-prefetchable) [size=2K]
Memory at 14800800 (32-bit, non-prefetchable) [size=2K]
Expansion ROM at 14400000 [size=16K]
Capabilities: [dc] Power Management version 102:00.1 Serial controller: Xircom Cardbus Ethernet + 56k Modem (rev 03) (prog-if
02 [16550])
Subsystem: Xircom CBEM56G-100 Ethernet + 56k Modem
Flags: medium devsel, IRQ 11
I/O ports at 1880 [size=8]
Memory at 14801000 (32-bit, non-prefetchable) [size=2K]
Memory at 14801800 (32-bit, non-prefetchable) [size=2K]
Expansion ROM at 14404000 [size=16K]
Capabilities: [dc] Power Management version 1I'm pretty sure that Class 0700 is the proper class for a PCI serial device. The serial_cb driver from 2.4.2 always recognized this device properly and set it up as /dev/ttyS1 using IO 0x1880 and IRQ 11. It showed under setserial as a follows:
/dev/ttyS1, UART: 16550A, Port: 0x1880, IRQ: 11
Now with serial.c it doesn't even get reported, I get the following when I load serial.c:
Serial driver version 5.05.SA (2000-09-14) with MANY_PORTS MULTIPORT SHARE_IRQ SERIAL_PCI ISAPNP enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
I know the version doesn't show as 5.05A, but I applied the patch by hand and left off that part. I'm pretty sure the patch is irrelavent since the device does show up as a true PCI SERIAL Class device.
Any ideas? I may look at it more tomorrow. For now I'm back to using serial_cb which still works fine (even though that apparently suprises many people).
Later,
Tom
Quoted 5 lines · Tom Sightler
Hi all,
I saw a discussion on this list about this problem earlier, but could not find that it had actually been resolved.
That was me :) and no, it doesn't work. Jeff Garzik asked me to enable
a couple debug #defines in serial.c, apply patches to serial.c and finally disable i82365 support but as of now it doesn't work.
It looks like we have the same card with modem @ 0x1880.
[snip]
Quoted 3 lines
Any ideas? I may look at it more tomorrow. For now I'm back to using
serial_cbwhich still works fine (even though that apparently suprises many people).
:) this is -pre4 with serial_cb which works fine, and always has...
--alessandro <[email protected]> <[email protected]>
Linux: kernel 2.2.19p17/2.4.3p6 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.
PATCH 1/1 Fix for serial.c to work with Xircom Cardbus Ethernet+Modem
In reply to Tom SightlerQuoted 5 lines
Quoted 4 lines · Tom Sightler
Hi all,
I saw a discussion on this list about this problem earlier, but could
not
Quoted 7 lines
Quoted 1 line
find that it had actually been resolved.
That was me :) and no, it doesn't work. Jeff Garzik asked me to enable
a couple debug #defines inserial.c, apply patches toserial.cand finally disable i82365 support but as of now it doesn't work.It looks like we have the same card with modem @
0x1880.
Yep, almost certainly the same, or at least very similar Xircom card.
Quoted 2 lines
Quoted 2 lines
Any ideas? I may look at it more tomorrow. For now I'm back to using
serial_cbwhich still works fine (even though that apparently suprises
many
Quoted 3 lines
Quoted 1 line
people).
:) this is -pre4 with
serial_cbwhich works fine, and always has...
OK, can you try this patch? It's very simple, and is probably not the correct fix (the correct fix is probably to add the Xircom card to the supported PCI table), but it works for me. I'm not sure why the generic pci serial code counts the number of iomem regions and only uses it if it has exactly 0 or 1, but the Xircom has 2 iomem regions so the generic code fails to use it. The following change relaxes the generic code to allow for up to 2 iomem regions on a PCI serial device. I have no idea what the side effects would be to this change, but it makes my Xircom work again and that was my goal. If I can help someone fix this correctly let me know what you need.
Later,
Tom
serial.c Fri Mar 23 23:24:17 2001 renamed from serial.c.old Fri Mar 23 23:23:17 2001 +2 -2
@@ -4616,10 +4616,10 @@ } /* - * If there is 1 or 0 iomem regions, and exactly one port, use + * If there is <= 2 iomem regions, and exactly one port, use * it. */ - if (num_iomem <= 1 && num_port == 1) { + if (num_iomem <= 2 && num_port == 1) { board->flags = first_port; return 0; }
Re: [PATCH] Fix for serial.c to work with Xircom Cardbus Ethernet+Modem
In reply to Tom SightlerQuoted 1 line · Tom Sightler
[snip]
Quoted 10 lines
OK, can you try this patch? It's very simple, and is probably not the correct fix (the correct fix is probably to add the Xircom card to the supported PCI table), but it works for me. I'm not sure why the generic pci serial code counts the number of iomem regions and only uses it if it has exactly 0 or 1, but the Xircom has 2 iomem regions so the generic code fails to use it. The following change relaxes the generic code to allow for up to 2 iomem regions on a PCI serial device. I have no idea what the side effects would be to this change, but it makes my Xircom work again and that was my goal. If I can help someone fix this correctly let me know what you need.
[snipped patch]
It seems something changed in 2.4.3-pre7 (against which I applied your
patch) so that it doesn't make a difference. On startup I now get this, which I am CC:ing as per printk to [email protected]
Mar 24 23:59:05 princess cardmgr[374]: initializing socket 1 Mar 24 23:59:05 princess kernel: got res[10c04000:10c07fff] for resource 6 of PCI device 115d:0103 Mar 24 23:59:05 princess cardmgr[374]: socket 1: Xircom CBEM56G-100 CardBus 10/100 Ethernet + 56K Modem Mar 24 23:59:05 princess kernel: PCI: Enabling device 05:00.1 (0000 -> 0003) Mar 24 23:59:05 princess kernel: Redundant entry in serial pci_table. Please send the output of Mar 24 23:59:05 princess kernel: lspci -vv, this message (4445,259,4445,4481) Mar 24 23:59:05 princess kernel: and the manufacturer and name of serial board or modem board Mar 24 23:59:05 princess kernel: to [email protected]. Mar 24 23:59:05 princess kernel: register_serial(): autoconfig failed
The card is a Xircom RBEM56G-100, despite what the card advertises.
(in case you wonder, cardmgr is from pcmcia_cs-3.1.25).
Thanks & ciao,
--alessandro <[email protected]> <[email protected]>
Linux: kernel 2.2.19p17/2.4.3p6 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.
Re: [PATCH] Fix for serial.c to work with Xircom Cardbus Ethernet+Modem
In reply to Tom SightlerQuoted 6 lines
Quoted 6 lines
It seems something changed in 2.4.3-pre7 (against which I applied your
patch) so that it doesn't make a difference. On startup I now get this, which I am CC:ing as per printk to [email protected]Mar 24 23:59:05 princess cardmgr[374]: initializing socket 1 Mar 24 23:59:05 princess kernel: got res[10c04000:10c07fff] for
resource 6 of PCI device 115d:0103
Quoted 1 line
Quoted 1 line
Mar 24 23:59:05 princess cardmgr[374]: socket 1: Xircom CBEM56G-100
CardBus 10/100 Ethernet + 56K Modem
Quoted 1 line
Quoted 1 line
Mar 24 23:59:05 princess kernel: PCI: Enabling device 05:00.1 (0000 ->
0003)
Quoted 1 line
Quoted 1 line
Mar 24 23:59:05 princess kernel: Redundant entry in serial pci_table.
Please send the output of
Quoted 1 line
Quoted 1 line
Mar 24 23:59:05 princess kernel: lspci -vv, this message
(4445,259,4445,4481)
Quoted 1 line
Quoted 1 line
Mar 24 23:59:05 princess kernel: and the manufacturer and name of serial
board or modem board
Quoted 1 line
Quoted 1 line
Mar 24 23:59:05 princess kernel: to
Quoted 10 lines
Quoted 5 lines
Mar 24 23:59:05 princess kernel: register_serial(): autoconfig failedThe card is a Xircom RBEM56G-100, despite what the card advertises.
(in case you wonder, cardmgr is from pcmcia_cs-3.1.25).
OK, I'll take a look at it. I made the patch against -ac21 which I think was only synced up to 2.4.3-pre6, I should have mentioned that. Perhaps someone added the proper Xircom stuff already or some other change made my patch irrelavent. BTW, are you building
serial.cas a module, or built
in?
Quoted 2 lines
I have mine as a module so it doesn't load until after the card is initialized. Just curious.
I tested 2.4.3-pre7 and it still fails without my patch. With my patch I get the above message about 'Redundant entry in serial pci_table' but it still manages to setup my serial device as /dev/ttyS4 (the same patch applied to 2.4.2-ac21 sets the device to /dev/ttyS1). However it only works if I load serial.c as a module AFTER the card is inserted, if serial.c is already loaded it doesn't register correctly with a messages similar to above. Perhaps I need to check my hotplug setup.
Could your try serial.c as a module and see if it works for you like that? That way I'd know I'm on the right track and haven't just found some strange way to make it work on my system alone.
Later,
Tom
Re: [PATCH] Fix for serial.c to work with Xircom Cardbus Ethernet+Modem
In reply to Tom SightlerQuoted 1 line · Tom Sightler
[snip]
Quoted 11 lines
I tested 2.4.3-pre7 and it still fails without my patch. With my patch I get the above message about 'Redundant entry in serial
pci_table' but it still manages to setup my serial device as/dev/ttyS4(the same patch applied to 2.4.2-ac21 sets the device to/dev/ttyS1). However it only works if I loadserial.cas a module AFTER the card is inserted, ifserial.cis already loaded it doesn't register correctly with a messages similar to above. Perhaps I need to check my hotplug setup.Could your try
serial.cas a module and see if it works for you like that? That way I'd know I'm on the right track and haven't just found some strange way to make it work on my system alone.
OK, now I'm in 2.4.3-pre7 plus your patch and serial as a module (it was
built in kernel previously) and indeed I have my modem detected automatically by the PCMCIA startup sequence (I don't need to manually do anything).
I lost the IrDA port, though - ttyS2. Now I only see ttyS0 and ttyS4.
Thanks & ciao,
--alessandro <[email protected]> <[email protected]>
Linux: kernel 2.2.19p18/2.4.3p7 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.