2 * linux/drivers/char/8250_pci.c
4 * Probe module for 8250/16550-type PCI serial ports.
6 * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
8 * Copyright (C) 2001 Russell King, All Rights Reserved.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License.
14 * $Id: 8250_pci.c,v 1.28 2002/11/02 11:14:18 rmk Exp $
16 #include <linux/module.h>
17 #include <linux/init.h>
18 #include <linux/pci.h>
19 #include <linux/string.h>
20 #include <linux/kernel.h>
21 #include <linux/slab.h>
22 #include <linux/delay.h>
23 #include <linux/tty.h>
24 #include <linux/serial_core.h>
25 #include <linux/8250_pci.h>
26 #include <linux/bitops.h>
28 #include <asm/byteorder.h>
33 #undef SERIAL_DEBUG_PCI
36 * init function returns:
37 * > 0 - number of ports
38 * = 0 - use board->num_ports
41 struct pci_serial_quirk {
46 int (*init)(struct pci_dev *dev);
47 int (*setup)(struct serial_private *, struct pciserial_board *,
48 struct uart_port *, int);
49 void (*exit)(struct pci_dev *dev);
52 #define PCI_NUM_BAR_RESOURCES 6
54 struct serial_private {
57 void __iomem *remapped_bar[PCI_NUM_BAR_RESOURCES];
58 struct pci_serial_quirk *quirk;
62 static void moan_device(const char *str, struct pci_dev *dev)
64 printk(KERN_WARNING "%s: %s\n"
65 KERN_WARNING "Please send the output of lspci -vv, this\n"
66 KERN_WARNING "message (0x%04x,0x%04x,0x%04x,0x%04x), the\n"
67 KERN_WARNING "manufacturer and name of serial board or\n"
68 KERN_WARNING "modem board to rmk+serial@arm.linux.org.uk.\n",
69 pci_name(dev), str, dev->vendor, dev->device,
70 dev->subsystem_vendor, dev->subsystem_device);
74 setup_port(struct serial_private *priv, struct uart_port *port,
75 int bar, int offset, int regshift)
77 struct pci_dev *dev = priv->dev;
78 unsigned long base, len;
80 if (bar >= PCI_NUM_BAR_RESOURCES)
83 base = pci_resource_start(dev, bar);
85 if (pci_resource_flags(dev, bar) & IORESOURCE_MEM) {
86 len = pci_resource_len(dev, bar);
88 if (!priv->remapped_bar[bar])
89 priv->remapped_bar[bar] = ioremap(base, len);
90 if (!priv->remapped_bar[bar])
93 port->iotype = UPIO_MEM;
95 port->mapbase = base + offset;
96 port->membase = priv->remapped_bar[bar] + offset;
97 port->regshift = regshift;
99 port->iotype = UPIO_PORT;
100 port->iobase = base + offset;
102 port->membase = NULL;
109 * ADDI-DATA GmbH communication cards <info@addi-data.com>
111 static int addidata_apci7800_setup(struct serial_private *priv,
112 struct pciserial_board *board,
113 struct uart_port *port, int idx)
115 unsigned int bar = 0, offset = board->first_offset;
116 bar = FL_GET_BASE(board->flags);
119 offset += idx * board->uart_offset;
120 } else if ((idx >= 2) && (idx < 4)) {
122 offset += ((idx - 2) * board->uart_offset);
123 } else if ((idx >= 4) && (idx < 6)) {
125 offset += ((idx - 4) * board->uart_offset);
126 } else if (idx >= 6) {
128 offset += ((idx - 6) * board->uart_offset);
131 return setup_port(priv, port, bar, offset, board->reg_shift);
135 * AFAVLAB uses a different mixture of BARs and offsets
136 * Not that ugly ;) -- HW
139 afavlab_setup(struct serial_private *priv, struct pciserial_board *board,
140 struct uart_port *port, int idx)
142 unsigned int bar, offset = board->first_offset;
144 bar = FL_GET_BASE(board->flags);
149 offset += (idx - 4) * board->uart_offset;
152 return setup_port(priv, port, bar, offset, board->reg_shift);
156 * HP's Remote Management Console. The Diva chip came in several
157 * different versions. N-class, L2000 and A500 have two Diva chips, each
158 * with 3 UARTs (the third UART on the second chip is unused). Superdome
159 * and Keystone have one Diva chip with 3 UARTs. Some later machines have
160 * one Diva chip, but it has been expanded to 5 UARTs.
162 static int pci_hp_diva_init(struct pci_dev *dev)
166 switch (dev->subsystem_device) {
167 case PCI_DEVICE_ID_HP_DIVA_TOSCA1:
168 case PCI_DEVICE_ID_HP_DIVA_HALFDOME:
169 case PCI_DEVICE_ID_HP_DIVA_KEYSTONE:
170 case PCI_DEVICE_ID_HP_DIVA_EVEREST:
173 case PCI_DEVICE_ID_HP_DIVA_TOSCA2:
176 case PCI_DEVICE_ID_HP_DIVA_MAESTRO:
179 case PCI_DEVICE_ID_HP_DIVA_POWERBAR:
180 case PCI_DEVICE_ID_HP_DIVA_HURRICANE:
189 * HP's Diva chip puts the 4th/5th serial port further out, and
190 * some serial ports are supposed to be hidden on certain models.
193 pci_hp_diva_setup(struct serial_private *priv, struct pciserial_board *board,
194 struct uart_port *port, int idx)
196 unsigned int offset = board->first_offset;
197 unsigned int bar = FL_GET_BASE(board->flags);
199 switch (priv->dev->subsystem_device) {
200 case PCI_DEVICE_ID_HP_DIVA_MAESTRO:
204 case PCI_DEVICE_ID_HP_DIVA_EVEREST:
214 offset += idx * board->uart_offset;
216 return setup_port(priv, port, bar, offset, board->reg_shift);
220 * Added for EKF Intel i960 serial boards
222 static int pci_inteli960ni_init(struct pci_dev *dev)
224 unsigned long oldval;
226 if (!(dev->subsystem_device & 0x1000))
229 /* is firmware started? */
230 pci_read_config_dword(dev, 0x44, (void*) &oldval);
231 if (oldval == 0x00001000L) { /* RESET value */
232 printk(KERN_DEBUG "Local i960 firmware missing");
239 * Some PCI serial cards using the PLX 9050 PCI interface chip require
240 * that the card interrupt be explicitly enabled or disabled. This
241 * seems to be mainly needed on card using the PLX which also use I/O
244 static int pci_plx9050_init(struct pci_dev *dev)
249 if ((pci_resource_flags(dev, 0) & IORESOURCE_MEM) == 0) {
250 moan_device("no memory in bar 0", dev);
255 if (dev->vendor == PCI_VENDOR_ID_PANACOM ||
256 dev->subsystem_vendor == PCI_SUBVENDOR_ID_EXSYS) {
259 if ((dev->vendor == PCI_VENDOR_ID_PLX) &&
260 (dev->device == PCI_DEVICE_ID_PLX_ROMULUS)) {
262 * As the megawolf cards have the int pins active
263 * high, and have 2 UART chips, both ints must be
264 * enabled on the 9050. Also, the UARTS are set in
265 * 16450 mode by default, so we have to enable the
266 * 16C950 'enhanced' mode so that we can use the
273 * enable/disable interrupts
275 p = ioremap(pci_resource_start(dev, 0), 0x80);
278 writel(irq_config, p + 0x4c);
281 * Read the register back to ensure that it took effect.
289 static void __devexit pci_plx9050_exit(struct pci_dev *dev)
293 if ((pci_resource_flags(dev, 0) & IORESOURCE_MEM) == 0)
299 p = ioremap(pci_resource_start(dev, 0), 0x80);
304 * Read the register back to ensure that it took effect.
311 /* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */
313 sbs_setup(struct serial_private *priv, struct pciserial_board *board,
314 struct uart_port *port, int idx)
316 unsigned int bar, offset = board->first_offset;
321 /* first four channels map to 0, 0x100, 0x200, 0x300 */
322 offset += idx * board->uart_offset;
323 } else if (idx < 8) {
324 /* last four channels map to 0x1000, 0x1100, 0x1200, 0x1300 */
325 offset += idx * board->uart_offset + 0xC00;
326 } else /* we have only 8 ports on PMC-OCTALPRO */
329 return setup_port(priv, port, bar, offset, board->reg_shift);
333 * This does initialization for PMC OCTALPRO cards:
334 * maps the device memory, resets the UARTs (needed, bc
335 * if the module is removed and inserted again, the card
336 * is in the sleep mode) and enables global interrupt.
339 /* global control register offset for SBS PMC-OctalPro */
340 #define OCT_REG_CR_OFF 0x500
342 static int sbs_init(struct pci_dev *dev)
346 p = ioremap(pci_resource_start(dev, 0),pci_resource_len(dev,0));
350 /* Set bit-4 Control Register (UART RESET) in to reset the uarts */
351 writeb(0x10,p + OCT_REG_CR_OFF);
353 writeb(0x0,p + OCT_REG_CR_OFF);
355 /* Set bit-2 (INTENABLE) of Control Register */
356 writeb(0x4, p + OCT_REG_CR_OFF);
363 * Disables the global interrupt of PMC-OctalPro
366 static void __devexit sbs_exit(struct pci_dev *dev)
370 p = ioremap(pci_resource_start(dev, 0),pci_resource_len(dev,0));
372 writeb(0, p + OCT_REG_CR_OFF);
378 * SIIG serial cards have an PCI interface chip which also controls
379 * the UART clocking frequency. Each UART can be clocked independently
380 * (except cards equiped with 4 UARTs) and initial clocking settings
381 * are stored in the EEPROM chip. It can cause problems because this
382 * version of serial driver doesn't support differently clocked UART's
383 * on single PCI card. To prevent this, initialization functions set
384 * high frequency clocking for all UART's on given card. It is safe (I
385 * hope) because it doesn't touch EEPROM settings to prevent conflicts
386 * with other OSes (like M$ DOS).
388 * SIIG support added by Andrey Panin <pazke@donpac.ru>, 10/1999
390 * There is two family of SIIG serial cards with different PCI
391 * interface chip and different configuration methods:
392 * - 10x cards have control registers in IO and/or memory space;
393 * - 20x cards have control registers in standard PCI configuration space.
395 * Note: all 10x cards have PCI device ids 0x10..
396 * all 20x cards have PCI device ids 0x20..
398 * There are also Quartet Serial cards which use Oxford Semiconductor
399 * 16954 quad UART PCI chip clocked by 18.432 MHz quartz.
401 * Note: some SIIG cards are probed by the parport_serial object.
404 #define PCI_DEVICE_ID_SIIG_1S_10x (PCI_DEVICE_ID_SIIG_1S_10x_550 & 0xfffc)
405 #define PCI_DEVICE_ID_SIIG_2S_10x (PCI_DEVICE_ID_SIIG_2S_10x_550 & 0xfff8)
407 static int pci_siig10x_init(struct pci_dev *dev)
412 switch (dev->device & 0xfff8) {
413 case PCI_DEVICE_ID_SIIG_1S_10x: /* 1S */
416 case PCI_DEVICE_ID_SIIG_2S_10x: /* 2S, 2S1P */
419 default: /* 1S1P, 4S */
424 p = ioremap(pci_resource_start(dev, 0), 0x80);
428 writew(readw(p + 0x28) & data, p + 0x28);
434 #define PCI_DEVICE_ID_SIIG_2S_20x (PCI_DEVICE_ID_SIIG_2S_20x_550 & 0xfffc)
435 #define PCI_DEVICE_ID_SIIG_2S1P_20x (PCI_DEVICE_ID_SIIG_2S1P_20x_550 & 0xfffc)
437 static int pci_siig20x_init(struct pci_dev *dev)
441 /* Change clock frequency for the first UART. */
442 pci_read_config_byte(dev, 0x6f, &data);
443 pci_write_config_byte(dev, 0x6f, data & 0xef);
445 /* If this card has 2 UART, we have to do the same with second UART. */
446 if (((dev->device & 0xfffc) == PCI_DEVICE_ID_SIIG_2S_20x) ||
447 ((dev->device & 0xfffc) == PCI_DEVICE_ID_SIIG_2S1P_20x)) {
448 pci_read_config_byte(dev, 0x73, &data);
449 pci_write_config_byte(dev, 0x73, data & 0xef);
454 static int pci_siig_init(struct pci_dev *dev)
456 unsigned int type = dev->device & 0xff00;
459 return pci_siig10x_init(dev);
460 else if (type == 0x2000)
461 return pci_siig20x_init(dev);
463 moan_device("Unknown SIIG card", dev);
467 static int pci_siig_setup(struct serial_private *priv,
468 struct pciserial_board *board,
469 struct uart_port *port, int idx)
471 unsigned int bar = FL_GET_BASE(board->flags) + idx, offset = 0;
475 offset = (idx - 4) * 8;
478 return setup_port(priv, port, bar, offset, 0);
482 * Timedia has an explosion of boards, and to avoid the PCI table from
483 * growing *huge*, we use this function to collapse some 70 entries
484 * in the PCI table into one, for sanity's and compactness's sake.
486 static const unsigned short timedia_single_port[] = {
487 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0
490 static const unsigned short timedia_dual_port[] = {
491 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085,
492 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079,
493 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079,
494 0x9137, 0x9138, 0x9237, 0x9238, 0xA079, 0xB079, 0xC079,
498 static const unsigned short timedia_quad_port[] = {
499 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157,
500 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159,
501 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056,
505 static const unsigned short timedia_eight_port[] = {
506 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166,
507 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0
510 static const struct timedia_struct {
512 const unsigned short *ids;
514 { 1, timedia_single_port },
515 { 2, timedia_dual_port },
516 { 4, timedia_quad_port },
517 { 8, timedia_eight_port }
520 static int pci_timedia_init(struct pci_dev *dev)
522 const unsigned short *ids;
525 for (i = 0; i < ARRAY_SIZE(timedia_data); i++) {
526 ids = timedia_data[i].ids;
527 for (j = 0; ids[j]; j++)
528 if (dev->subsystem_device == ids[j])
529 return timedia_data[i].num;
535 * Timedia/SUNIX uses a mixture of BARs and offsets
536 * Ugh, this is ugly as all hell --- TYT
539 pci_timedia_setup(struct serial_private *priv, struct pciserial_board *board,
540 struct uart_port *port, int idx)
542 unsigned int bar = 0, offset = board->first_offset;
549 offset = board->uart_offset;
556 offset = board->uart_offset;
565 return setup_port(priv, port, bar, offset, board->reg_shift);
569 * Some Titan cards are also a little weird
572 titan_400l_800l_setup(struct serial_private *priv,
573 struct pciserial_board *board,
574 struct uart_port *port, int idx)
576 unsigned int bar, offset = board->first_offset;
587 offset = (idx - 2) * board->uart_offset;
590 return setup_port(priv, port, bar, offset, board->reg_shift);
593 static int pci_xircom_init(struct pci_dev *dev)
599 static int pci_netmos_init(struct pci_dev *dev)
601 /* subdevice 0x00PS means <P> parallel, <S> serial */
602 unsigned int num_serial = dev->subsystem_device & 0xf;
610 * ITE support by Niels de Vos <niels.devos@wincor-nixdorf.com>
612 * These chips are available with optionally one parallel port and up to
613 * two serial ports. Unfortunately they all have the same product id.
615 * Basic configuration is done over a region of 32 I/O ports. The base
616 * ioport is called INTA or INTC, depending on docs/other drivers.
618 * The region of the 32 I/O ports is configured in POSIO0R...
622 #define ITE_887x_MISCR 0x9c
623 #define ITE_887x_INTCBAR 0x78
624 #define ITE_887x_UARTBAR 0x7c
625 #define ITE_887x_PS0BAR 0x10
626 #define ITE_887x_POSIO0 0x60
629 #define ITE_887x_IOSIZE 32
630 /* I/O space size (bits 26-24; 8 bytes = 011b) */
631 #define ITE_887x_POSIO_IOSIZE_8 (3 << 24)
632 /* I/O space size (bits 26-24; 32 bytes = 101b) */
633 #define ITE_887x_POSIO_IOSIZE_32 (5 << 24)
634 /* Decoding speed (1 = slow, 2 = medium, 3 = fast) */
635 #define ITE_887x_POSIO_SPEED (3 << 29)
636 /* enable IO_Space bit */
637 #define ITE_887x_POSIO_ENABLE (1 << 31)
639 static int pci_ite887x_init(struct pci_dev *dev)
641 /* inta_addr are the configuration addresses of the ITE */
642 static const short inta_addr[] = { 0x2a0, 0x2c0, 0x220, 0x240, 0x1e0,
645 struct resource *iobase = NULL;
646 u32 miscr, uartbar, ioport;
648 /* search for the base-ioport */
650 while (inta_addr[i] && iobase == NULL) {
651 iobase = request_region(inta_addr[i], ITE_887x_IOSIZE,
653 if (iobase != NULL) {
654 /* write POSIO0R - speed | size | ioport */
655 pci_write_config_dword(dev, ITE_887x_POSIO0,
656 ITE_887x_POSIO_ENABLE | ITE_887x_POSIO_SPEED |
657 ITE_887x_POSIO_IOSIZE_32 | inta_addr[i]);
658 /* write INTCBAR - ioport */
659 pci_write_config_dword(dev, ITE_887x_INTCBAR, inta_addr[i]);
660 ret = inb(inta_addr[i]);
662 /* ioport connected */
665 release_region(iobase->start, ITE_887x_IOSIZE);
672 printk(KERN_ERR "ite887x: could not find iobase\n");
676 /* start of undocumented type checking (see parport_pc.c) */
677 type = inb(iobase->start + 0x18) & 0x0f;
680 case 0x2: /* ITE8871 (1P) */
681 case 0xa: /* ITE8875 (1P) */
684 case 0xe: /* ITE8872 (2S1P) */
687 case 0x6: /* ITE8873 (1S) */
690 case 0x8: /* ITE8874 (2S) */
694 moan_device("Unknown ITE887x", dev);
698 /* configure all serial ports */
699 for (i = 0; i < ret; i++) {
700 /* read the I/O port from the device */
701 pci_read_config_dword(dev, ITE_887x_PS0BAR + (0x4 * (i + 1)),
703 ioport &= 0x0000FF00; /* the actual base address */
704 pci_write_config_dword(dev, ITE_887x_POSIO0 + (0x4 * (i + 1)),
705 ITE_887x_POSIO_ENABLE | ITE_887x_POSIO_SPEED |
706 ITE_887x_POSIO_IOSIZE_8 | ioport);
708 /* write the ioport to the UARTBAR */
709 pci_read_config_dword(dev, ITE_887x_UARTBAR, &uartbar);
710 uartbar &= ~(0xffff << (16 * i)); /* clear half the reg */
711 uartbar |= (ioport << (16 * i)); /* set the ioport */
712 pci_write_config_dword(dev, ITE_887x_UARTBAR, uartbar);
714 /* get current config */
715 pci_read_config_dword(dev, ITE_887x_MISCR, &miscr);
716 /* disable interrupts (UARTx_Routing[3:0]) */
717 miscr &= ~(0xf << (12 - 4 * i));
718 /* activate the UART (UARTx_En) */
719 miscr |= 1 << (23 - i);
720 /* write new config with activated UART */
721 pci_write_config_dword(dev, ITE_887x_MISCR, miscr);
725 /* the device has no UARTs if we get here */
726 release_region(iobase->start, ITE_887x_IOSIZE);
732 static void __devexit pci_ite887x_exit(struct pci_dev *dev)
735 /* the ioport is bit 0-15 in POSIO0R */
736 pci_read_config_dword(dev, ITE_887x_POSIO0, &ioport);
738 release_region(ioport, ITE_887x_IOSIZE);
742 pci_default_setup(struct serial_private *priv, struct pciserial_board *board,
743 struct uart_port *port, int idx)
745 unsigned int bar, offset = board->first_offset, maxnr;
747 bar = FL_GET_BASE(board->flags);
748 if (board->flags & FL_BASE_BARS)
751 offset += idx * board->uart_offset;
753 maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
754 (board->reg_shift + 3);
756 if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
759 return setup_port(priv, port, bar, offset, board->reg_shift);
762 /* This should be in linux/pci_ids.h */
763 #define PCI_VENDOR_ID_SBSMODULARIO 0x124B
764 #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B
765 #define PCI_DEVICE_ID_OCTPRO 0x0001
766 #define PCI_SUBDEVICE_ID_OCTPRO232 0x0108
767 #define PCI_SUBDEVICE_ID_OCTPRO422 0x0208
768 #define PCI_SUBDEVICE_ID_POCTAL232 0x0308
769 #define PCI_SUBDEVICE_ID_POCTAL422 0x0408
772 * Master list of serial port init/setup/exit quirks.
773 * This does not describe the general nature of the port.
774 * (ie, baud base, number and location of ports, etc)
776 * This list is ordered alphabetically by vendor then device.
777 * Specific entries must come before more generic entries.
779 static struct pci_serial_quirk pci_serial_quirks[] = {
781 * ADDI-DATA GmbH communication cards <info@addi-data.com>
784 .vendor = PCI_VENDOR_ID_ADDIDATA_OLD,
785 .device = PCI_DEVICE_ID_ADDIDATA_APCI7800,
786 .subvendor = PCI_ANY_ID,
787 .subdevice = PCI_ANY_ID,
788 .setup = addidata_apci7800_setup,
791 * AFAVLAB cards - these may be called via parport_serial
792 * It is not clear whether this applies to all products.
795 .vendor = PCI_VENDOR_ID_AFAVLAB,
796 .device = PCI_ANY_ID,
797 .subvendor = PCI_ANY_ID,
798 .subdevice = PCI_ANY_ID,
799 .setup = afavlab_setup,
805 .vendor = PCI_VENDOR_ID_HP,
806 .device = PCI_DEVICE_ID_HP_DIVA,
807 .subvendor = PCI_ANY_ID,
808 .subdevice = PCI_ANY_ID,
809 .init = pci_hp_diva_init,
810 .setup = pci_hp_diva_setup,
816 .vendor = PCI_VENDOR_ID_INTEL,
817 .device = PCI_DEVICE_ID_INTEL_80960_RP,
819 .subdevice = PCI_ANY_ID,
820 .init = pci_inteli960ni_init,
821 .setup = pci_default_setup,
827 .vendor = PCI_VENDOR_ID_ITE,
828 .device = PCI_DEVICE_ID_ITE_8872,
829 .subvendor = PCI_ANY_ID,
830 .subdevice = PCI_ANY_ID,
831 .init = pci_ite887x_init,
832 .setup = pci_default_setup,
833 .exit = __devexit_p(pci_ite887x_exit),
839 .vendor = PCI_VENDOR_ID_PANACOM,
840 .device = PCI_DEVICE_ID_PANACOM_QUADMODEM,
841 .subvendor = PCI_ANY_ID,
842 .subdevice = PCI_ANY_ID,
843 .init = pci_plx9050_init,
844 .setup = pci_default_setup,
845 .exit = __devexit_p(pci_plx9050_exit),
848 .vendor = PCI_VENDOR_ID_PANACOM,
849 .device = PCI_DEVICE_ID_PANACOM_DUALMODEM,
850 .subvendor = PCI_ANY_ID,
851 .subdevice = PCI_ANY_ID,
852 .init = pci_plx9050_init,
853 .setup = pci_default_setup,
854 .exit = __devexit_p(pci_plx9050_exit),
860 .vendor = PCI_VENDOR_ID_PLX,
861 .device = PCI_DEVICE_ID_PLX_9030,
862 .subvendor = PCI_SUBVENDOR_ID_PERLE,
863 .subdevice = PCI_ANY_ID,
864 .setup = pci_default_setup,
867 .vendor = PCI_VENDOR_ID_PLX,
868 .device = PCI_DEVICE_ID_PLX_9050,
869 .subvendor = PCI_SUBVENDOR_ID_EXSYS,
870 .subdevice = PCI_SUBDEVICE_ID_EXSYS_4055,
871 .init = pci_plx9050_init,
872 .setup = pci_default_setup,
873 .exit = __devexit_p(pci_plx9050_exit),
876 .vendor = PCI_VENDOR_ID_PLX,
877 .device = PCI_DEVICE_ID_PLX_9050,
878 .subvendor = PCI_SUBVENDOR_ID_KEYSPAN,
879 .subdevice = PCI_SUBDEVICE_ID_KEYSPAN_SX2,
880 .init = pci_plx9050_init,
881 .setup = pci_default_setup,
882 .exit = __devexit_p(pci_plx9050_exit),
885 .vendor = PCI_VENDOR_ID_PLX,
886 .device = PCI_DEVICE_ID_PLX_ROMULUS,
887 .subvendor = PCI_VENDOR_ID_PLX,
888 .subdevice = PCI_DEVICE_ID_PLX_ROMULUS,
889 .init = pci_plx9050_init,
890 .setup = pci_default_setup,
891 .exit = __devexit_p(pci_plx9050_exit),
894 * SBS Technologies, Inc., PMC-OCTALPRO 232
897 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
898 .device = PCI_DEVICE_ID_OCTPRO,
899 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
900 .subdevice = PCI_SUBDEVICE_ID_OCTPRO232,
903 .exit = __devexit_p(sbs_exit),
906 * SBS Technologies, Inc., PMC-OCTALPRO 422
909 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
910 .device = PCI_DEVICE_ID_OCTPRO,
911 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
912 .subdevice = PCI_SUBDEVICE_ID_OCTPRO422,
915 .exit = __devexit_p(sbs_exit),
918 * SBS Technologies, Inc., P-Octal 232
921 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
922 .device = PCI_DEVICE_ID_OCTPRO,
923 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
924 .subdevice = PCI_SUBDEVICE_ID_POCTAL232,
927 .exit = __devexit_p(sbs_exit),
930 * SBS Technologies, Inc., P-Octal 422
933 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
934 .device = PCI_DEVICE_ID_OCTPRO,
935 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
936 .subdevice = PCI_SUBDEVICE_ID_POCTAL422,
939 .exit = __devexit_p(sbs_exit),
942 * SIIG cards - these may be called via parport_serial
945 .vendor = PCI_VENDOR_ID_SIIG,
946 .device = PCI_ANY_ID,
947 .subvendor = PCI_ANY_ID,
948 .subdevice = PCI_ANY_ID,
949 .init = pci_siig_init,
950 .setup = pci_siig_setup,
956 .vendor = PCI_VENDOR_ID_TITAN,
957 .device = PCI_DEVICE_ID_TITAN_400L,
958 .subvendor = PCI_ANY_ID,
959 .subdevice = PCI_ANY_ID,
960 .setup = titan_400l_800l_setup,
963 .vendor = PCI_VENDOR_ID_TITAN,
964 .device = PCI_DEVICE_ID_TITAN_800L,
965 .subvendor = PCI_ANY_ID,
966 .subdevice = PCI_ANY_ID,
967 .setup = titan_400l_800l_setup,
973 .vendor = PCI_VENDOR_ID_TIMEDIA,
974 .device = PCI_DEVICE_ID_TIMEDIA_1889,
975 .subvendor = PCI_VENDOR_ID_TIMEDIA,
976 .subdevice = PCI_ANY_ID,
977 .init = pci_timedia_init,
978 .setup = pci_timedia_setup,
981 .vendor = PCI_VENDOR_ID_TIMEDIA,
982 .device = PCI_ANY_ID,
983 .subvendor = PCI_ANY_ID,
984 .subdevice = PCI_ANY_ID,
985 .setup = pci_timedia_setup,
991 .vendor = PCI_VENDOR_ID_XIRCOM,
992 .device = PCI_DEVICE_ID_XIRCOM_X3201_MDM,
993 .subvendor = PCI_ANY_ID,
994 .subdevice = PCI_ANY_ID,
995 .init = pci_xircom_init,
996 .setup = pci_default_setup,
999 * Netmos cards - these may be called via parport_serial
1002 .vendor = PCI_VENDOR_ID_NETMOS,
1003 .device = PCI_ANY_ID,
1004 .subvendor = PCI_ANY_ID,
1005 .subdevice = PCI_ANY_ID,
1006 .init = pci_netmos_init,
1007 .setup = pci_default_setup,
1010 * Default "match everything" terminator entry
1013 .vendor = PCI_ANY_ID,
1014 .device = PCI_ANY_ID,
1015 .subvendor = PCI_ANY_ID,
1016 .subdevice = PCI_ANY_ID,
1017 .setup = pci_default_setup,
1021 static inline int quirk_id_matches(u32 quirk_id, u32 dev_id)
1023 return quirk_id == PCI_ANY_ID || quirk_id == dev_id;
1026 static struct pci_serial_quirk *find_quirk(struct pci_dev *dev)
1028 struct pci_serial_quirk *quirk;
1030 for (quirk = pci_serial_quirks; ; quirk++)
1031 if (quirk_id_matches(quirk->vendor, dev->vendor) &&
1032 quirk_id_matches(quirk->device, dev->device) &&
1033 quirk_id_matches(quirk->subvendor, dev->subsystem_vendor) &&
1034 quirk_id_matches(quirk->subdevice, dev->subsystem_device))
1039 static inline int get_pci_irq(struct pci_dev *dev,
1040 struct pciserial_board *board)
1042 if (board->flags & FL_NOIRQ)
1049 * This is the configuration table for all of the PCI serial boards
1050 * which we support. It is directly indexed by the pci_board_num_t enum
1051 * value, which is encoded in the pci_device_id PCI probe table's
1052 * driver_data member.
1054 * The makeup of these names are:
1055 * pbn_bn{_bt}_n_baud{_offsetinhex}
1057 * bn = PCI BAR number
1058 * bt = Index using PCI BARs
1059 * n = number of serial ports
1061 * offsetinhex = offset for each sequential port (in hex)
1063 * This table is sorted by (in order): bn, bt, baud, offsetindex, n.
1065 * Please note: in theory if n = 1, _bt infix should make no difference.
1066 * ie, pbn_b0_1_115200 is the same as pbn_b0_bt_1_115200
1068 enum pci_board_num_t {
1088 pbn_b0_2_1843200_200,
1089 pbn_b0_4_1843200_200,
1090 pbn_b0_8_1843200_200,
1151 * Board-specific versions.
1172 * uart_offset - the space between channels
1173 * reg_shift - describes how the UART registers are mapped
1174 * to PCI memory by the card.
1175 * For example IER register on SBS, Inc. PMC-OctPro is located at
1176 * offset 0x10 from the UART base, while UART_IER is defined as 1
1177 * in include/linux/serial_reg.h,
1178 * see first lines of serial_in() and serial_out() in 8250.c
1181 static struct pciserial_board pci_boards[] __devinitdata = {
1185 .base_baud = 115200,
1188 [pbn_b0_1_115200] = {
1191 .base_baud = 115200,
1194 [pbn_b0_2_115200] = {
1197 .base_baud = 115200,
1200 [pbn_b0_4_115200] = {
1203 .base_baud = 115200,
1206 [pbn_b0_5_115200] = {
1209 .base_baud = 115200,
1212 [pbn_b0_8_115200] = {
1215 .base_baud = 115200,
1218 [pbn_b0_8_115200] = {
1221 .base_baud = 115200,
1225 [pbn_b0_1_921600] = {
1228 .base_baud = 921600,
1231 [pbn_b0_2_921600] = {
1234 .base_baud = 921600,
1237 [pbn_b0_4_921600] = {
1240 .base_baud = 921600,
1244 [pbn_b0_2_1130000] = {
1247 .base_baud = 1130000,
1251 [pbn_b0_4_1152000] = {
1254 .base_baud = 1152000,
1258 [pbn_b0_2_1843200] = {
1261 .base_baud = 1843200,
1264 [pbn_b0_4_1843200] = {
1267 .base_baud = 1843200,
1271 [pbn_b0_2_1843200_200] = {
1274 .base_baud = 1843200,
1275 .uart_offset = 0x200,
1277 [pbn_b0_4_1843200_200] = {
1280 .base_baud = 1843200,
1281 .uart_offset = 0x200,
1283 [pbn_b0_8_1843200_200] = {
1286 .base_baud = 1843200,
1287 .uart_offset = 0x200,
1290 [pbn_b0_bt_1_115200] = {
1291 .flags = FL_BASE0|FL_BASE_BARS,
1293 .base_baud = 115200,
1296 [pbn_b0_bt_2_115200] = {
1297 .flags = FL_BASE0|FL_BASE_BARS,
1299 .base_baud = 115200,
1302 [pbn_b0_bt_8_115200] = {
1303 .flags = FL_BASE0|FL_BASE_BARS,
1305 .base_baud = 115200,
1309 [pbn_b0_bt_1_460800] = {
1310 .flags = FL_BASE0|FL_BASE_BARS,
1312 .base_baud = 460800,
1315 [pbn_b0_bt_2_460800] = {
1316 .flags = FL_BASE0|FL_BASE_BARS,
1318 .base_baud = 460800,
1321 [pbn_b0_bt_4_460800] = {
1322 .flags = FL_BASE0|FL_BASE_BARS,
1324 .base_baud = 460800,
1328 [pbn_b0_bt_1_921600] = {
1329 .flags = FL_BASE0|FL_BASE_BARS,
1331 .base_baud = 921600,
1334 [pbn_b0_bt_2_921600] = {
1335 .flags = FL_BASE0|FL_BASE_BARS,
1337 .base_baud = 921600,
1340 [pbn_b0_bt_4_921600] = {
1341 .flags = FL_BASE0|FL_BASE_BARS,
1343 .base_baud = 921600,
1346 [pbn_b0_bt_8_921600] = {
1347 .flags = FL_BASE0|FL_BASE_BARS,
1349 .base_baud = 921600,
1353 [pbn_b1_1_115200] = {
1356 .base_baud = 115200,
1359 [pbn_b1_2_115200] = {
1362 .base_baud = 115200,
1365 [pbn_b1_4_115200] = {
1368 .base_baud = 115200,
1371 [pbn_b1_8_115200] = {
1374 .base_baud = 115200,
1378 [pbn_b1_1_921600] = {
1381 .base_baud = 921600,
1384 [pbn_b1_2_921600] = {
1387 .base_baud = 921600,
1390 [pbn_b1_4_921600] = {
1393 .base_baud = 921600,
1396 [pbn_b1_8_921600] = {
1399 .base_baud = 921600,
1402 [pbn_b1_2_1250000] = {
1405 .base_baud = 1250000,
1409 [pbn_b1_bt_1_115200] = {
1410 .flags = FL_BASE1|FL_BASE_BARS,
1412 .base_baud = 115200,
1416 [pbn_b1_bt_2_921600] = {
1417 .flags = FL_BASE1|FL_BASE_BARS,
1419 .base_baud = 921600,
1423 [pbn_b1_1_1382400] = {
1426 .base_baud = 1382400,
1429 [pbn_b1_2_1382400] = {
1432 .base_baud = 1382400,
1435 [pbn_b1_4_1382400] = {
1438 .base_baud = 1382400,
1441 [pbn_b1_8_1382400] = {
1444 .base_baud = 1382400,
1448 [pbn_b2_1_115200] = {
1451 .base_baud = 115200,
1454 [pbn_b2_2_115200] = {
1457 .base_baud = 115200,
1460 [pbn_b2_4_115200] = {
1463 .base_baud = 115200,
1466 [pbn_b2_8_115200] = {
1469 .base_baud = 115200,
1473 [pbn_b2_1_460800] = {
1476 .base_baud = 460800,
1479 [pbn_b2_4_460800] = {
1482 .base_baud = 460800,
1485 [pbn_b2_8_460800] = {
1488 .base_baud = 460800,
1491 [pbn_b2_16_460800] = {
1494 .base_baud = 460800,
1498 [pbn_b2_1_921600] = {
1501 .base_baud = 921600,
1504 [pbn_b2_4_921600] = {
1507 .base_baud = 921600,
1510 [pbn_b2_8_921600] = {
1513 .base_baud = 921600,
1517 [pbn_b2_bt_1_115200] = {
1518 .flags = FL_BASE2|FL_BASE_BARS,
1520 .base_baud = 115200,
1523 [pbn_b2_bt_2_115200] = {
1524 .flags = FL_BASE2|FL_BASE_BARS,
1526 .base_baud = 115200,
1529 [pbn_b2_bt_4_115200] = {
1530 .flags = FL_BASE2|FL_BASE_BARS,
1532 .base_baud = 115200,
1536 [pbn_b2_bt_2_921600] = {
1537 .flags = FL_BASE2|FL_BASE_BARS,
1539 .base_baud = 921600,
1542 [pbn_b2_bt_4_921600] = {
1543 .flags = FL_BASE2|FL_BASE_BARS,
1545 .base_baud = 921600,
1549 [pbn_b3_2_115200] = {
1552 .base_baud = 115200,
1555 [pbn_b3_4_115200] = {
1558 .base_baud = 115200,
1561 [pbn_b3_8_115200] = {
1564 .base_baud = 115200,
1569 * Entries following this are board-specific.
1578 .base_baud = 921600,
1579 .uart_offset = 0x400,
1583 .flags = FL_BASE2|FL_BASE_BARS,
1585 .base_baud = 921600,
1586 .uart_offset = 0x400,
1590 .flags = FL_BASE2|FL_BASE_BARS,
1592 .base_baud = 921600,
1593 .uart_offset = 0x400,
1597 [pbn_exsys_4055] = {
1600 .base_baud = 115200,
1604 /* I think this entry is broken - the first_offset looks wrong --rmk */
1605 [pbn_plx_romulus] = {
1608 .base_baud = 921600,
1609 .uart_offset = 8 << 2,
1611 .first_offset = 0x03,
1615 * This board uses the size of PCI Base region 0 to
1616 * signal now many ports are available
1619 .flags = FL_BASE0|FL_REGION_SZ_CAP,
1621 .base_baud = 115200,
1626 * EKF addition for i960 Boards form EKF with serial port.
1629 [pbn_intel_i960] = {
1632 .base_baud = 921600,
1633 .uart_offset = 8 << 2,
1635 .first_offset = 0x10000,
1638 .flags = FL_BASE0|FL_NOIRQ,
1640 .base_baud = 458333,
1643 .first_offset = 0x20178,
1647 * Computone - uses IOMEM.
1649 [pbn_computone_4] = {
1652 .base_baud = 921600,
1653 .uart_offset = 0x40,
1655 .first_offset = 0x200,
1657 [pbn_computone_6] = {
1660 .base_baud = 921600,
1661 .uart_offset = 0x40,
1663 .first_offset = 0x200,
1665 [pbn_computone_8] = {
1668 .base_baud = 921600,
1669 .uart_offset = 0x40,
1671 .first_offset = 0x200,
1676 .base_baud = 460800,
1681 * Exar Corp. XR17C15[248] Dual/Quad/Octal UART
1682 * Only basic 16550A support.
1683 * XR17C15[24] are not tested, but they should work.
1685 [pbn_exar_XR17C152] = {
1688 .base_baud = 921600,
1689 .uart_offset = 0x200,
1691 [pbn_exar_XR17C154] = {
1694 .base_baud = 921600,
1695 .uart_offset = 0x200,
1697 [pbn_exar_XR17C158] = {
1700 .base_baud = 921600,
1701 .uart_offset = 0x200,
1704 * PA Semi PWRficient PA6T-1682M on-chip UART
1706 [pbn_pasemi_1682M] = {
1709 .base_baud = 8333333,
1713 static const struct pci_device_id softmodem_blacklist[] = {
1714 { PCI_VDEVICE ( AL, 0x5457 ), }, /* ALi Corporation M5457 AC'97 Modem */
1718 * Given a complete unknown PCI device, try to use some heuristics to
1719 * guess what the configuration might be, based on the pitiful PCI
1720 * serial specs. Returns 0 on success, 1 on failure.
1722 static int __devinit
1723 serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
1725 const struct pci_device_id *blacklist;
1726 int num_iomem, num_port, first_port = -1, i;
1729 * If it is not a communications device or the programming
1730 * interface is greater than 6, give up.
1732 * (Should we try to make guesses for multiport serial devices
1735 if ((((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL) &&
1736 ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MODEM)) ||
1737 (dev->class & 0xff) > 6)
1741 * Do not access blacklisted devices that are known not to
1742 * feature serial ports.
1744 for (blacklist = softmodem_blacklist;
1745 blacklist < softmodem_blacklist + ARRAY_SIZE(softmodem_blacklist);
1747 if (dev->vendor == blacklist->vendor &&
1748 dev->device == blacklist->device)
1752 num_iomem = num_port = 0;
1753 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
1754 if (pci_resource_flags(dev, i) & IORESOURCE_IO) {
1756 if (first_port == -1)
1759 if (pci_resource_flags(dev, i) & IORESOURCE_MEM)
1764 * If there is 1 or 0 iomem regions, and exactly one port,
1765 * use it. We guess the number of ports based on the IO
1768 if (num_iomem <= 1 && num_port == 1) {
1769 board->flags = first_port;
1770 board->num_ports = pci_resource_len(dev, first_port) / 8;
1775 * Now guess if we've got a board which indexes by BARs.
1776 * Each IO BAR should be 8 bytes, and they should follow
1781 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
1782 if (pci_resource_flags(dev, i) & IORESOURCE_IO &&
1783 pci_resource_len(dev, i) == 8 &&
1784 (first_port == -1 || (first_port + num_port) == i)) {
1786 if (first_port == -1)
1792 board->flags = first_port | FL_BASE_BARS;
1793 board->num_ports = num_port;
1801 serial_pci_matches(struct pciserial_board *board,
1802 struct pciserial_board *guessed)
1805 board->num_ports == guessed->num_ports &&
1806 board->base_baud == guessed->base_baud &&
1807 board->uart_offset == guessed->uart_offset &&
1808 board->reg_shift == guessed->reg_shift &&
1809 board->first_offset == guessed->first_offset;
1812 struct serial_private *
1813 pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board)
1815 struct uart_port serial_port;
1816 struct serial_private *priv;
1817 struct pci_serial_quirk *quirk;
1818 int rc, nr_ports, i;
1820 nr_ports = board->num_ports;
1823 * Find an init and setup quirks.
1825 quirk = find_quirk(dev);
1828 * Run the new-style initialization function.
1829 * The initialization function returns:
1831 * 0 - use board->num_ports
1832 * >0 - number of ports
1835 rc = quirk->init(dev);
1844 priv = kzalloc(sizeof(struct serial_private) +
1845 sizeof(unsigned int) * nr_ports,
1848 priv = ERR_PTR(-ENOMEM);
1853 priv->quirk = quirk;
1855 memset(&serial_port, 0, sizeof(struct uart_port));
1856 serial_port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;
1857 serial_port.uartclk = board->base_baud * 16;
1858 serial_port.irq = get_pci_irq(dev, board);
1859 serial_port.dev = &dev->dev;
1861 for (i = 0; i < nr_ports; i++) {
1862 if (quirk->setup(priv, board, &serial_port, i))
1865 #ifdef SERIAL_DEBUG_PCI
1866 printk("Setup PCI port: port %x, irq %d, type %d\n",
1867 serial_port.iobase, serial_port.irq, serial_port.iotype);
1870 priv->line[i] = serial8250_register_port(&serial_port);
1871 if (priv->line[i] < 0) {
1872 printk(KERN_WARNING "Couldn't register serial port %s: %d\n", pci_name(dev), priv->line[i]);
1887 EXPORT_SYMBOL_GPL(pciserial_init_ports);
1889 void pciserial_remove_ports(struct serial_private *priv)
1891 struct pci_serial_quirk *quirk;
1894 for (i = 0; i < priv->nr; i++)
1895 serial8250_unregister_port(priv->line[i]);
1897 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
1898 if (priv->remapped_bar[i])
1899 iounmap(priv->remapped_bar[i]);
1900 priv->remapped_bar[i] = NULL;
1904 * Find the exit quirks.
1906 quirk = find_quirk(priv->dev);
1908 quirk->exit(priv->dev);
1912 EXPORT_SYMBOL_GPL(pciserial_remove_ports);
1914 void pciserial_suspend_ports(struct serial_private *priv)
1918 for (i = 0; i < priv->nr; i++)
1919 if (priv->line[i] >= 0)
1920 serial8250_suspend_port(priv->line[i]);
1922 EXPORT_SYMBOL_GPL(pciserial_suspend_ports);
1924 void pciserial_resume_ports(struct serial_private *priv)
1929 * Ensure that the board is correctly configured.
1931 if (priv->quirk->init)
1932 priv->quirk->init(priv->dev);
1934 for (i = 0; i < priv->nr; i++)
1935 if (priv->line[i] >= 0)
1936 serial8250_resume_port(priv->line[i]);
1938 EXPORT_SYMBOL_GPL(pciserial_resume_ports);
1941 * Probe one serial board. Unfortunately, there is no rhyme nor reason
1942 * to the arrangement of serial ports on a PCI card.
1944 static int __devinit
1945 pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent)
1947 struct serial_private *priv;
1948 struct pciserial_board *board, tmp;
1951 if (ent->driver_data >= ARRAY_SIZE(pci_boards)) {
1952 printk(KERN_ERR "pci_init_one: invalid driver_data: %ld\n",
1957 board = &pci_boards[ent->driver_data];
1959 rc = pci_enable_device(dev);
1963 if (ent->driver_data == pbn_default) {
1965 * Use a copy of the pci_board entry for this;
1966 * avoid changing entries in the table.
1968 memcpy(&tmp, board, sizeof(struct pciserial_board));
1972 * We matched one of our class entries. Try to
1973 * determine the parameters of this board.
1975 rc = serial_pci_guess_board(dev, board);
1980 * We matched an explicit entry. If we are able to
1981 * detect this boards settings with our heuristic,
1982 * then we no longer need this entry.
1984 memcpy(&tmp, &pci_boards[pbn_default],
1985 sizeof(struct pciserial_board));
1986 rc = serial_pci_guess_board(dev, &tmp);
1987 if (rc == 0 && serial_pci_matches(board, &tmp))
1988 moan_device("Redundant entry in serial pci_table.",
1992 priv = pciserial_init_ports(dev, board);
1993 if (!IS_ERR(priv)) {
1994 pci_set_drvdata(dev, priv);
2001 pci_disable_device(dev);
2005 static void __devexit pciserial_remove_one(struct pci_dev *dev)
2007 struct serial_private *priv = pci_get_drvdata(dev);
2009 pci_set_drvdata(dev, NULL);
2011 pciserial_remove_ports(priv);
2013 pci_disable_device(dev);
2017 static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state)
2019 struct serial_private *priv = pci_get_drvdata(dev);
2022 pciserial_suspend_ports(priv);
2024 pci_save_state(dev);
2025 pci_set_power_state(dev, pci_choose_state(dev, state));
2029 static int pciserial_resume_one(struct pci_dev *dev)
2032 struct serial_private *priv = pci_get_drvdata(dev);
2034 pci_set_power_state(dev, PCI_D0);
2035 pci_restore_state(dev);
2039 * The device may have been disabled. Re-enable it.
2041 err = pci_enable_device(dev);
2045 pciserial_resume_ports(priv);
2051 static struct pci_device_id serial_pci_tbl[] = {
2052 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
2053 PCI_SUBVENDOR_ID_CONNECT_TECH,
2054 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0,
2056 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
2057 PCI_SUBVENDOR_ID_CONNECT_TECH,
2058 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232, 0, 0,
2060 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
2061 PCI_SUBVENDOR_ID_CONNECT_TECH,
2062 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232, 0, 0,
2064 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2065 PCI_SUBVENDOR_ID_CONNECT_TECH,
2066 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0,
2068 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2069 PCI_SUBVENDOR_ID_CONNECT_TECH,
2070 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232, 0, 0,
2072 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2073 PCI_SUBVENDOR_ID_CONNECT_TECH,
2074 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232, 0, 0,
2076 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2077 PCI_SUBVENDOR_ID_CONNECT_TECH,
2078 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485, 0, 0,
2080 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2081 PCI_SUBVENDOR_ID_CONNECT_TECH,
2082 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4, 0, 0,
2084 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2085 PCI_SUBVENDOR_ID_CONNECT_TECH,
2086 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485, 0, 0,
2088 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2089 PCI_SUBVENDOR_ID_CONNECT_TECH,
2090 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2, 0, 0,
2092 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2093 PCI_SUBVENDOR_ID_CONNECT_TECH,
2094 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485, 0, 0,
2096 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2097 PCI_SUBVENDOR_ID_CONNECT_TECH,
2098 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6, 0, 0,
2100 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2101 PCI_SUBVENDOR_ID_CONNECT_TECH,
2102 PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1, 0, 0,
2104 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2105 PCI_SUBVENDOR_ID_CONNECT_TECH,
2106 PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1, 0, 0,
2108 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2109 PCI_SUBVENDOR_ID_CONNECT_TECH,
2110 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_20MHZ, 0, 0,
2112 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
2113 PCI_SUBVENDOR_ID_CONNECT_TECH,
2114 PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_2, 0, 0,
2116 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
2117 PCI_SUBVENDOR_ID_CONNECT_TECH,
2118 PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_4, 0, 0,
2120 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
2121 PCI_VENDOR_ID_AFAVLAB,
2122 PCI_SUBDEVICE_ID_AFAVLAB_P061, 0, 0,
2124 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
2125 PCI_SUBVENDOR_ID_CONNECT_TECH,
2126 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_232, 0, 0,
2127 pbn_b0_2_1843200_200 },
2128 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
2129 PCI_SUBVENDOR_ID_CONNECT_TECH,
2130 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_232, 0, 0,
2131 pbn_b0_4_1843200_200 },
2132 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
2133 PCI_SUBVENDOR_ID_CONNECT_TECH,
2134 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_232, 0, 0,
2135 pbn_b0_8_1843200_200 },
2136 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
2137 PCI_SUBVENDOR_ID_CONNECT_TECH,
2138 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_1_1, 0, 0,
2139 pbn_b0_2_1843200_200 },
2140 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
2141 PCI_SUBVENDOR_ID_CONNECT_TECH,
2142 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_2, 0, 0,
2143 pbn_b0_4_1843200_200 },
2144 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
2145 PCI_SUBVENDOR_ID_CONNECT_TECH,
2146 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4, 0, 0,
2147 pbn_b0_8_1843200_200 },
2148 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
2149 PCI_SUBVENDOR_ID_CONNECT_TECH,
2150 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2, 0, 0,
2151 pbn_b0_2_1843200_200 },
2152 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
2153 PCI_SUBVENDOR_ID_CONNECT_TECH,
2154 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4, 0, 0,
2155 pbn_b0_4_1843200_200 },
2156 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
2157 PCI_SUBVENDOR_ID_CONNECT_TECH,
2158 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8, 0, 0,
2159 pbn_b0_8_1843200_200 },
2160 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
2161 PCI_SUBVENDOR_ID_CONNECT_TECH,
2162 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_485, 0, 0,
2163 pbn_b0_2_1843200_200 },
2164 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
2165 PCI_SUBVENDOR_ID_CONNECT_TECH,
2166 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485, 0, 0,
2167 pbn_b0_4_1843200_200 },
2168 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
2169 PCI_SUBVENDOR_ID_CONNECT_TECH,
2170 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485, 0, 0,
2171 pbn_b0_8_1843200_200 },
2173 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_U530,
2174 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2175 pbn_b2_bt_1_115200 },
2176 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM2,
2177 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2178 pbn_b2_bt_2_115200 },
2179 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM422,
2180 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2181 pbn_b2_bt_4_115200 },
2182 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM232,
2183 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2184 pbn_b2_bt_2_115200 },
2185 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM4,
2186 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2187 pbn_b2_bt_4_115200 },
2188 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM8,
2189 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2191 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM8,
2192 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2195 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_GTEK_SERIAL2,
2196 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2197 pbn_b2_bt_2_115200 },
2198 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_SPCOM200,
2199 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2200 pbn_b2_bt_2_921600 },
2202 * VScom SPCOM800, from sl@s.pl
2204 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_SPCOM800,
2205 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2207 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_1077,
2208 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2210 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2211 PCI_SUBVENDOR_ID_KEYSPAN,
2212 PCI_SUBDEVICE_ID_KEYSPAN_SX2, 0, 0,
2214 { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_QUADMODEM,
2215 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2217 { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_DUALMODEM,
2218 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2220 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
2221 PCI_VENDOR_ID_ESDGMBH,
2222 PCI_DEVICE_ID_ESDGMBH_CPCIASIO4, 0, 0,
2224 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2225 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
2226 PCI_SUBDEVICE_ID_CHASE_PCIFAST4, 0, 0,
2228 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2229 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
2230 PCI_SUBDEVICE_ID_CHASE_PCIFAST8, 0, 0,
2232 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2233 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
2234 PCI_SUBDEVICE_ID_CHASE_PCIFAST16, 0, 0,
2236 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2237 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
2238 PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC, 0, 0,
2240 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2241 PCI_SUBVENDOR_ID_CHASE_PCIRAS,
2242 PCI_SUBDEVICE_ID_CHASE_PCIRAS4, 0, 0,
2244 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2245 PCI_SUBVENDOR_ID_CHASE_PCIRAS,
2246 PCI_SUBDEVICE_ID_CHASE_PCIRAS8, 0, 0,
2248 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2249 PCI_SUBVENDOR_ID_EXSYS,
2250 PCI_SUBDEVICE_ID_EXSYS_4055, 0, 0,
2253 * Megawolf Romulus PCI Serial Card, from Mike Hudson
2256 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_ROMULUS,
2257 0x10b5, 0x106a, 0, 0,
2259 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSC100,
2260 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2262 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC100,
2263 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2265 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100D,
2266 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2268 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100M,
2269 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2271 { PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_OXSEMI_16PCI954,
2272 PCI_VENDOR_ID_SPECIALIX, PCI_SUBDEVICE_ID_SPECIALIX_SPEED4, 0, 0,
2274 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
2275 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL, 0, 0,
2279 * The below card is a little controversial since it is the
2280 * subject of a PCI vendor/device ID clash. (See
2281 * www.ussg.iu.edu/hypermail/linux/kernel/0303.1/0516.html).
2282 * For now just used the hex ID 0x950a.
2284 { PCI_VENDOR_ID_OXSEMI, 0x950a,
2285 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2287 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
2288 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2290 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI952,
2291 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2292 pbn_b0_bt_2_921600 },
2295 * SBS Technologies, Inc. P-Octal and PMC-OCTPRO cards,
2296 * from skokodyn@yahoo.com
2298 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
2299 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO232, 0, 0,
2301 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
2302 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO422, 0, 0,
2304 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
2305 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL232, 0, 0,
2307 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
2308 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL422, 0, 0,
2312 * Digitan DS560-558, from jimd@esoft.com
2314 { PCI_VENDOR_ID_ATT, PCI_DEVICE_ID_ATT_VENUS_MODEM,
2315 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2319 * Titan Electronic cards
2320 * The 400L and 800L have a custom setup quirk.
2322 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100,
2323 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2325 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200,
2326 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2328 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400,
2329 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2331 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800B,
2332 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2334 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100L,
2335 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2337 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200L,
2338 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2339 pbn_b1_bt_2_921600 },
2340 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400L,
2341 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2342 pbn_b0_bt_4_921600 },
2343 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800L,
2344 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2345 pbn_b0_bt_8_921600 },
2347 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_550,
2348 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2350 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_650,
2351 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2353 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_850,
2354 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2356 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_550,
2357 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2358 pbn_b2_bt_2_921600 },
2359 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_650,
2360 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2361 pbn_b2_bt_2_921600 },
2362 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_850,
2363 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2364 pbn_b2_bt_2_921600 },
2365 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_550,
2366 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2367 pbn_b2_bt_4_921600 },
2368 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_650,
2369 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2370 pbn_b2_bt_4_921600 },
2371 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_850,
2372 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2373 pbn_b2_bt_4_921600 },
2374 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_550,
2375 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2377 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_650,
2378 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2380 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_850,
2381 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2383 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_550,
2384 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2385 pbn_b0_bt_2_921600 },
2386 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_650,
2387 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2388 pbn_b0_bt_2_921600 },
2389 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_850,
2390 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2391 pbn_b0_bt_2_921600 },
2392 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_550,
2393 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2394 pbn_b0_bt_4_921600 },
2395 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_650,
2396 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2397 pbn_b0_bt_4_921600 },
2398 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_850,
2399 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2400 pbn_b0_bt_4_921600 },
2401 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_550,
2402 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2403 pbn_b0_bt_8_921600 },
2404 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_650,
2405 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2406 pbn_b0_bt_8_921600 },
2407 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_850,
2408 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2409 pbn_b0_bt_8_921600 },
2412 * Computone devices submitted by Doug McNash dmcnash@computone.com
2414 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
2415 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG4,
2416 0, 0, pbn_computone_4 },
2417 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
2418 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG8,
2419 0, 0, pbn_computone_8 },
2420 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
2421 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG6,
2422 0, 0, pbn_computone_6 },
2424 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI95N,
2425 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2427 { PCI_VENDOR_ID_TIMEDIA, PCI_DEVICE_ID_TIMEDIA_1889,
2428 PCI_VENDOR_ID_TIMEDIA, PCI_ANY_ID, 0, 0,
2429 pbn_b0_bt_1_921600 },
2432 * AFAVLAB serial card, from Harald Welte <laforge@gnumonks.org>
2434 { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P028,
2435 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2436 pbn_b0_bt_8_115200 },
2437 { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P030,
2438 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2439 pbn_b0_bt_8_115200 },
2441 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_DSERIAL,
2442 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2443 pbn_b0_bt_2_115200 },
2444 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATRO_A,
2445 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2446 pbn_b0_bt_2_115200 },
2447 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATRO_B,
2448 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2449 pbn_b0_bt_2_115200 },
2450 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_OCTO_A,
2451 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2452 pbn_b0_bt_4_460800 },
2453 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_OCTO_B,
2454 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2455 pbn_b0_bt_4_460800 },
2456 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PORT_PLUS,
2457 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2458 pbn_b0_bt_2_460800 },
2459 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUAD_A,
2460 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2461 pbn_b0_bt_2_460800 },
2462 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUAD_B,
2463 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2464 pbn_b0_bt_2_460800 },
2465 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_SSERIAL,
2466 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2467 pbn_b0_bt_1_115200 },
2468 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PORT_650,
2469 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2470 pbn_b0_bt_1_460800 },
2473 * Korenix Jetcard F0/F1 cards (JC1204, JC1208, JC1404, JC1408).
2474 * Cards are identified by their subsystem vendor IDs, which
2475 * (in hex) match the model number.
2477 * Note that JC140x are RS422/485 cards which require ox950
2478 * ACR = 0x10, and as such are not currently fully supported.
2480 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
2481 0x1204, 0x0004, 0, 0,
2483 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
2484 0x1208, 0x0004, 0, 0,
2486 /* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
2487 0x1402, 0x0002, 0, 0,
2488 pbn_b0_2_921600 }, */
2489 /* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
2490 0x1404, 0x0004, 0, 0,
2491 pbn_b0_4_921600 }, */
2492 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF1,
2493 0x1208, 0x0004, 0, 0,
2497 * Dell Remote Access Card 4 - Tim_T_Murphy@Dell.com
2499 { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RAC4,
2500 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2504 * Dell Remote Access Card III - Tim_T_Murphy@Dell.com
2506 { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RACIII,
2507 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2511 * RAStel 2 port modem, gerg@moreton.com.au
2513 { PCI_VENDOR_ID_MORETON, PCI_DEVICE_ID_RASTEL_2PORT,
2514 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2515 pbn_b2_bt_2_115200 },
2518 * EKF addition for i960 Boards form EKF with serial port
2520 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_80960_RP,
2521 0xE4BF, PCI_ANY_ID, 0, 0,
2525 * Xircom Cardbus/Ethernet combos
2527 { PCI_VENDOR_ID_XIRCOM, PCI_DEVICE_ID_XIRCOM_X3201_MDM,
2528 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2531 * Xircom RBM56G cardbus modem - Dirk Arnold (temp entry)
2533 { PCI_VENDOR_ID_XIRCOM, PCI_DEVICE_ID_XIRCOM_RBM56G,
2534 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2538 * Untested PCI modems, sent in from various folks...
2542 * Elsa Model 56K PCI Modem, from Andreas Rath <arh@01019freenet.de>
2544 { PCI_VENDOR_ID_ROCKWELL, 0x1004,
2545 0x1048, 0x1500, 0, 0,
2548 { PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC3,
2555 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA,
2556 PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_RMP3, 0, 0,
2558 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA,
2559 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2561 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_AUX,
2562 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2565 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM2,
2566 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2568 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM4,
2569 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2571 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM8,
2572 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2576 * Exar Corp. XR17C15[248] Dual/Quad/Octal UART
2578 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
2579 PCI_ANY_ID, PCI_ANY_ID,
2581 0, pbn_exar_XR17C152 },
2582 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
2583 PCI_ANY_ID, PCI_ANY_ID,
2585 0, pbn_exar_XR17C154 },
2586 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
2587 PCI_ANY_ID, PCI_ANY_ID,
2589 0, pbn_exar_XR17C158 },
2592 * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke)
2594 { PCI_VENDOR_ID_TOPIC, PCI_DEVICE_ID_TOPIC_TP560,
2595 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2600 { PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8872,
2601 PCI_ANY_ID, PCI_ANY_ID,
2603 pbn_b1_bt_1_115200 },
2608 { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200,
2609 PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */
2613 * Perle PCI-RAS cards
2615 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
2616 PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS4,
2617 0, 0, pbn_b2_4_921600 },
2618 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
2619 PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS8,
2620 0, 0, pbn_b2_8_921600 },
2623 * Mainpine series cards: Fairly standard layout but fools
2624 * parts of the autodetect in some cases and uses otherwise
2625 * unmatched communications subclasses in the PCI Express case
2628 { /* RockForceDUO */
2629 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2630 PCI_VENDOR_ID_MAINPINE, 0x0200,
2631 0, 0, pbn_b0_2_115200 },
2632 { /* RockForceQUATRO */
2633 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2634 PCI_VENDOR_ID_MAINPINE, 0x0300,
2635 0, 0, pbn_b0_4_115200 },
2636 { /* RockForceDUO+ */
2637 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2638 PCI_VENDOR_ID_MAINPINE, 0x0400,
2639 0, 0, pbn_b0_2_115200 },
2640 { /* RockForceQUATRO+ */
2641 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2642 PCI_VENDOR_ID_MAINPINE, 0x0500,
2643 0, 0, pbn_b0_4_115200 },
2645 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2646 PCI_VENDOR_ID_MAINPINE, 0x0600,
2647 0, 0, pbn_b0_2_115200 },
2649 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2650 PCI_VENDOR_ID_MAINPINE, 0x0700,
2651 0, 0, pbn_b0_4_115200 },
2652 { /* RockForceOCTO+ */
2653 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2654 PCI_VENDOR_ID_MAINPINE, 0x0800,
2655 0, 0, pbn_b0_8_115200 },
2656 { /* RockForceDUO+ */
2657 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2658 PCI_VENDOR_ID_MAINPINE, 0x0C00,
2659 0, 0, pbn_b0_2_115200 },
2660 { /* RockForceQUARTRO+ */
2661 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2662 PCI_VENDOR_ID_MAINPINE, 0x0D00,
2663 0, 0, pbn_b0_4_115200 },
2664 { /* RockForceOCTO+ */
2665 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2666 PCI_VENDOR_ID_MAINPINE, 0x1D00,
2667 0, 0, pbn_b0_8_115200 },
2669 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2670 PCI_VENDOR_ID_MAINPINE, 0x2000,
2671 0, 0, pbn_b0_1_115200 },
2673 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2674 PCI_VENDOR_ID_MAINPINE, 0x2100,
2675 0, 0, pbn_b0_1_115200 },
2677 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2678 PCI_VENDOR_ID_MAINPINE, 0x2200,
2679 0, 0, pbn_b0_2_115200 },
2681 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2682 PCI_VENDOR_ID_MAINPINE, 0x2300,
2683 0, 0, pbn_b0_2_115200 },
2685 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2686 PCI_VENDOR_ID_MAINPINE, 0x2400,
2687 0, 0, pbn_b0_4_115200 },
2689 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2690 PCI_VENDOR_ID_MAINPINE, 0x2500,
2691 0, 0, pbn_b0_4_115200 },
2693 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2694 PCI_VENDOR_ID_MAINPINE, 0x2600,
2695 0, 0, pbn_b0_8_115200 },
2697 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2698 PCI_VENDOR_ID_MAINPINE, 0x2700,
2699 0, 0, pbn_b0_8_115200 },
2700 { /* IQ Express D1 */
2701 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2702 PCI_VENDOR_ID_MAINPINE, 0x3000,
2703 0, 0, pbn_b0_1_115200 },
2704 { /* IQ Express F1 */
2705 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2706 PCI_VENDOR_ID_MAINPINE, 0x3100,
2707 0, 0, pbn_b0_1_115200 },
2708 { /* IQ Express D2 */
2709 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2710 PCI_VENDOR_ID_MAINPINE, 0x3200,
2711 0, 0, pbn_b0_2_115200 },
2712 { /* IQ Express F2 */
2713 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2714 PCI_VENDOR_ID_MAINPINE, 0x3300,
2715 0, 0, pbn_b0_2_115200 },
2716 { /* IQ Express D4 */
2717 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2718 PCI_VENDOR_ID_MAINPINE, 0x3400,
2719 0, 0, pbn_b0_4_115200 },
2720 { /* IQ Express F4 */
2721 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2722 PCI_VENDOR_ID_MAINPINE, 0x3500,
2723 0, 0, pbn_b0_4_115200 },
2724 { /* IQ Express D8 */
2725 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2726 PCI_VENDOR_ID_MAINPINE, 0x3C00,
2727 0, 0, pbn_b0_8_115200 },
2728 { /* IQ Express F8 */
2729 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2730 PCI_VENDOR_ID_MAINPINE, 0x3D00,
2731 0, 0, pbn_b0_8_115200 },
2735 * PA Semi PA6T-1682M on-chip UART
2737 { PCI_VENDOR_ID_PASEMI, 0xa004,
2738 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2742 * ADDI-DATA GmbH communication cards <info@addi-data.com>
2744 { PCI_VENDOR_ID_ADDIDATA,
2745 PCI_DEVICE_ID_ADDIDATA_APCI7500,
2752 { PCI_VENDOR_ID_ADDIDATA,
2753 PCI_DEVICE_ID_ADDIDATA_APCI7420,
2760 { PCI_VENDOR_ID_ADDIDATA,
2761 PCI_DEVICE_ID_ADDIDATA_APCI7300,
2768 { PCI_VENDOR_ID_ADDIDATA_OLD,
2769 PCI_DEVICE_ID_ADDIDATA_APCI7800,
2776 { PCI_VENDOR_ID_ADDIDATA,
2777 PCI_DEVICE_ID_ADDIDATA_APCI7500_2,
2784 { PCI_VENDOR_ID_ADDIDATA,
2785 PCI_DEVICE_ID_ADDIDATA_APCI7420_2,
2792 { PCI_VENDOR_ID_ADDIDATA,
2793 PCI_DEVICE_ID_ADDIDATA_APCI7300_2,
2800 { PCI_VENDOR_ID_ADDIDATA,
2801 PCI_DEVICE_ID_ADDIDATA_APCI7500_3,
2808 { PCI_VENDOR_ID_ADDIDATA,
2809 PCI_DEVICE_ID_ADDIDATA_APCI7420_3,
2816 { PCI_VENDOR_ID_ADDIDATA,
2817 PCI_DEVICE_ID_ADDIDATA_APCI7300_3,
2824 { PCI_VENDOR_ID_ADDIDATA,
2825 PCI_DEVICE_ID_ADDIDATA_APCI7800_3,
2833 * These entries match devices with class COMMUNICATION_SERIAL,
2834 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
2836 { PCI_ANY_ID, PCI_ANY_ID,
2837 PCI_ANY_ID, PCI_ANY_ID,
2838 PCI_CLASS_COMMUNICATION_SERIAL << 8,
2839 0xffff00, pbn_default },
2840 { PCI_ANY_ID, PCI_ANY_ID,
2841 PCI_ANY_ID, PCI_ANY_ID,
2842 PCI_CLASS_COMMUNICATION_MODEM << 8,
2843 0xffff00, pbn_default },
2844 { PCI_ANY_ID, PCI_ANY_ID,
2845 PCI_ANY_ID, PCI_ANY_ID,
2846 PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
2847 0xffff00, pbn_default },
2851 static struct pci_driver serial_pci_driver = {
2853 .probe = pciserial_init_one,
2854 .remove = __devexit_p(pciserial_remove_one),
2856 .suspend = pciserial_suspend_one,
2857 .resume = pciserial_resume_one,
2859 .id_table = serial_pci_tbl,
2862 static int __init serial8250_pci_init(void)
2864 return pci_register_driver(&serial_pci_driver);
2867 static void __exit serial8250_pci_exit(void)
2869 pci_unregister_driver(&serial_pci_driver);
2872 module_init(serial8250_pci_init);
2873 module_exit(serial8250_pci_exit);
2875 MODULE_LICENSE("GPL");
2876 MODULE_DESCRIPTION("Generic 8250/16x50 PCI serial probe module");
2877 MODULE_DEVICE_TABLE(pci, serial_pci_tbl);