Messages in this thread Patch in this message | | | Date | Fri, 14 Jan 2000 20:37:03 +0100 | From | Vojtech Pavlik <> | Subject | Re: [patch] Support for 3Com PCI modem + Generic PCI serials |
| |
On Fri, Jan 14, 2000 at 08:30:53PM +0100, Vojtech Pavlik wrote:
> I have made a patch that allows the serial.c driver detect 3Com 56k PCI > modems. > > However, because I think that adding an entry to the database for every > conceivable PCI modem or serial port is wrong, I've also added support > for generic PCI serial boards, that report the correct PCI class and > programming inerface. This is why the 3Com modem support is #if0ed out - > the generic support is enough for the 3Com modems. > > I'm leaving it up to you which way will you choose - either just > expanding the table or also adding the generic support. The generic > support might cause some false positives, though I think the serial port > detection code will eliminate those out. > > Hope to see this in in kernel soon, > -- > Vojtech Pavlik > SuSE Labs
Sorry to reply to myself, here goes the patch.
-- Vojtech Pavlik SuSE Labs --- linux-2.3.40-3-old/drivers/char/serial.c Fri Jan 14 09:48:03 2000 +++ linux/drivers/char/serial.c Fri Jan 14 20:20:38 2000 @@ -3970,13 +3970,20 @@ { PCI_VENDOR_ID_ROCKWELL, 0x1004, 0x1048, 0x1500, SPCI_FL_BASE1, 1, 115200 }, - /* 3Com US Robotics 56k* Voice Internal PCI, model# 2884 */ - /* from evidal@iti.upv.es */ - /* XXX complete guess this may not work!!! */ +#if 0 + /* 3Com US Robotics 56k Voice Internal PCI model 2884 (?) */ { PCI_VENDOR_ID_USR, 0x1006, - 0x12b9, 0x0060, - SPCI_FL_BASE1 | SPCI_FL_IOMEM, 1, 115200 }, - { 0, } + PCI_ANY_ID, PCI_ANY_ID, + SPCI_FL_BASE0, 1, 115200 }, + /* 3Com US Robotics 56k Voice Internal PCI model 5610 */ + { PCI_VENDOR_ID_USR, 0x1008, + PCI_ANY_ID, PCI_ANY_ID, + SPCI_FL_BASE0, 1, 115200 }, +#endif + /* Generic serial board */ + { 0, 0, + 0, 0, + SPCI_FL_BASE0, 1, 115200 }, }; /* @@ -4017,6 +4024,7 @@ } if (board->vendor == 0) { + #ifdef SERIAL_DEBUG_PCI printk(KERN_DEBUG "Found unknown serial board: %x:%x, %x:%x, %x\n", @@ -4027,7 +4035,9 @@ PCI_BASE_ADDRESS(dev, 0), PCI_BASE_ADDRESS(dev, 1), PCI_BASE_ADDRESS(dev, 2), PCI_BASE_ADDRESS(dev, 3)); #endif - continue; + + if ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL || (dev->class & 0xff) > 6) + continue; } /* | |