--- 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 21:17:47 2000 @@ -296,8 +296,10 @@ static int serial_pci_board_idx = 0; #ifdef PCI_NUM_RESOURCES #define PCI_BASE_ADDRESS(dev, r) ((dev)->resource[r].start) +#define PCI_FLAGS(dev, r) ((dev)->resource[r].flags) #else #define PCI_BASE_ADDRESS(dev, r) ((dev)->base_address[r]) +#define PCI_FLAGS(dev, r) ((dev)->base_address[r]) #endif #endif /* ENABLE_SERIAL_PCI */ @@ -3970,13 +3972,18 @@ { 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!!! */ + /* 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 }, + /* Generic serial board */ + { 0, 0, + 0, 0, + SPCI_FL_BASE0, 1, 115200 }, }; /* @@ -4017,6 +4024,9 @@ } if (board->vendor == 0) { + + int j = 0; + #ifdef SERIAL_DEBUG_PCI printk(KERN_DEBUG "Found unknown serial board: %x:%x, %x:%x, %x\n", @@ -4027,7 +4037,19 @@ PCI_BASE_ADDRESS(dev, 0), PCI_BASE_ADDRESS(dev, 1), PCI_BASE_ADDRESS(dev, 2), PCI_BASE_ADDRESS(dev, 3)); #endif - continue; + + /* Detect generic PCI serial board */ + + if ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL || (dev->class & 0xff) > 6) + continue; + + for (k = 0; k < 6; k++) + if (PCI_FLAGS(dev, k) & PCI_BASE_ADDRESS_SPACE_IO) { + board->flags = k; + j++; + } + + if (j > 1) continue; } /*