2 * Probe module for 8250/16550-type PCI serial ports.
4 * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
6 * Copyright (C) 2001 Russell King, All Rights Reserved.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License.
12 #include <linux/module.h>
13 #include <linux/init.h>
14 #include <linux/pci.h>
15 #include <linux/string.h>
16 #include <linux/kernel.h>
17 #include <linux/slab.h>
18 #include <linux/delay.h>
19 #include <linux/tty.h>
20 #include <linux/serial_reg.h>
21 #include <linux/serial_core.h>
22 #include <linux/8250_pci.h>
23 #include <linux/bitops.h>
25 #include <asm/byteorder.h>
30 #undef SERIAL_DEBUG_PCI
33 * init function returns:
34 * > 0 - number of ports
35 * = 0 - use board->num_ports
38 struct pci_serial_quirk {
43 int (*probe)(struct pci_dev *dev);
44 int (*init)(struct pci_dev *dev);
45 int (*setup)(struct serial_private *,
46 const struct pciserial_board *,
47 struct uart_8250_port *, int);
48 void (*exit)(struct pci_dev *dev);
51 #define PCI_NUM_BAR_RESOURCES 6
53 struct serial_private {
56 void __iomem *remapped_bar[PCI_NUM_BAR_RESOURCES];
57 struct pci_serial_quirk *quirk;
61 static int pci_default_setup(struct serial_private*,
62 const struct pciserial_board*, struct uart_8250_port *, int);
64 static void moan_device(const char *str, struct pci_dev *dev)
68 "Please send the output of lspci -vv, this\n"
69 "message (0x%04x,0x%04x,0x%04x,0x%04x), the\n"
70 "manufacturer and name of serial board or\n"
71 "modem board to rmk+serial@arm.linux.org.uk.\n",
72 pci_name(dev), str, dev->vendor, dev->device,
73 dev->subsystem_vendor, dev->subsystem_device);
77 setup_port(struct serial_private *priv, struct uart_8250_port *port,
78 int bar, int offset, int regshift)
80 struct pci_dev *dev = priv->dev;
81 unsigned long base, len;
83 if (bar >= PCI_NUM_BAR_RESOURCES)
86 base = pci_resource_start(dev, bar);
88 if (pci_resource_flags(dev, bar) & IORESOURCE_MEM) {
89 len = pci_resource_len(dev, bar);
91 if (!priv->remapped_bar[bar])
92 priv->remapped_bar[bar] = ioremap_nocache(base, len);
93 if (!priv->remapped_bar[bar])
96 port->port.iotype = UPIO_MEM;
97 port->port.iobase = 0;
98 port->port.mapbase = base + offset;
99 port->port.membase = priv->remapped_bar[bar] + offset;
100 port->port.regshift = regshift;
102 port->port.iotype = UPIO_PORT;
103 port->port.iobase = base + offset;
104 port->port.mapbase = 0;
105 port->port.membase = NULL;
106 port->port.regshift = 0;
112 * ADDI-DATA GmbH communication cards <info@addi-data.com>
114 static int addidata_apci7800_setup(struct serial_private *priv,
115 const struct pciserial_board *board,
116 struct uart_8250_port *port, int idx)
118 unsigned int bar = 0, offset = board->first_offset;
119 bar = FL_GET_BASE(board->flags);
122 offset += idx * board->uart_offset;
123 } else if ((idx >= 2) && (idx < 4)) {
125 offset += ((idx - 2) * board->uart_offset);
126 } else if ((idx >= 4) && (idx < 6)) {
128 offset += ((idx - 4) * board->uart_offset);
129 } else if (idx >= 6) {
131 offset += ((idx - 6) * board->uart_offset);
134 return setup_port(priv, port, bar, offset, board->reg_shift);
138 * AFAVLAB uses a different mixture of BARs and offsets
139 * Not that ugly ;) -- HW
142 afavlab_setup(struct serial_private *priv, const struct pciserial_board *board,
143 struct uart_8250_port *port, int idx)
145 unsigned int bar, offset = board->first_offset;
147 bar = FL_GET_BASE(board->flags);
152 offset += (idx - 4) * board->uart_offset;
155 return setup_port(priv, port, bar, offset, board->reg_shift);
159 * HP's Remote Management Console. The Diva chip came in several
160 * different versions. N-class, L2000 and A500 have two Diva chips, each
161 * with 3 UARTs (the third UART on the second chip is unused). Superdome
162 * and Keystone have one Diva chip with 3 UARTs. Some later machines have
163 * one Diva chip, but it has been expanded to 5 UARTs.
165 static int pci_hp_diva_init(struct pci_dev *dev)
169 switch (dev->subsystem_device) {
170 case PCI_DEVICE_ID_HP_DIVA_TOSCA1:
171 case PCI_DEVICE_ID_HP_DIVA_HALFDOME:
172 case PCI_DEVICE_ID_HP_DIVA_KEYSTONE:
173 case PCI_DEVICE_ID_HP_DIVA_EVEREST:
176 case PCI_DEVICE_ID_HP_DIVA_TOSCA2:
179 case PCI_DEVICE_ID_HP_DIVA_MAESTRO:
182 case PCI_DEVICE_ID_HP_DIVA_POWERBAR:
183 case PCI_DEVICE_ID_HP_DIVA_HURRICANE:
192 * HP's Diva chip puts the 4th/5th serial port further out, and
193 * some serial ports are supposed to be hidden on certain models.
196 pci_hp_diva_setup(struct serial_private *priv,
197 const struct pciserial_board *board,
198 struct uart_8250_port *port, int idx)
200 unsigned int offset = board->first_offset;
201 unsigned int bar = FL_GET_BASE(board->flags);
203 switch (priv->dev->subsystem_device) {
204 case PCI_DEVICE_ID_HP_DIVA_MAESTRO:
208 case PCI_DEVICE_ID_HP_DIVA_EVEREST:
218 offset += idx * board->uart_offset;
220 return setup_port(priv, port, bar, offset, board->reg_shift);
224 * Added for EKF Intel i960 serial boards
226 static int pci_inteli960ni_init(struct pci_dev *dev)
228 unsigned long oldval;
230 if (!(dev->subsystem_device & 0x1000))
233 /* is firmware started? */
234 pci_read_config_dword(dev, 0x44, (void *)&oldval);
235 if (oldval == 0x00001000L) { /* RESET value */
236 printk(KERN_DEBUG "Local i960 firmware missing");
243 * Some PCI serial cards using the PLX 9050 PCI interface chip require
244 * that the card interrupt be explicitly enabled or disabled. This
245 * seems to be mainly needed on card using the PLX which also use I/O
248 static int pci_plx9050_init(struct pci_dev *dev)
253 if ((pci_resource_flags(dev, 0) & IORESOURCE_MEM) == 0) {
254 moan_device("no memory in bar 0", dev);
259 if (dev->vendor == PCI_VENDOR_ID_PANACOM ||
260 dev->subsystem_vendor == PCI_SUBVENDOR_ID_EXSYS)
263 if ((dev->vendor == PCI_VENDOR_ID_PLX) &&
264 (dev->device == PCI_DEVICE_ID_PLX_ROMULUS))
266 * As the megawolf cards have the int pins active
267 * high, and have 2 UART chips, both ints must be
268 * enabled on the 9050. Also, the UARTS are set in
269 * 16450 mode by default, so we have to enable the
270 * 16C950 'enhanced' mode so that we can use the
275 * enable/disable interrupts
277 p = ioremap_nocache(pci_resource_start(dev, 0), 0x80);
280 writel(irq_config, p + 0x4c);
283 * Read the register back to ensure that it took effect.
291 static void __devexit pci_plx9050_exit(struct pci_dev *dev)
295 if ((pci_resource_flags(dev, 0) & IORESOURCE_MEM) == 0)
301 p = ioremap_nocache(pci_resource_start(dev, 0), 0x80);
306 * Read the register back to ensure that it took effect.
313 #define NI8420_INT_ENABLE_REG 0x38
314 #define NI8420_INT_ENABLE_BIT 0x2000
316 static void __devexit pci_ni8420_exit(struct pci_dev *dev)
319 unsigned long base, len;
320 unsigned int bar = 0;
322 if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
323 moan_device("no memory in bar", dev);
327 base = pci_resource_start(dev, bar);
328 len = pci_resource_len(dev, bar);
329 p = ioremap_nocache(base, len);
333 /* Disable the CPU Interrupt */
334 writel(readl(p + NI8420_INT_ENABLE_REG) & ~(NI8420_INT_ENABLE_BIT),
335 p + NI8420_INT_ENABLE_REG);
341 #define MITE_IOWBSR1 0xc4
342 #define MITE_IOWCR1 0xf4
343 #define MITE_LCIMR1 0x08
344 #define MITE_LCIMR2 0x10
346 #define MITE_LCIMR2_CLR_CPU_IE (1 << 30)
348 static void __devexit pci_ni8430_exit(struct pci_dev *dev)
351 unsigned long base, len;
352 unsigned int bar = 0;
354 if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
355 moan_device("no memory in bar", dev);
359 base = pci_resource_start(dev, bar);
360 len = pci_resource_len(dev, bar);
361 p = ioremap_nocache(base, len);
365 /* Disable the CPU Interrupt */
366 writel(MITE_LCIMR2_CLR_CPU_IE, p + MITE_LCIMR2);
370 /* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */
372 sbs_setup(struct serial_private *priv, const struct pciserial_board *board,
373 struct uart_8250_port *port, int idx)
375 unsigned int bar, offset = board->first_offset;
380 /* first four channels map to 0, 0x100, 0x200, 0x300 */
381 offset += idx * board->uart_offset;
382 } else if (idx < 8) {
383 /* last four channels map to 0x1000, 0x1100, 0x1200, 0x1300 */
384 offset += idx * board->uart_offset + 0xC00;
385 } else /* we have only 8 ports on PMC-OCTALPRO */
388 return setup_port(priv, port, bar, offset, board->reg_shift);
392 * This does initialization for PMC OCTALPRO cards:
393 * maps the device memory, resets the UARTs (needed, bc
394 * if the module is removed and inserted again, the card
395 * is in the sleep mode) and enables global interrupt.
398 /* global control register offset for SBS PMC-OctalPro */
399 #define OCT_REG_CR_OFF 0x500
401 static int sbs_init(struct pci_dev *dev)
405 p = pci_ioremap_bar(dev, 0);
409 /* Set bit-4 Control Register (UART RESET) in to reset the uarts */
410 writeb(0x10, p + OCT_REG_CR_OFF);
412 writeb(0x0, p + OCT_REG_CR_OFF);
414 /* Set bit-2 (INTENABLE) of Control Register */
415 writeb(0x4, p + OCT_REG_CR_OFF);
422 * Disables the global interrupt of PMC-OctalPro
425 static void __devexit sbs_exit(struct pci_dev *dev)
429 p = pci_ioremap_bar(dev, 0);
430 /* FIXME: What if resource_len < OCT_REG_CR_OFF */
432 writeb(0, p + OCT_REG_CR_OFF);
437 * SIIG serial cards have an PCI interface chip which also controls
438 * the UART clocking frequency. Each UART can be clocked independently
439 * (except cards equipped with 4 UARTs) and initial clocking settings
440 * are stored in the EEPROM chip. It can cause problems because this
441 * version of serial driver doesn't support differently clocked UART's
442 * on single PCI card. To prevent this, initialization functions set
443 * high frequency clocking for all UART's on given card. It is safe (I
444 * hope) because it doesn't touch EEPROM settings to prevent conflicts
445 * with other OSes (like M$ DOS).
447 * SIIG support added by Andrey Panin <pazke@donpac.ru>, 10/1999
449 * There is two family of SIIG serial cards with different PCI
450 * interface chip and different configuration methods:
451 * - 10x cards have control registers in IO and/or memory space;
452 * - 20x cards have control registers in standard PCI configuration space.
454 * Note: all 10x cards have PCI device ids 0x10..
455 * all 20x cards have PCI device ids 0x20..
457 * There are also Quartet Serial cards which use Oxford Semiconductor
458 * 16954 quad UART PCI chip clocked by 18.432 MHz quartz.
460 * Note: some SIIG cards are probed by the parport_serial object.
463 #define PCI_DEVICE_ID_SIIG_1S_10x (PCI_DEVICE_ID_SIIG_1S_10x_550 & 0xfffc)
464 #define PCI_DEVICE_ID_SIIG_2S_10x (PCI_DEVICE_ID_SIIG_2S_10x_550 & 0xfff8)
466 static int pci_siig10x_init(struct pci_dev *dev)
471 switch (dev->device & 0xfff8) {
472 case PCI_DEVICE_ID_SIIG_1S_10x: /* 1S */
475 case PCI_DEVICE_ID_SIIG_2S_10x: /* 2S, 2S1P */
478 default: /* 1S1P, 4S */
483 p = ioremap_nocache(pci_resource_start(dev, 0), 0x80);
487 writew(readw(p + 0x28) & data, p + 0x28);
493 #define PCI_DEVICE_ID_SIIG_2S_20x (PCI_DEVICE_ID_SIIG_2S_20x_550 & 0xfffc)
494 #define PCI_DEVICE_ID_SIIG_2S1P_20x (PCI_DEVICE_ID_SIIG_2S1P_20x_550 & 0xfffc)
496 static int pci_siig20x_init(struct pci_dev *dev)
500 /* Change clock frequency for the first UART. */
501 pci_read_config_byte(dev, 0x6f, &data);
502 pci_write_config_byte(dev, 0x6f, data & 0xef);
504 /* If this card has 2 UART, we have to do the same with second UART. */
505 if (((dev->device & 0xfffc) == PCI_DEVICE_ID_SIIG_2S_20x) ||
506 ((dev->device & 0xfffc) == PCI_DEVICE_ID_SIIG_2S1P_20x)) {
507 pci_read_config_byte(dev, 0x73, &data);
508 pci_write_config_byte(dev, 0x73, data & 0xef);
513 static int pci_siig_init(struct pci_dev *dev)
515 unsigned int type = dev->device & 0xff00;
518 return pci_siig10x_init(dev);
519 else if (type == 0x2000)
520 return pci_siig20x_init(dev);
522 moan_device("Unknown SIIG card", dev);
526 static int pci_siig_setup(struct serial_private *priv,
527 const struct pciserial_board *board,
528 struct uart_8250_port *port, int idx)
530 unsigned int bar = FL_GET_BASE(board->flags) + idx, offset = 0;
534 offset = (idx - 4) * 8;
537 return setup_port(priv, port, bar, offset, 0);
541 * Timedia has an explosion of boards, and to avoid the PCI table from
542 * growing *huge*, we use this function to collapse some 70 entries
543 * in the PCI table into one, for sanity's and compactness's sake.
545 static const unsigned short timedia_single_port[] = {
546 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0
549 static const unsigned short timedia_dual_port[] = {
550 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085,
551 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079,
552 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079,
553 0x9137, 0x9138, 0x9237, 0x9238, 0xA079, 0xB079, 0xC079,
557 static const unsigned short timedia_quad_port[] = {
558 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157,
559 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159,
560 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056,
564 static const unsigned short timedia_eight_port[] = {
565 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166,
566 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0
569 static const struct timedia_struct {
571 const unsigned short *ids;
573 { 1, timedia_single_port },
574 { 2, timedia_dual_port },
575 { 4, timedia_quad_port },
576 { 8, timedia_eight_port }
580 * There are nearly 70 different Timedia/SUNIX PCI serial devices. Instead of
581 * listing them individually, this driver merely grabs them all with
582 * PCI_ANY_ID. Some of these devices, however, also feature a parallel port,
583 * and should be left free to be claimed by parport_serial instead.
585 static int pci_timedia_probe(struct pci_dev *dev)
588 * Check the third digit of the subdevice ID
589 * (0,2,3,5,6: serial only -- 7,8,9: serial + parallel)
591 if ((dev->subsystem_device & 0x00f0) >= 0x70) {
593 "ignoring Timedia subdevice %04x for parport_serial\n",
594 dev->subsystem_device);
601 static int pci_timedia_init(struct pci_dev *dev)
603 const unsigned short *ids;
606 for (i = 0; i < ARRAY_SIZE(timedia_data); i++) {
607 ids = timedia_data[i].ids;
608 for (j = 0; ids[j]; j++)
609 if (dev->subsystem_device == ids[j])
610 return timedia_data[i].num;
616 * Timedia/SUNIX uses a mixture of BARs and offsets
617 * Ugh, this is ugly as all hell --- TYT
620 pci_timedia_setup(struct serial_private *priv,
621 const struct pciserial_board *board,
622 struct uart_8250_port *port, int idx)
624 unsigned int bar = 0, offset = board->first_offset;
631 offset = board->uart_offset;
638 offset = board->uart_offset;
647 return setup_port(priv, port, bar, offset, board->reg_shift);
651 * Some Titan cards are also a little weird
654 titan_400l_800l_setup(struct serial_private *priv,
655 const struct pciserial_board *board,
656 struct uart_8250_port *port, int idx)
658 unsigned int bar, offset = board->first_offset;
669 offset = (idx - 2) * board->uart_offset;
672 return setup_port(priv, port, bar, offset, board->reg_shift);
675 static int pci_xircom_init(struct pci_dev *dev)
681 static int pci_ni8420_init(struct pci_dev *dev)
684 unsigned long base, len;
685 unsigned int bar = 0;
687 if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
688 moan_device("no memory in bar", dev);
692 base = pci_resource_start(dev, bar);
693 len = pci_resource_len(dev, bar);
694 p = ioremap_nocache(base, len);
698 /* Enable CPU Interrupt */
699 writel(readl(p + NI8420_INT_ENABLE_REG) | NI8420_INT_ENABLE_BIT,
700 p + NI8420_INT_ENABLE_REG);
706 #define MITE_IOWBSR1_WSIZE 0xa
707 #define MITE_IOWBSR1_WIN_OFFSET 0x800
708 #define MITE_IOWBSR1_WENAB (1 << 7)
709 #define MITE_LCIMR1_IO_IE_0 (1 << 24)
710 #define MITE_LCIMR2_SET_CPU_IE (1 << 31)
711 #define MITE_IOWCR1_RAMSEL_MASK 0xfffffffe
713 static int pci_ni8430_init(struct pci_dev *dev)
716 unsigned long base, len;
718 unsigned int bar = 0;
720 if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
721 moan_device("no memory in bar", dev);
725 base = pci_resource_start(dev, bar);
726 len = pci_resource_len(dev, bar);
727 p = ioremap_nocache(base, len);
731 /* Set device window address and size in BAR0 */
732 device_window = ((base + MITE_IOWBSR1_WIN_OFFSET) & 0xffffff00)
733 | MITE_IOWBSR1_WENAB | MITE_IOWBSR1_WSIZE;
734 writel(device_window, p + MITE_IOWBSR1);
736 /* Set window access to go to RAMSEL IO address space */
737 writel((readl(p + MITE_IOWCR1) & MITE_IOWCR1_RAMSEL_MASK),
740 /* Enable IO Bus Interrupt 0 */
741 writel(MITE_LCIMR1_IO_IE_0, p + MITE_LCIMR1);
743 /* Enable CPU Interrupt */
744 writel(MITE_LCIMR2_SET_CPU_IE, p + MITE_LCIMR2);
750 /* UART Port Control Register */
751 #define NI8430_PORTCON 0x0f
752 #define NI8430_PORTCON_TXVR_ENABLE (1 << 3)
755 pci_ni8430_setup(struct serial_private *priv,
756 const struct pciserial_board *board,
757 struct uart_8250_port *port, int idx)
760 unsigned long base, len;
761 unsigned int bar, offset = board->first_offset;
763 if (idx >= board->num_ports)
766 bar = FL_GET_BASE(board->flags);
767 offset += idx * board->uart_offset;
769 base = pci_resource_start(priv->dev, bar);
770 len = pci_resource_len(priv->dev, bar);
771 p = ioremap_nocache(base, len);
773 /* enable the transceiver */
774 writeb(readb(p + offset + NI8430_PORTCON) | NI8430_PORTCON_TXVR_ENABLE,
775 p + offset + NI8430_PORTCON);
779 return setup_port(priv, port, bar, offset, board->reg_shift);
782 static int pci_netmos_9900_setup(struct serial_private *priv,
783 const struct pciserial_board *board,
784 struct uart_8250_port *port, int idx)
788 if ((priv->dev->subsystem_device & 0xff00) == 0x3000) {
789 /* netmos apparently orders BARs by datasheet layout, so serial
790 * ports get BARs 0 and 3 (or 1 and 4 for memmapped)
794 return setup_port(priv, port, bar, 0, board->reg_shift);
796 return pci_default_setup(priv, board, port, idx);
800 /* the 99xx series comes with a range of device IDs and a variety
803 * 9900 has varying capabilities and can cascade to sub-controllers
804 * (cascading should be purely internal)
805 * 9904 is hardwired with 4 serial ports
806 * 9912 and 9922 are hardwired with 2 serial ports
808 static int pci_netmos_9900_numports(struct pci_dev *dev)
810 unsigned int c = dev->class;
812 unsigned short sub_serports;
818 } else if ((pi == 0) &&
819 (dev->device == PCI_DEVICE_ID_NETMOS_9900)) {
820 /* two possibilities: 0x30ps encodes number of parallel and
821 * serial ports, or 0x1000 indicates *something*. This is not
822 * immediately obvious, since the 2s1p+4s configuration seems
823 * to offer all functionality on functions 0..2, while still
824 * advertising the same function 3 as the 4s+2s1p config.
826 sub_serports = dev->subsystem_device & 0xf;
827 if (sub_serports > 0) {
830 printk(KERN_NOTICE "NetMos/Mostech serial driver ignoring port on ambiguous config.\n");
835 moan_device("unknown NetMos/Mostech program interface", dev);
839 static int pci_netmos_init(struct pci_dev *dev)
841 /* subdevice 0x00PS means <P> parallel, <S> serial */
842 unsigned int num_serial = dev->subsystem_device & 0xf;
844 if ((dev->device == PCI_DEVICE_ID_NETMOS_9901) ||
845 (dev->device == PCI_DEVICE_ID_NETMOS_9865))
848 if (dev->subsystem_vendor == PCI_VENDOR_ID_IBM &&
849 dev->subsystem_device == 0x0299)
852 switch (dev->device) { /* FALLTHROUGH on all */
853 case PCI_DEVICE_ID_NETMOS_9904:
854 case PCI_DEVICE_ID_NETMOS_9912:
855 case PCI_DEVICE_ID_NETMOS_9922:
856 case PCI_DEVICE_ID_NETMOS_9900:
857 num_serial = pci_netmos_9900_numports(dev);
861 if (num_serial == 0 ) {
862 moan_device("unknown NetMos/Mostech device", dev);
873 * These chips are available with optionally one parallel port and up to
874 * two serial ports. Unfortunately they all have the same product id.
876 * Basic configuration is done over a region of 32 I/O ports. The base
877 * ioport is called INTA or INTC, depending on docs/other drivers.
879 * The region of the 32 I/O ports is configured in POSIO0R...
883 #define ITE_887x_MISCR 0x9c
884 #define ITE_887x_INTCBAR 0x78
885 #define ITE_887x_UARTBAR 0x7c
886 #define ITE_887x_PS0BAR 0x10
887 #define ITE_887x_POSIO0 0x60
890 #define ITE_887x_IOSIZE 32
891 /* I/O space size (bits 26-24; 8 bytes = 011b) */
892 #define ITE_887x_POSIO_IOSIZE_8 (3 << 24)
893 /* I/O space size (bits 26-24; 32 bytes = 101b) */
894 #define ITE_887x_POSIO_IOSIZE_32 (5 << 24)
895 /* Decoding speed (1 = slow, 2 = medium, 3 = fast) */
896 #define ITE_887x_POSIO_SPEED (3 << 29)
897 /* enable IO_Space bit */
898 #define ITE_887x_POSIO_ENABLE (1 << 31)
900 static int pci_ite887x_init(struct pci_dev *dev)
902 /* inta_addr are the configuration addresses of the ITE */
903 static const short inta_addr[] = { 0x2a0, 0x2c0, 0x220, 0x240, 0x1e0,
906 struct resource *iobase = NULL;
907 u32 miscr, uartbar, ioport;
909 /* search for the base-ioport */
911 while (inta_addr[i] && iobase == NULL) {
912 iobase = request_region(inta_addr[i], ITE_887x_IOSIZE,
914 if (iobase != NULL) {
915 /* write POSIO0R - speed | size | ioport */
916 pci_write_config_dword(dev, ITE_887x_POSIO0,
917 ITE_887x_POSIO_ENABLE | ITE_887x_POSIO_SPEED |
918 ITE_887x_POSIO_IOSIZE_32 | inta_addr[i]);
919 /* write INTCBAR - ioport */
920 pci_write_config_dword(dev, ITE_887x_INTCBAR,
922 ret = inb(inta_addr[i]);
924 /* ioport connected */
927 release_region(iobase->start, ITE_887x_IOSIZE);
934 printk(KERN_ERR "ite887x: could not find iobase\n");
938 /* start of undocumented type checking (see parport_pc.c) */
939 type = inb(iobase->start + 0x18) & 0x0f;
942 case 0x2: /* ITE8871 (1P) */
943 case 0xa: /* ITE8875 (1P) */
946 case 0xe: /* ITE8872 (2S1P) */
949 case 0x6: /* ITE8873 (1S) */
952 case 0x8: /* ITE8874 (2S) */
956 moan_device("Unknown ITE887x", dev);
960 /* configure all serial ports */
961 for (i = 0; i < ret; i++) {
962 /* read the I/O port from the device */
963 pci_read_config_dword(dev, ITE_887x_PS0BAR + (0x4 * (i + 1)),
965 ioport &= 0x0000FF00; /* the actual base address */
966 pci_write_config_dword(dev, ITE_887x_POSIO0 + (0x4 * (i + 1)),
967 ITE_887x_POSIO_ENABLE | ITE_887x_POSIO_SPEED |
968 ITE_887x_POSIO_IOSIZE_8 | ioport);
970 /* write the ioport to the UARTBAR */
971 pci_read_config_dword(dev, ITE_887x_UARTBAR, &uartbar);
972 uartbar &= ~(0xffff << (16 * i)); /* clear half the reg */
973 uartbar |= (ioport << (16 * i)); /* set the ioport */
974 pci_write_config_dword(dev, ITE_887x_UARTBAR, uartbar);
976 /* get current config */
977 pci_read_config_dword(dev, ITE_887x_MISCR, &miscr);
978 /* disable interrupts (UARTx_Routing[3:0]) */
979 miscr &= ~(0xf << (12 - 4 * i));
980 /* activate the UART (UARTx_En) */
981 miscr |= 1 << (23 - i);
982 /* write new config with activated UART */
983 pci_write_config_dword(dev, ITE_887x_MISCR, miscr);
987 /* the device has no UARTs if we get here */
988 release_region(iobase->start, ITE_887x_IOSIZE);
994 static void __devexit pci_ite887x_exit(struct pci_dev *dev)
997 /* the ioport is bit 0-15 in POSIO0R */
998 pci_read_config_dword(dev, ITE_887x_POSIO0, &ioport);
1000 release_region(ioport, ITE_887x_IOSIZE);
1004 * Oxford Semiconductor Inc.
1005 * Check that device is part of the Tornado range of devices, then determine
1006 * the number of ports available on the device.
1008 static int pci_oxsemi_tornado_init(struct pci_dev *dev)
1011 unsigned long deviceID;
1012 unsigned int number_uarts = 0;
1014 /* OxSemi Tornado devices are all 0xCxxx */
1015 if (dev->vendor == PCI_VENDOR_ID_OXSEMI &&
1016 (dev->device & 0xF000) != 0xC000)
1019 p = pci_iomap(dev, 0, 5);
1023 deviceID = ioread32(p);
1024 /* Tornado device */
1025 if (deviceID == 0x07000200) {
1026 number_uarts = ioread8(p + 4);
1028 "%d ports detected on Oxford PCI Express device\n",
1031 pci_iounmap(dev, p);
1032 return number_uarts;
1035 static int pci_asix_setup(struct serial_private *priv,
1036 const struct pciserial_board *board,
1037 struct uart_8250_port *port, int idx)
1039 port->bugs |= UART_BUG_PARITY;
1040 return pci_default_setup(priv, board, port, idx);
1043 static int pci_default_setup(struct serial_private *priv,
1044 const struct pciserial_board *board,
1045 struct uart_8250_port *port, int idx)
1047 unsigned int bar, offset = board->first_offset, maxnr;
1049 bar = FL_GET_BASE(board->flags);
1050 if (board->flags & FL_BASE_BARS)
1053 offset += idx * board->uart_offset;
1055 maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
1056 (board->reg_shift + 3);
1058 if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
1061 return setup_port(priv, port, bar, offset, board->reg_shift);
1065 ce4100_serial_setup(struct serial_private *priv,
1066 const struct pciserial_board *board,
1067 struct uart_8250_port *port, int idx)
1071 ret = setup_port(priv, port, 0, 0, board->reg_shift);
1072 port->port.iotype = UPIO_MEM32;
1073 port->port.type = PORT_XSCALE;
1074 port->port.flags = (port->port.flags | UPF_FIXED_PORT | UPF_FIXED_TYPE);
1075 port->port.regshift = 2;
1081 pci_omegapci_setup(struct serial_private *priv,
1082 const struct pciserial_board *board,
1083 struct uart_8250_port *port, int idx)
1085 return setup_port(priv, port, 2, idx * 8, 0);
1088 static int skip_tx_en_setup(struct serial_private *priv,
1089 const struct pciserial_board *board,
1090 struct uart_8250_port *port, int idx)
1092 port->port.flags |= UPF_NO_TXEN_TEST;
1093 printk(KERN_DEBUG "serial8250: skipping TxEn test for device "
1094 "[%04x:%04x] subsystem [%04x:%04x]\n",
1097 priv->dev->subsystem_vendor,
1098 priv->dev->subsystem_device);
1100 return pci_default_setup(priv, board, port, idx);
1103 static void kt_handle_break(struct uart_port *p)
1105 struct uart_8250_port *up =
1106 container_of(p, struct uart_8250_port, port);
1108 * On receipt of a BI, serial device in Intel ME (Intel
1109 * management engine) needs to have its fifos cleared for sane
1110 * SOL (Serial Over Lan) output.
1112 serial8250_clear_and_reinit_fifos(up);
1115 static unsigned int kt_serial_in(struct uart_port *p, int offset)
1117 struct uart_8250_port *up =
1118 container_of(p, struct uart_8250_port, port);
1122 * When the Intel ME (management engine) gets reset its serial
1123 * port registers could return 0 momentarily. Functions like
1124 * serial8250_console_write, read and save the IER, perform
1125 * some operation and then restore it. In order to avoid
1126 * setting IER register inadvertently to 0, if the value read
1127 * is 0, double check with ier value in uart_8250_port and use
1128 * that instead. up->ier should be the same value as what is
1129 * currently configured.
1131 val = inb(p->iobase + offset);
1132 if (offset == UART_IER) {
1139 static int kt_serial_setup(struct serial_private *priv,
1140 const struct pciserial_board *board,
1141 struct uart_8250_port *port, int idx)
1143 port->port.flags |= UPF_BUG_THRE;
1144 port->port.serial_in = kt_serial_in;
1145 port->port.handle_break = kt_handle_break;
1146 return skip_tx_en_setup(priv, board, port, idx);
1149 static int pci_eg20t_init(struct pci_dev *dev)
1151 #if defined(CONFIG_SERIAL_PCH_UART) || defined(CONFIG_SERIAL_PCH_UART_MODULE)
1159 pci_xr17c154_setup(struct serial_private *priv,
1160 const struct pciserial_board *board,
1161 struct uart_8250_port *port, int idx)
1163 port->port.flags |= UPF_EXAR_EFR;
1164 return pci_default_setup(priv, board, port, idx);
1168 pci_wch_ch353_setup(struct serial_private *priv,
1169 const struct pciserial_board *board,
1170 struct uart_8250_port *port, int idx)
1172 port->port.flags |= UPF_FIXED_TYPE;
1173 port->port.type = PORT_16550A;
1174 return pci_default_setup(priv, board, port, idx);
1177 #define PCI_VENDOR_ID_SBSMODULARIO 0x124B
1178 #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B
1179 #define PCI_DEVICE_ID_OCTPRO 0x0001
1180 #define PCI_SUBDEVICE_ID_OCTPRO232 0x0108
1181 #define PCI_SUBDEVICE_ID_OCTPRO422 0x0208
1182 #define PCI_SUBDEVICE_ID_POCTAL232 0x0308
1183 #define PCI_SUBDEVICE_ID_POCTAL422 0x0408
1184 #define PCI_VENDOR_ID_ADVANTECH 0x13fe
1185 #define PCI_DEVICE_ID_INTEL_CE4100_UART 0x2e66
1186 #define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620
1187 #define PCI_DEVICE_ID_TITAN_200I 0x8028
1188 #define PCI_DEVICE_ID_TITAN_400I 0x8048
1189 #define PCI_DEVICE_ID_TITAN_800I 0x8088
1190 #define PCI_DEVICE_ID_TITAN_800EH 0xA007
1191 #define PCI_DEVICE_ID_TITAN_800EHB 0xA008
1192 #define PCI_DEVICE_ID_TITAN_400EH 0xA009
1193 #define PCI_DEVICE_ID_TITAN_100E 0xA010
1194 #define PCI_DEVICE_ID_TITAN_200E 0xA012
1195 #define PCI_DEVICE_ID_TITAN_400E 0xA013
1196 #define PCI_DEVICE_ID_TITAN_800E 0xA014
1197 #define PCI_DEVICE_ID_TITAN_200EI 0xA016
1198 #define PCI_DEVICE_ID_TITAN_200EISI 0xA017
1199 #define PCI_DEVICE_ID_TITAN_400V3 0xA310
1200 #define PCI_DEVICE_ID_TITAN_410V3 0xA312
1201 #define PCI_DEVICE_ID_TITAN_800V3 0xA314
1202 #define PCI_DEVICE_ID_TITAN_800V3B 0xA315
1203 #define PCI_DEVICE_ID_OXSEMI_16PCI958 0x9538
1204 #define PCIE_DEVICE_ID_NEO_2_OX_IBM 0x00F6
1205 #define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001
1206 #define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d
1207 #define PCI_VENDOR_ID_WCH 0x4348
1208 #define PCI_DEVICE_ID_WCH_CH353_4S 0x3453
1209 #define PCI_DEVICE_ID_WCH_CH353_2S1PF 0x5046
1210 #define PCI_DEVICE_ID_WCH_CH353_2S1P 0x7053
1211 #define PCI_VENDOR_ID_AGESTAR 0x5372
1212 #define PCI_DEVICE_ID_AGESTAR_9375 0x6872
1213 #define PCI_VENDOR_ID_ASIX 0x9710
1215 /* Unknown vendors/cards - this should not be in linux/pci_ids.h */
1216 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584
1219 * Master list of serial port init/setup/exit quirks.
1220 * This does not describe the general nature of the port.
1221 * (ie, baud base, number and location of ports, etc)
1223 * This list is ordered alphabetically by vendor then device.
1224 * Specific entries must come before more generic entries.
1226 static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
1228 * ADDI-DATA GmbH communication cards <info@addi-data.com>
1231 .vendor = PCI_VENDOR_ID_ADDIDATA_OLD,
1232 .device = PCI_DEVICE_ID_ADDIDATA_APCI7800,
1233 .subvendor = PCI_ANY_ID,
1234 .subdevice = PCI_ANY_ID,
1235 .setup = addidata_apci7800_setup,
1238 * AFAVLAB cards - these may be called via parport_serial
1239 * It is not clear whether this applies to all products.
1242 .vendor = PCI_VENDOR_ID_AFAVLAB,
1243 .device = PCI_ANY_ID,
1244 .subvendor = PCI_ANY_ID,
1245 .subdevice = PCI_ANY_ID,
1246 .setup = afavlab_setup,
1252 .vendor = PCI_VENDOR_ID_HP,
1253 .device = PCI_DEVICE_ID_HP_DIVA,
1254 .subvendor = PCI_ANY_ID,
1255 .subdevice = PCI_ANY_ID,
1256 .init = pci_hp_diva_init,
1257 .setup = pci_hp_diva_setup,
1263 .vendor = PCI_VENDOR_ID_INTEL,
1264 .device = PCI_DEVICE_ID_INTEL_80960_RP,
1265 .subvendor = 0xe4bf,
1266 .subdevice = PCI_ANY_ID,
1267 .init = pci_inteli960ni_init,
1268 .setup = pci_default_setup,
1271 .vendor = PCI_VENDOR_ID_INTEL,
1272 .device = PCI_DEVICE_ID_INTEL_8257X_SOL,
1273 .subvendor = PCI_ANY_ID,
1274 .subdevice = PCI_ANY_ID,
1275 .setup = skip_tx_en_setup,
1278 .vendor = PCI_VENDOR_ID_INTEL,
1279 .device = PCI_DEVICE_ID_INTEL_82573L_SOL,
1280 .subvendor = PCI_ANY_ID,
1281 .subdevice = PCI_ANY_ID,
1282 .setup = skip_tx_en_setup,
1285 .vendor = PCI_VENDOR_ID_INTEL,
1286 .device = PCI_DEVICE_ID_INTEL_82573E_SOL,
1287 .subvendor = PCI_ANY_ID,
1288 .subdevice = PCI_ANY_ID,
1289 .setup = skip_tx_en_setup,
1292 .vendor = PCI_VENDOR_ID_INTEL,
1293 .device = PCI_DEVICE_ID_INTEL_CE4100_UART,
1294 .subvendor = PCI_ANY_ID,
1295 .subdevice = PCI_ANY_ID,
1296 .setup = ce4100_serial_setup,
1299 .vendor = PCI_VENDOR_ID_INTEL,
1300 .device = PCI_DEVICE_ID_INTEL_PATSBURG_KT,
1301 .subvendor = PCI_ANY_ID,
1302 .subdevice = PCI_ANY_ID,
1303 .setup = kt_serial_setup,
1309 .vendor = PCI_VENDOR_ID_ITE,
1310 .device = PCI_DEVICE_ID_ITE_8872,
1311 .subvendor = PCI_ANY_ID,
1312 .subdevice = PCI_ANY_ID,
1313 .init = pci_ite887x_init,
1314 .setup = pci_default_setup,
1315 .exit = __devexit_p(pci_ite887x_exit),
1318 * National Instruments
1321 .vendor = PCI_VENDOR_ID_NI,
1322 .device = PCI_DEVICE_ID_NI_PCI23216,
1323 .subvendor = PCI_ANY_ID,
1324 .subdevice = PCI_ANY_ID,
1325 .init = pci_ni8420_init,
1326 .setup = pci_default_setup,
1327 .exit = __devexit_p(pci_ni8420_exit),
1330 .vendor = PCI_VENDOR_ID_NI,
1331 .device = PCI_DEVICE_ID_NI_PCI2328,
1332 .subvendor = PCI_ANY_ID,
1333 .subdevice = PCI_ANY_ID,
1334 .init = pci_ni8420_init,
1335 .setup = pci_default_setup,
1336 .exit = __devexit_p(pci_ni8420_exit),
1339 .vendor = PCI_VENDOR_ID_NI,
1340 .device = PCI_DEVICE_ID_NI_PCI2324,
1341 .subvendor = PCI_ANY_ID,
1342 .subdevice = PCI_ANY_ID,
1343 .init = pci_ni8420_init,
1344 .setup = pci_default_setup,
1345 .exit = __devexit_p(pci_ni8420_exit),
1348 .vendor = PCI_VENDOR_ID_NI,
1349 .device = PCI_DEVICE_ID_NI_PCI2322,
1350 .subvendor = PCI_ANY_ID,
1351 .subdevice = PCI_ANY_ID,
1352 .init = pci_ni8420_init,
1353 .setup = pci_default_setup,
1354 .exit = __devexit_p(pci_ni8420_exit),
1357 .vendor = PCI_VENDOR_ID_NI,
1358 .device = PCI_DEVICE_ID_NI_PCI2324I,
1359 .subvendor = PCI_ANY_ID,
1360 .subdevice = PCI_ANY_ID,
1361 .init = pci_ni8420_init,
1362 .setup = pci_default_setup,
1363 .exit = __devexit_p(pci_ni8420_exit),
1366 .vendor = PCI_VENDOR_ID_NI,
1367 .device = PCI_DEVICE_ID_NI_PCI2322I,
1368 .subvendor = PCI_ANY_ID,
1369 .subdevice = PCI_ANY_ID,
1370 .init = pci_ni8420_init,
1371 .setup = pci_default_setup,
1372 .exit = __devexit_p(pci_ni8420_exit),
1375 .vendor = PCI_VENDOR_ID_NI,
1376 .device = PCI_DEVICE_ID_NI_PXI8420_23216,
1377 .subvendor = PCI_ANY_ID,
1378 .subdevice = PCI_ANY_ID,
1379 .init = pci_ni8420_init,
1380 .setup = pci_default_setup,
1381 .exit = __devexit_p(pci_ni8420_exit),
1384 .vendor = PCI_VENDOR_ID_NI,
1385 .device = PCI_DEVICE_ID_NI_PXI8420_2328,
1386 .subvendor = PCI_ANY_ID,
1387 .subdevice = PCI_ANY_ID,
1388 .init = pci_ni8420_init,
1389 .setup = pci_default_setup,
1390 .exit = __devexit_p(pci_ni8420_exit),
1393 .vendor = PCI_VENDOR_ID_NI,
1394 .device = PCI_DEVICE_ID_NI_PXI8420_2324,
1395 .subvendor = PCI_ANY_ID,
1396 .subdevice = PCI_ANY_ID,
1397 .init = pci_ni8420_init,
1398 .setup = pci_default_setup,
1399 .exit = __devexit_p(pci_ni8420_exit),
1402 .vendor = PCI_VENDOR_ID_NI,
1403 .device = PCI_DEVICE_ID_NI_PXI8420_2322,
1404 .subvendor = PCI_ANY_ID,
1405 .subdevice = PCI_ANY_ID,
1406 .init = pci_ni8420_init,
1407 .setup = pci_default_setup,
1408 .exit = __devexit_p(pci_ni8420_exit),
1411 .vendor = PCI_VENDOR_ID_NI,
1412 .device = PCI_DEVICE_ID_NI_PXI8422_2324,
1413 .subvendor = PCI_ANY_ID,
1414 .subdevice = PCI_ANY_ID,
1415 .init = pci_ni8420_init,
1416 .setup = pci_default_setup,
1417 .exit = __devexit_p(pci_ni8420_exit),
1420 .vendor = PCI_VENDOR_ID_NI,
1421 .device = PCI_DEVICE_ID_NI_PXI8422_2322,
1422 .subvendor = PCI_ANY_ID,
1423 .subdevice = PCI_ANY_ID,
1424 .init = pci_ni8420_init,
1425 .setup = pci_default_setup,
1426 .exit = __devexit_p(pci_ni8420_exit),
1429 .vendor = PCI_VENDOR_ID_NI,
1430 .device = PCI_ANY_ID,
1431 .subvendor = PCI_ANY_ID,
1432 .subdevice = PCI_ANY_ID,
1433 .init = pci_ni8430_init,
1434 .setup = pci_ni8430_setup,
1435 .exit = __devexit_p(pci_ni8430_exit),
1441 .vendor = PCI_VENDOR_ID_PANACOM,
1442 .device = PCI_DEVICE_ID_PANACOM_QUADMODEM,
1443 .subvendor = PCI_ANY_ID,
1444 .subdevice = PCI_ANY_ID,
1445 .init = pci_plx9050_init,
1446 .setup = pci_default_setup,
1447 .exit = __devexit_p(pci_plx9050_exit),
1450 .vendor = PCI_VENDOR_ID_PANACOM,
1451 .device = PCI_DEVICE_ID_PANACOM_DUALMODEM,
1452 .subvendor = PCI_ANY_ID,
1453 .subdevice = PCI_ANY_ID,
1454 .init = pci_plx9050_init,
1455 .setup = pci_default_setup,
1456 .exit = __devexit_p(pci_plx9050_exit),
1462 .vendor = PCI_VENDOR_ID_PLX,
1463 .device = PCI_DEVICE_ID_PLX_9030,
1464 .subvendor = PCI_SUBVENDOR_ID_PERLE,
1465 .subdevice = PCI_ANY_ID,
1466 .setup = pci_default_setup,
1469 .vendor = PCI_VENDOR_ID_PLX,
1470 .device = PCI_DEVICE_ID_PLX_9050,
1471 .subvendor = PCI_SUBVENDOR_ID_EXSYS,
1472 .subdevice = PCI_SUBDEVICE_ID_EXSYS_4055,
1473 .init = pci_plx9050_init,
1474 .setup = pci_default_setup,
1475 .exit = __devexit_p(pci_plx9050_exit),
1478 .vendor = PCI_VENDOR_ID_PLX,
1479 .device = PCI_DEVICE_ID_PLX_9050,
1480 .subvendor = PCI_SUBVENDOR_ID_KEYSPAN,
1481 .subdevice = PCI_SUBDEVICE_ID_KEYSPAN_SX2,
1482 .init = pci_plx9050_init,
1483 .setup = pci_default_setup,
1484 .exit = __devexit_p(pci_plx9050_exit),
1487 .vendor = PCI_VENDOR_ID_PLX,
1488 .device = PCI_DEVICE_ID_PLX_9050,
1489 .subvendor = PCI_VENDOR_ID_PLX,
1490 .subdevice = PCI_SUBDEVICE_ID_UNKNOWN_0x1584,
1491 .init = pci_plx9050_init,
1492 .setup = pci_default_setup,
1493 .exit = __devexit_p(pci_plx9050_exit),
1496 .vendor = PCI_VENDOR_ID_PLX,
1497 .device = PCI_DEVICE_ID_PLX_ROMULUS,
1498 .subvendor = PCI_VENDOR_ID_PLX,
1499 .subdevice = PCI_DEVICE_ID_PLX_ROMULUS,
1500 .init = pci_plx9050_init,
1501 .setup = pci_default_setup,
1502 .exit = __devexit_p(pci_plx9050_exit),
1505 * SBS Technologies, Inc., PMC-OCTALPRO 232
1508 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
1509 .device = PCI_DEVICE_ID_OCTPRO,
1510 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
1511 .subdevice = PCI_SUBDEVICE_ID_OCTPRO232,
1514 .exit = __devexit_p(sbs_exit),
1517 * SBS Technologies, Inc., PMC-OCTALPRO 422
1520 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
1521 .device = PCI_DEVICE_ID_OCTPRO,
1522 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
1523 .subdevice = PCI_SUBDEVICE_ID_OCTPRO422,
1526 .exit = __devexit_p(sbs_exit),
1529 * SBS Technologies, Inc., P-Octal 232
1532 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
1533 .device = PCI_DEVICE_ID_OCTPRO,
1534 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
1535 .subdevice = PCI_SUBDEVICE_ID_POCTAL232,
1538 .exit = __devexit_p(sbs_exit),
1541 * SBS Technologies, Inc., P-Octal 422
1544 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
1545 .device = PCI_DEVICE_ID_OCTPRO,
1546 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
1547 .subdevice = PCI_SUBDEVICE_ID_POCTAL422,
1550 .exit = __devexit_p(sbs_exit),
1553 * SIIG cards - these may be called via parport_serial
1556 .vendor = PCI_VENDOR_ID_SIIG,
1557 .device = PCI_ANY_ID,
1558 .subvendor = PCI_ANY_ID,
1559 .subdevice = PCI_ANY_ID,
1560 .init = pci_siig_init,
1561 .setup = pci_siig_setup,
1567 .vendor = PCI_VENDOR_ID_TITAN,
1568 .device = PCI_DEVICE_ID_TITAN_400L,
1569 .subvendor = PCI_ANY_ID,
1570 .subdevice = PCI_ANY_ID,
1571 .setup = titan_400l_800l_setup,
1574 .vendor = PCI_VENDOR_ID_TITAN,
1575 .device = PCI_DEVICE_ID_TITAN_800L,
1576 .subvendor = PCI_ANY_ID,
1577 .subdevice = PCI_ANY_ID,
1578 .setup = titan_400l_800l_setup,
1584 .vendor = PCI_VENDOR_ID_TIMEDIA,
1585 .device = PCI_DEVICE_ID_TIMEDIA_1889,
1586 .subvendor = PCI_VENDOR_ID_TIMEDIA,
1587 .subdevice = PCI_ANY_ID,
1588 .probe = pci_timedia_probe,
1589 .init = pci_timedia_init,
1590 .setup = pci_timedia_setup,
1593 .vendor = PCI_VENDOR_ID_TIMEDIA,
1594 .device = PCI_ANY_ID,
1595 .subvendor = PCI_ANY_ID,
1596 .subdevice = PCI_ANY_ID,
1597 .setup = pci_timedia_setup,
1603 .vendor = PCI_VENDOR_ID_EXAR,
1604 .device = PCI_DEVICE_ID_EXAR_XR17C152,
1605 .subvendor = PCI_ANY_ID,
1606 .subdevice = PCI_ANY_ID,
1607 .setup = pci_xr17c154_setup,
1610 .vendor = PCI_VENDOR_ID_EXAR,
1611 .device = PCI_DEVICE_ID_EXAR_XR17C154,
1612 .subvendor = PCI_ANY_ID,
1613 .subdevice = PCI_ANY_ID,
1614 .setup = pci_xr17c154_setup,
1617 .vendor = PCI_VENDOR_ID_EXAR,
1618 .device = PCI_DEVICE_ID_EXAR_XR17C158,
1619 .subvendor = PCI_ANY_ID,
1620 .subdevice = PCI_ANY_ID,
1621 .setup = pci_xr17c154_setup,
1627 .vendor = PCI_VENDOR_ID_XIRCOM,
1628 .device = PCI_DEVICE_ID_XIRCOM_X3201_MDM,
1629 .subvendor = PCI_ANY_ID,
1630 .subdevice = PCI_ANY_ID,
1631 .init = pci_xircom_init,
1632 .setup = pci_default_setup,
1635 * Netmos cards - these may be called via parport_serial
1638 .vendor = PCI_VENDOR_ID_NETMOS,
1639 .device = PCI_ANY_ID,
1640 .subvendor = PCI_ANY_ID,
1641 .subdevice = PCI_ANY_ID,
1642 .init = pci_netmos_init,
1643 .setup = pci_netmos_9900_setup,
1646 * For Oxford Semiconductor Tornado based devices
1649 .vendor = PCI_VENDOR_ID_OXSEMI,
1650 .device = PCI_ANY_ID,
1651 .subvendor = PCI_ANY_ID,
1652 .subdevice = PCI_ANY_ID,
1653 .init = pci_oxsemi_tornado_init,
1654 .setup = pci_default_setup,
1657 .vendor = PCI_VENDOR_ID_MAINPINE,
1658 .device = PCI_ANY_ID,
1659 .subvendor = PCI_ANY_ID,
1660 .subdevice = PCI_ANY_ID,
1661 .init = pci_oxsemi_tornado_init,
1662 .setup = pci_default_setup,
1665 .vendor = PCI_VENDOR_ID_DIGI,
1666 .device = PCIE_DEVICE_ID_NEO_2_OX_IBM,
1667 .subvendor = PCI_SUBVENDOR_ID_IBM,
1668 .subdevice = PCI_ANY_ID,
1669 .init = pci_oxsemi_tornado_init,
1670 .setup = pci_default_setup,
1673 .vendor = PCI_VENDOR_ID_INTEL,
1675 .subvendor = PCI_ANY_ID,
1676 .subdevice = PCI_ANY_ID,
1677 .init = pci_eg20t_init,
1678 .setup = pci_default_setup,
1681 .vendor = PCI_VENDOR_ID_INTEL,
1683 .subvendor = PCI_ANY_ID,
1684 .subdevice = PCI_ANY_ID,
1685 .init = pci_eg20t_init,
1686 .setup = pci_default_setup,
1689 .vendor = PCI_VENDOR_ID_INTEL,
1691 .subvendor = PCI_ANY_ID,
1692 .subdevice = PCI_ANY_ID,
1693 .init = pci_eg20t_init,
1694 .setup = pci_default_setup,
1697 .vendor = PCI_VENDOR_ID_INTEL,
1699 .subvendor = PCI_ANY_ID,
1700 .subdevice = PCI_ANY_ID,
1701 .init = pci_eg20t_init,
1702 .setup = pci_default_setup,
1707 .subvendor = PCI_ANY_ID,
1708 .subdevice = PCI_ANY_ID,
1709 .init = pci_eg20t_init,
1710 .setup = pci_default_setup,
1715 .subvendor = PCI_ANY_ID,
1716 .subdevice = PCI_ANY_ID,
1717 .init = pci_eg20t_init,
1718 .setup = pci_default_setup,
1723 .subvendor = PCI_ANY_ID,
1724 .subdevice = PCI_ANY_ID,
1725 .init = pci_eg20t_init,
1726 .setup = pci_default_setup,
1731 .subvendor = PCI_ANY_ID,
1732 .subdevice = PCI_ANY_ID,
1733 .init = pci_eg20t_init,
1734 .setup = pci_default_setup,
1739 .subvendor = PCI_ANY_ID,
1740 .subdevice = PCI_ANY_ID,
1741 .init = pci_eg20t_init,
1742 .setup = pci_default_setup,
1745 * Cronyx Omega PCI (PLX-chip based)
1748 .vendor = PCI_VENDOR_ID_PLX,
1749 .device = PCI_DEVICE_ID_PLX_CRONYX_OMEGA,
1750 .subvendor = PCI_ANY_ID,
1751 .subdevice = PCI_ANY_ID,
1752 .setup = pci_omegapci_setup,
1754 /* WCH CH353 2S1P card (16550 clone) */
1756 .vendor = PCI_VENDOR_ID_WCH,
1757 .device = PCI_DEVICE_ID_WCH_CH353_2S1P,
1758 .subvendor = PCI_ANY_ID,
1759 .subdevice = PCI_ANY_ID,
1760 .setup = pci_wch_ch353_setup,
1762 /* WCH CH353 4S card (16550 clone) */
1764 .vendor = PCI_VENDOR_ID_WCH,
1765 .device = PCI_DEVICE_ID_WCH_CH353_4S,
1766 .subvendor = PCI_ANY_ID,
1767 .subdevice = PCI_ANY_ID,
1768 .setup = pci_wch_ch353_setup,
1770 /* WCH CH353 2S1PF card (16550 clone) */
1772 .vendor = PCI_VENDOR_ID_WCH,
1773 .device = PCI_DEVICE_ID_WCH_CH353_2S1PF,
1774 .subvendor = PCI_ANY_ID,
1775 .subdevice = PCI_ANY_ID,
1776 .setup = pci_wch_ch353_setup,
1779 * ASIX devices with FIFO bug
1782 .vendor = PCI_VENDOR_ID_ASIX,
1783 .device = PCI_ANY_ID,
1784 .subvendor = PCI_ANY_ID,
1785 .subdevice = PCI_ANY_ID,
1786 .setup = pci_asix_setup,
1789 * Default "match everything" terminator entry
1792 .vendor = PCI_ANY_ID,
1793 .device = PCI_ANY_ID,
1794 .subvendor = PCI_ANY_ID,
1795 .subdevice = PCI_ANY_ID,
1796 .setup = pci_default_setup,
1800 static inline int quirk_id_matches(u32 quirk_id, u32 dev_id)
1802 return quirk_id == PCI_ANY_ID || quirk_id == dev_id;
1805 static struct pci_serial_quirk *find_quirk(struct pci_dev *dev)
1807 struct pci_serial_quirk *quirk;
1809 for (quirk = pci_serial_quirks; ; quirk++)
1810 if (quirk_id_matches(quirk->vendor, dev->vendor) &&
1811 quirk_id_matches(quirk->device, dev->device) &&
1812 quirk_id_matches(quirk->subvendor, dev->subsystem_vendor) &&
1813 quirk_id_matches(quirk->subdevice, dev->subsystem_device))
1818 static inline int get_pci_irq(struct pci_dev *dev,
1819 const struct pciserial_board *board)
1821 if (board->flags & FL_NOIRQ)
1828 * This is the configuration table for all of the PCI serial boards
1829 * which we support. It is directly indexed by the pci_board_num_t enum
1830 * value, which is encoded in the pci_device_id PCI probe table's
1831 * driver_data member.
1833 * The makeup of these names are:
1834 * pbn_bn{_bt}_n_baud{_offsetinhex}
1836 * bn = PCI BAR number
1837 * bt = Index using PCI BARs
1838 * n = number of serial ports
1840 * offsetinhex = offset for each sequential port (in hex)
1842 * This table is sorted by (in order): bn, bt, baud, offsetindex, n.
1844 * Please note: in theory if n = 1, _bt infix should make no difference.
1845 * ie, pbn_b0_1_115200 is the same as pbn_b0_bt_1_115200
1847 enum pci_board_num_t {
1867 pbn_b0_2_1843200_200,
1868 pbn_b0_4_1843200_200,
1869 pbn_b0_8_1843200_200,
1943 * Board-specific versions.
1950 pbn_oxsemi_1_4000000,
1951 pbn_oxsemi_2_4000000,
1952 pbn_oxsemi_4_4000000,
1953 pbn_oxsemi_8_4000000,
1963 pbn_exar_ibm_saturn,
1969 pbn_ADDIDATA_PCIe_1_3906250,
1970 pbn_ADDIDATA_PCIe_2_3906250,
1971 pbn_ADDIDATA_PCIe_4_3906250,
1972 pbn_ADDIDATA_PCIe_8_3906250,
1973 pbn_ce4100_1_115200,
1975 pbn_NETMOS9900_2s_115200,
1979 * uart_offset - the space between channels
1980 * reg_shift - describes how the UART registers are mapped
1981 * to PCI memory by the card.
1982 * For example IER register on SBS, Inc. PMC-OctPro is located at
1983 * offset 0x10 from the UART base, while UART_IER is defined as 1
1984 * in include/linux/serial_reg.h,
1985 * see first lines of serial_in() and serial_out() in 8250.c
1988 static struct pciserial_board pci_boards[] __devinitdata = {
1992 .base_baud = 115200,
1995 [pbn_b0_1_115200] = {
1998 .base_baud = 115200,
2001 [pbn_b0_2_115200] = {
2004 .base_baud = 115200,
2007 [pbn_b0_4_115200] = {
2010 .base_baud = 115200,
2013 [pbn_b0_5_115200] = {
2016 .base_baud = 115200,
2019 [pbn_b0_8_115200] = {
2022 .base_baud = 115200,
2025 [pbn_b0_1_921600] = {
2028 .base_baud = 921600,
2031 [pbn_b0_2_921600] = {
2034 .base_baud = 921600,
2037 [pbn_b0_4_921600] = {
2040 .base_baud = 921600,
2044 [pbn_b0_2_1130000] = {
2047 .base_baud = 1130000,
2051 [pbn_b0_4_1152000] = {
2054 .base_baud = 1152000,
2058 [pbn_b0_2_1843200] = {
2061 .base_baud = 1843200,
2064 [pbn_b0_4_1843200] = {
2067 .base_baud = 1843200,
2071 [pbn_b0_2_1843200_200] = {
2074 .base_baud = 1843200,
2075 .uart_offset = 0x200,
2077 [pbn_b0_4_1843200_200] = {
2080 .base_baud = 1843200,
2081 .uart_offset = 0x200,
2083 [pbn_b0_8_1843200_200] = {
2086 .base_baud = 1843200,
2087 .uart_offset = 0x200,
2089 [pbn_b0_1_4000000] = {
2092 .base_baud = 4000000,
2096 [pbn_b0_bt_1_115200] = {
2097 .flags = FL_BASE0|FL_BASE_BARS,
2099 .base_baud = 115200,
2102 [pbn_b0_bt_2_115200] = {
2103 .flags = FL_BASE0|FL_BASE_BARS,
2105 .base_baud = 115200,
2108 [pbn_b0_bt_4_115200] = {
2109 .flags = FL_BASE0|FL_BASE_BARS,
2111 .base_baud = 115200,
2114 [pbn_b0_bt_8_115200] = {
2115 .flags = FL_BASE0|FL_BASE_BARS,
2117 .base_baud = 115200,
2121 [pbn_b0_bt_1_460800] = {
2122 .flags = FL_BASE0|FL_BASE_BARS,
2124 .base_baud = 460800,
2127 [pbn_b0_bt_2_460800] = {
2128 .flags = FL_BASE0|FL_BASE_BARS,
2130 .base_baud = 460800,
2133 [pbn_b0_bt_4_460800] = {
2134 .flags = FL_BASE0|FL_BASE_BARS,
2136 .base_baud = 460800,
2140 [pbn_b0_bt_1_921600] = {
2141 .flags = FL_BASE0|FL_BASE_BARS,
2143 .base_baud = 921600,
2146 [pbn_b0_bt_2_921600] = {
2147 .flags = FL_BASE0|FL_BASE_BARS,
2149 .base_baud = 921600,
2152 [pbn_b0_bt_4_921600] = {
2153 .flags = FL_BASE0|FL_BASE_BARS,
2155 .base_baud = 921600,
2158 [pbn_b0_bt_8_921600] = {
2159 .flags = FL_BASE0|FL_BASE_BARS,
2161 .base_baud = 921600,
2165 [pbn_b1_1_115200] = {
2168 .base_baud = 115200,
2171 [pbn_b1_2_115200] = {
2174 .base_baud = 115200,
2177 [pbn_b1_4_115200] = {
2180 .base_baud = 115200,
2183 [pbn_b1_8_115200] = {
2186 .base_baud = 115200,
2189 [pbn_b1_16_115200] = {
2192 .base_baud = 115200,
2196 [pbn_b1_1_921600] = {
2199 .base_baud = 921600,
2202 [pbn_b1_2_921600] = {
2205 .base_baud = 921600,
2208 [pbn_b1_4_921600] = {
2211 .base_baud = 921600,
2214 [pbn_b1_8_921600] = {
2217 .base_baud = 921600,
2220 [pbn_b1_2_1250000] = {
2223 .base_baud = 1250000,
2227 [pbn_b1_bt_1_115200] = {
2228 .flags = FL_BASE1|FL_BASE_BARS,
2230 .base_baud = 115200,
2233 [pbn_b1_bt_2_115200] = {
2234 .flags = FL_BASE1|FL_BASE_BARS,
2236 .base_baud = 115200,
2239 [pbn_b1_bt_4_115200] = {
2240 .flags = FL_BASE1|FL_BASE_BARS,
2242 .base_baud = 115200,
2246 [pbn_b1_bt_2_921600] = {
2247 .flags = FL_BASE1|FL_BASE_BARS,
2249 .base_baud = 921600,
2253 [pbn_b1_1_1382400] = {
2256 .base_baud = 1382400,
2259 [pbn_b1_2_1382400] = {
2262 .base_baud = 1382400,
2265 [pbn_b1_4_1382400] = {
2268 .base_baud = 1382400,
2271 [pbn_b1_8_1382400] = {
2274 .base_baud = 1382400,
2278 [pbn_b2_1_115200] = {
2281 .base_baud = 115200,
2284 [pbn_b2_2_115200] = {
2287 .base_baud = 115200,
2290 [pbn_b2_4_115200] = {
2293 .base_baud = 115200,
2296 [pbn_b2_8_115200] = {
2299 .base_baud = 115200,
2303 [pbn_b2_1_460800] = {
2306 .base_baud = 460800,
2309 [pbn_b2_4_460800] = {
2312 .base_baud = 460800,
2315 [pbn_b2_8_460800] = {
2318 .base_baud = 460800,
2321 [pbn_b2_16_460800] = {
2324 .base_baud = 460800,
2328 [pbn_b2_1_921600] = {
2331 .base_baud = 921600,
2334 [pbn_b2_4_921600] = {
2337 .base_baud = 921600,
2340 [pbn_b2_8_921600] = {
2343 .base_baud = 921600,
2347 [pbn_b2_8_1152000] = {
2350 .base_baud = 1152000,
2354 [pbn_b2_bt_1_115200] = {
2355 .flags = FL_BASE2|FL_BASE_BARS,
2357 .base_baud = 115200,
2360 [pbn_b2_bt_2_115200] = {
2361 .flags = FL_BASE2|FL_BASE_BARS,
2363 .base_baud = 115200,
2366 [pbn_b2_bt_4_115200] = {
2367 .flags = FL_BASE2|FL_BASE_BARS,
2369 .base_baud = 115200,
2373 [pbn_b2_bt_2_921600] = {
2374 .flags = FL_BASE2|FL_BASE_BARS,
2376 .base_baud = 921600,
2379 [pbn_b2_bt_4_921600] = {
2380 .flags = FL_BASE2|FL_BASE_BARS,
2382 .base_baud = 921600,
2386 [pbn_b3_2_115200] = {
2389 .base_baud = 115200,
2392 [pbn_b3_4_115200] = {
2395 .base_baud = 115200,
2398 [pbn_b3_8_115200] = {
2401 .base_baud = 115200,
2405 [pbn_b4_bt_2_921600] = {
2408 .base_baud = 921600,
2411 [pbn_b4_bt_4_921600] = {
2414 .base_baud = 921600,
2417 [pbn_b4_bt_8_921600] = {
2420 .base_baud = 921600,
2425 * Entries following this are board-specific.
2434 .base_baud = 921600,
2435 .uart_offset = 0x400,
2439 .flags = FL_BASE2|FL_BASE_BARS,
2441 .base_baud = 921600,
2442 .uart_offset = 0x400,
2446 .flags = FL_BASE2|FL_BASE_BARS,
2448 .base_baud = 921600,
2449 .uart_offset = 0x400,
2453 /* I think this entry is broken - the first_offset looks wrong --rmk */
2454 [pbn_plx_romulus] = {
2457 .base_baud = 921600,
2458 .uart_offset = 8 << 2,
2460 .first_offset = 0x03,
2464 * This board uses the size of PCI Base region 0 to
2465 * signal now many ports are available
2468 .flags = FL_BASE0|FL_REGION_SZ_CAP,
2470 .base_baud = 115200,
2473 [pbn_oxsemi_1_4000000] = {
2476 .base_baud = 4000000,
2477 .uart_offset = 0x200,
2478 .first_offset = 0x1000,
2480 [pbn_oxsemi_2_4000000] = {
2483 .base_baud = 4000000,
2484 .uart_offset = 0x200,
2485 .first_offset = 0x1000,
2487 [pbn_oxsemi_4_4000000] = {
2490 .base_baud = 4000000,
2491 .uart_offset = 0x200,
2492 .first_offset = 0x1000,
2494 [pbn_oxsemi_8_4000000] = {
2497 .base_baud = 4000000,
2498 .uart_offset = 0x200,
2499 .first_offset = 0x1000,
2504 * EKF addition for i960 Boards form EKF with serial port.
2507 [pbn_intel_i960] = {
2510 .base_baud = 921600,
2511 .uart_offset = 8 << 2,
2513 .first_offset = 0x10000,
2516 .flags = FL_BASE0|FL_NOIRQ,
2518 .base_baud = 458333,
2521 .first_offset = 0x20178,
2525 * Computone - uses IOMEM.
2527 [pbn_computone_4] = {
2530 .base_baud = 921600,
2531 .uart_offset = 0x40,
2533 .first_offset = 0x200,
2535 [pbn_computone_6] = {
2538 .base_baud = 921600,
2539 .uart_offset = 0x40,
2541 .first_offset = 0x200,
2543 [pbn_computone_8] = {
2546 .base_baud = 921600,
2547 .uart_offset = 0x40,
2549 .first_offset = 0x200,
2554 .base_baud = 460800,
2559 * Exar Corp. XR17C15[248] Dual/Quad/Octal UART
2560 * Only basic 16550A support.
2561 * XR17C15[24] are not tested, but they should work.
2563 [pbn_exar_XR17C152] = {
2566 .base_baud = 921600,
2567 .uart_offset = 0x200,
2569 [pbn_exar_XR17C154] = {
2572 .base_baud = 921600,
2573 .uart_offset = 0x200,
2575 [pbn_exar_XR17C158] = {
2578 .base_baud = 921600,
2579 .uart_offset = 0x200,
2581 [pbn_exar_ibm_saturn] = {
2584 .base_baud = 921600,
2585 .uart_offset = 0x200,
2589 * PA Semi PWRficient PA6T-1682M on-chip UART
2591 [pbn_pasemi_1682M] = {
2594 .base_baud = 8333333,
2597 * National Instruments 843x
2602 .base_baud = 3686400,
2603 .uart_offset = 0x10,
2604 .first_offset = 0x800,
2609 .base_baud = 3686400,
2610 .uart_offset = 0x10,
2611 .first_offset = 0x800,
2616 .base_baud = 3686400,
2617 .uart_offset = 0x10,
2618 .first_offset = 0x800,
2623 .base_baud = 3686400,
2624 .uart_offset = 0x10,
2625 .first_offset = 0x800,
2628 * ADDI-DATA GmbH PCI-Express communication cards <info@addi-data.com>
2630 [pbn_ADDIDATA_PCIe_1_3906250] = {
2633 .base_baud = 3906250,
2634 .uart_offset = 0x200,
2635 .first_offset = 0x1000,
2637 [pbn_ADDIDATA_PCIe_2_3906250] = {
2640 .base_baud = 3906250,
2641 .uart_offset = 0x200,
2642 .first_offset = 0x1000,
2644 [pbn_ADDIDATA_PCIe_4_3906250] = {
2647 .base_baud = 3906250,
2648 .uart_offset = 0x200,
2649 .first_offset = 0x1000,
2651 [pbn_ADDIDATA_PCIe_8_3906250] = {
2654 .base_baud = 3906250,
2655 .uart_offset = 0x200,
2656 .first_offset = 0x1000,
2658 [pbn_ce4100_1_115200] = {
2661 .base_baud = 921600,
2667 .base_baud = 115200,
2668 .uart_offset = 0x200,
2670 [pbn_NETMOS9900_2s_115200] = {
2673 .base_baud = 115200,
2677 static const struct pci_device_id blacklist[] = {
2679 { PCI_VDEVICE(AL, 0x5457), }, /* ALi Corporation M5457 AC'97 Modem */
2680 { PCI_VDEVICE(MOTOROLA, 0x3052), }, /* Motorola Si3052-based modem */
2681 { PCI_DEVICE(0x1543, 0x3052), }, /* Si3052-based modem, default IDs */
2683 /* multi-io cards handled by parport_serial */
2684 { PCI_DEVICE(0x4348, 0x7053), }, /* WCH CH353 2S1P */
2688 * Given a complete unknown PCI device, try to use some heuristics to
2689 * guess what the configuration might be, based on the pitiful PCI
2690 * serial specs. Returns 0 on success, 1 on failure.
2692 static int __devinit
2693 serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
2695 const struct pci_device_id *bldev;
2696 int num_iomem, num_port, first_port = -1, i;
2699 * If it is not a communications device or the programming
2700 * interface is greater than 6, give up.
2702 * (Should we try to make guesses for multiport serial devices
2705 if ((((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL) &&
2706 ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MODEM)) ||
2707 (dev->class & 0xff) > 6)
2711 * Do not access blacklisted devices that are known not to
2712 * feature serial ports or are handled by other modules.
2714 for (bldev = blacklist;
2715 bldev < blacklist + ARRAY_SIZE(blacklist);
2717 if (dev->vendor == bldev->vendor &&
2718 dev->device == bldev->device)
2722 num_iomem = num_port = 0;
2723 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
2724 if (pci_resource_flags(dev, i) & IORESOURCE_IO) {
2726 if (first_port == -1)
2729 if (pci_resource_flags(dev, i) & IORESOURCE_MEM)
2734 * If there is 1 or 0 iomem regions, and exactly one port,
2735 * use it. We guess the number of ports based on the IO
2738 if (num_iomem <= 1 && num_port == 1) {
2739 board->flags = first_port;
2740 board->num_ports = pci_resource_len(dev, first_port) / 8;
2745 * Now guess if we've got a board which indexes by BARs.
2746 * Each IO BAR should be 8 bytes, and they should follow
2751 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
2752 if (pci_resource_flags(dev, i) & IORESOURCE_IO &&
2753 pci_resource_len(dev, i) == 8 &&
2754 (first_port == -1 || (first_port + num_port) == i)) {
2756 if (first_port == -1)
2762 board->flags = first_port | FL_BASE_BARS;
2763 board->num_ports = num_port;
2771 serial_pci_matches(const struct pciserial_board *board,
2772 const struct pciserial_board *guessed)
2775 board->num_ports == guessed->num_ports &&
2776 board->base_baud == guessed->base_baud &&
2777 board->uart_offset == guessed->uart_offset &&
2778 board->reg_shift == guessed->reg_shift &&
2779 board->first_offset == guessed->first_offset;
2782 struct serial_private *
2783 pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board)
2785 struct uart_8250_port uart;
2786 struct serial_private *priv;
2787 struct pci_serial_quirk *quirk;
2788 int rc, nr_ports, i;
2790 nr_ports = board->num_ports;
2793 * Find an init and setup quirks.
2795 quirk = find_quirk(dev);
2798 * Run the new-style initialization function.
2799 * The initialization function returns:
2801 * 0 - use board->num_ports
2802 * >0 - number of ports
2805 rc = quirk->init(dev);
2814 priv = kzalloc(sizeof(struct serial_private) +
2815 sizeof(unsigned int) * nr_ports,
2818 priv = ERR_PTR(-ENOMEM);
2823 priv->quirk = quirk;
2825 memset(&uart, 0, sizeof(uart));
2826 uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;
2827 uart.port.uartclk = board->base_baud * 16;
2828 uart.port.irq = get_pci_irq(dev, board);
2829 uart.port.dev = &dev->dev;
2831 for (i = 0; i < nr_ports; i++) {
2832 if (quirk->setup(priv, board, &uart, i))
2835 #ifdef SERIAL_DEBUG_PCI
2836 printk(KERN_DEBUG "Setup PCI port: port %lx, irq %d, type %d\n",
2837 uart.port.iobase, uart.port.irq, uart.port.iotype);
2840 priv->line[i] = serial8250_register_8250_port(&uart);
2841 if (priv->line[i] < 0) {
2842 printk(KERN_WARNING "Couldn't register serial port %s: %d\n", pci_name(dev), priv->line[i]);
2855 EXPORT_SYMBOL_GPL(pciserial_init_ports);
2857 void pciserial_remove_ports(struct serial_private *priv)
2859 struct pci_serial_quirk *quirk;
2862 for (i = 0; i < priv->nr; i++)
2863 serial8250_unregister_port(priv->line[i]);
2865 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
2866 if (priv->remapped_bar[i])
2867 iounmap(priv->remapped_bar[i]);
2868 priv->remapped_bar[i] = NULL;
2872 * Find the exit quirks.
2874 quirk = find_quirk(priv->dev);
2876 quirk->exit(priv->dev);
2880 EXPORT_SYMBOL_GPL(pciserial_remove_ports);
2882 void pciserial_suspend_ports(struct serial_private *priv)
2886 for (i = 0; i < priv->nr; i++)
2887 if (priv->line[i] >= 0)
2888 serial8250_suspend_port(priv->line[i]);
2891 * Ensure that every init quirk is properly torn down
2893 if (priv->quirk->exit)
2894 priv->quirk->exit(priv->dev);
2896 EXPORT_SYMBOL_GPL(pciserial_suspend_ports);
2898 void pciserial_resume_ports(struct serial_private *priv)
2903 * Ensure that the board is correctly configured.
2905 if (priv->quirk->init)
2906 priv->quirk->init(priv->dev);
2908 for (i = 0; i < priv->nr; i++)
2909 if (priv->line[i] >= 0)
2910 serial8250_resume_port(priv->line[i]);
2912 EXPORT_SYMBOL_GPL(pciserial_resume_ports);
2915 * Probe one serial board. Unfortunately, there is no rhyme nor reason
2916 * to the arrangement of serial ports on a PCI card.
2918 static int __devinit
2919 pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent)
2921 struct pci_serial_quirk *quirk;
2922 struct serial_private *priv;
2923 const struct pciserial_board *board;
2924 struct pciserial_board tmp;
2927 quirk = find_quirk(dev);
2929 rc = quirk->probe(dev);
2934 if (ent->driver_data >= ARRAY_SIZE(pci_boards)) {
2935 printk(KERN_ERR "pci_init_one: invalid driver_data: %ld\n",
2940 board = &pci_boards[ent->driver_data];
2942 rc = pci_enable_device(dev);
2943 pci_save_state(dev);
2947 if (ent->driver_data == pbn_default) {
2949 * Use a copy of the pci_board entry for this;
2950 * avoid changing entries in the table.
2952 memcpy(&tmp, board, sizeof(struct pciserial_board));
2956 * We matched one of our class entries. Try to
2957 * determine the parameters of this board.
2959 rc = serial_pci_guess_board(dev, &tmp);
2964 * We matched an explicit entry. If we are able to
2965 * detect this boards settings with our heuristic,
2966 * then we no longer need this entry.
2968 memcpy(&tmp, &pci_boards[pbn_default],
2969 sizeof(struct pciserial_board));
2970 rc = serial_pci_guess_board(dev, &tmp);
2971 if (rc == 0 && serial_pci_matches(board, &tmp))
2972 moan_device("Redundant entry in serial pci_table.",
2976 priv = pciserial_init_ports(dev, board);
2977 if (!IS_ERR(priv)) {
2978 pci_set_drvdata(dev, priv);
2985 pci_disable_device(dev);
2989 static void __devexit pciserial_remove_one(struct pci_dev *dev)
2991 struct serial_private *priv = pci_get_drvdata(dev);
2993 pci_set_drvdata(dev, NULL);
2995 pciserial_remove_ports(priv);
2997 pci_disable_device(dev);
3001 static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state)
3003 struct serial_private *priv = pci_get_drvdata(dev);
3006 pciserial_suspend_ports(priv);
3008 pci_save_state(dev);
3009 pci_set_power_state(dev, pci_choose_state(dev, state));
3013 static int pciserial_resume_one(struct pci_dev *dev)
3016 struct serial_private *priv = pci_get_drvdata(dev);
3018 pci_set_power_state(dev, PCI_D0);
3019 pci_restore_state(dev);
3023 * The device may have been disabled. Re-enable it.
3025 err = pci_enable_device(dev);
3026 /* FIXME: We cannot simply error out here */
3028 printk(KERN_ERR "pciserial: Unable to re-enable ports, trying to continue.\n");
3029 pciserial_resume_ports(priv);
3035 static struct pci_device_id serial_pci_tbl[] = {
3036 /* Advantech use PCI_DEVICE_ID_ADVANTECH_PCI3620 (0x3620) as 'PCI_SUBVENDOR_ID' */
3037 { PCI_VENDOR_ID_ADVANTECH, PCI_DEVICE_ID_ADVANTECH_PCI3620,
3038 PCI_DEVICE_ID_ADVANTECH_PCI3620, 0x0001, 0, 0,
3040 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
3041 PCI_SUBVENDOR_ID_CONNECT_TECH,
3042 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0,
3044 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
3045 PCI_SUBVENDOR_ID_CONNECT_TECH,
3046 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232, 0, 0,
3048 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
3049 PCI_SUBVENDOR_ID_CONNECT_TECH,
3050 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232, 0, 0,
3052 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3053 PCI_SUBVENDOR_ID_CONNECT_TECH,
3054 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0,
3056 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3057 PCI_SUBVENDOR_ID_CONNECT_TECH,
3058 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232, 0, 0,
3060 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3061 PCI_SUBVENDOR_ID_CONNECT_TECH,
3062 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232, 0, 0,
3064 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3065 PCI_SUBVENDOR_ID_CONNECT_TECH,
3066 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485, 0, 0,
3068 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3069 PCI_SUBVENDOR_ID_CONNECT_TECH,
3070 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4, 0, 0,
3072 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3073 PCI_SUBVENDOR_ID_CONNECT_TECH,
3074 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485, 0, 0,
3076 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3077 PCI_SUBVENDOR_ID_CONNECT_TECH,
3078 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2, 0, 0,
3080 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3081 PCI_SUBVENDOR_ID_CONNECT_TECH,
3082 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485, 0, 0,
3084 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3085 PCI_SUBVENDOR_ID_CONNECT_TECH,
3086 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6, 0, 0,
3088 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3089 PCI_SUBVENDOR_ID_CONNECT_TECH,
3090 PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1, 0, 0,
3092 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3093 PCI_SUBVENDOR_ID_CONNECT_TECH,
3094 PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1, 0, 0,
3096 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3097 PCI_SUBVENDOR_ID_CONNECT_TECH,
3098 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_20MHZ, 0, 0,
3100 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
3101 PCI_SUBVENDOR_ID_CONNECT_TECH,
3102 PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_2, 0, 0,
3104 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
3105 PCI_SUBVENDOR_ID_CONNECT_TECH,
3106 PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_4, 0, 0,
3108 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
3109 PCI_VENDOR_ID_AFAVLAB,
3110 PCI_SUBDEVICE_ID_AFAVLAB_P061, 0, 0,
3112 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
3113 PCI_SUBVENDOR_ID_CONNECT_TECH,
3114 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_232, 0, 0,
3115 pbn_b0_2_1843200_200 },
3116 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
3117 PCI_SUBVENDOR_ID_CONNECT_TECH,
3118 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_232, 0, 0,
3119 pbn_b0_4_1843200_200 },
3120 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
3121 PCI_SUBVENDOR_ID_CONNECT_TECH,
3122 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_232, 0, 0,
3123 pbn_b0_8_1843200_200 },
3124 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
3125 PCI_SUBVENDOR_ID_CONNECT_TECH,
3126 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_1_1, 0, 0,
3127 pbn_b0_2_1843200_200 },
3128 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
3129 PCI_SUBVENDOR_ID_CONNECT_TECH,
3130 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_2, 0, 0,
3131 pbn_b0_4_1843200_200 },
3132 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
3133 PCI_SUBVENDOR_ID_CONNECT_TECH,
3134 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4, 0, 0,
3135 pbn_b0_8_1843200_200 },
3136 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
3137 PCI_SUBVENDOR_ID_CONNECT_TECH,
3138 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2, 0, 0,
3139 pbn_b0_2_1843200_200 },
3140 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
3141 PCI_SUBVENDOR_ID_CONNECT_TECH,
3142 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4, 0, 0,
3143 pbn_b0_4_1843200_200 },
3144 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
3145 PCI_SUBVENDOR_ID_CONNECT_TECH,
3146 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8, 0, 0,
3147 pbn_b0_8_1843200_200 },
3148 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
3149 PCI_SUBVENDOR_ID_CONNECT_TECH,
3150 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_485, 0, 0,
3151 pbn_b0_2_1843200_200 },
3152 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
3153 PCI_SUBVENDOR_ID_CONNECT_TECH,
3154 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485, 0, 0,
3155 pbn_b0_4_1843200_200 },
3156 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
3157 PCI_SUBVENDOR_ID_CONNECT_TECH,
3158 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485, 0, 0,
3159 pbn_b0_8_1843200_200 },
3160 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
3161 PCI_VENDOR_ID_IBM, PCI_SUBDEVICE_ID_IBM_SATURN_SERIAL_ONE_PORT,
3162 0, 0, pbn_exar_ibm_saturn },
3164 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_U530,
3165 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3166 pbn_b2_bt_1_115200 },
3167 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM2,
3168 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3169 pbn_b2_bt_2_115200 },
3170 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM422,
3171 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3172 pbn_b2_bt_4_115200 },
3173 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM232,
3174 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3175 pbn_b2_bt_2_115200 },
3176 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM4,
3177 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3178 pbn_b2_bt_4_115200 },
3179 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM8,
3180 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3182 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_7803,
3183 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3185 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM8,
3186 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3189 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_GTEK_SERIAL2,
3190 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3191 pbn_b2_bt_2_115200 },
3192 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_SPCOM200,
3193 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3194 pbn_b2_bt_2_921600 },
3196 * VScom SPCOM800, from sl@s.pl
3198 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_SPCOM800,
3199 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3201 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_1077,
3202 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3204 /* Unknown card - subdevice 0x1584 */
3205 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
3207 PCI_SUBDEVICE_ID_UNKNOWN_0x1584, 0, 0,
3209 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
3210 PCI_SUBVENDOR_ID_KEYSPAN,
3211 PCI_SUBDEVICE_ID_KEYSPAN_SX2, 0, 0,
3213 { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_QUADMODEM,
3214 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3216 { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_DUALMODEM,
3217 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3219 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
3220 PCI_VENDOR_ID_ESDGMBH,
3221 PCI_DEVICE_ID_ESDGMBH_CPCIASIO4, 0, 0,
3223 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
3224 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
3225 PCI_SUBDEVICE_ID_CHASE_PCIFAST4, 0, 0,
3227 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
3228 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
3229 PCI_SUBDEVICE_ID_CHASE_PCIFAST8, 0, 0,
3231 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
3232 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
3233 PCI_SUBDEVICE_ID_CHASE_PCIFAST16, 0, 0,
3235 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
3236 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
3237 PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC, 0, 0,
3239 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
3240 PCI_SUBVENDOR_ID_CHASE_PCIRAS,
3241 PCI_SUBDEVICE_ID_CHASE_PCIRAS4, 0, 0,
3243 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
3244 PCI_SUBVENDOR_ID_CHASE_PCIRAS,
3245 PCI_SUBDEVICE_ID_CHASE_PCIRAS8, 0, 0,
3247 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
3248 PCI_SUBVENDOR_ID_EXSYS,
3249 PCI_SUBDEVICE_ID_EXSYS_4055, 0, 0,
3252 * Megawolf Romulus PCI Serial Card, from Mike Hudson
3255 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_ROMULUS,
3256 0x10b5, 0x106a, 0, 0,
3258 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSC100,
3259 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3261 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC100,
3262 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3264 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100D,
3265 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3267 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100M,
3268 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3270 { PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_OXSEMI_16PCI954,
3271 PCI_VENDOR_ID_SPECIALIX, PCI_SUBDEVICE_ID_SPECIALIX_SPEED4,
3274 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
3275 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL,
3278 { PCI_VENDOR_ID_OXSEMI, 0x9505,
3279 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3280 pbn_b0_bt_2_921600 },
3283 * The below card is a little controversial since it is the
3284 * subject of a PCI vendor/device ID clash. (See
3285 * www.ussg.iu.edu/hypermail/linux/kernel/0303.1/0516.html).
3286 * For now just used the hex ID 0x950a.
3288 { PCI_VENDOR_ID_OXSEMI, 0x950a,
3289 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_DUAL_SERIAL, 0, 0,
3291 { PCI_VENDOR_ID_OXSEMI, 0x950a,
3292 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3294 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_C950,
3295 PCI_VENDOR_ID_OXSEMI, PCI_SUBDEVICE_ID_OXSEMI_C950, 0, 0,
3297 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
3298 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3300 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI952,
3301 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3302 pbn_b0_bt_2_921600 },
3303 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI958,
3304 PCI_ANY_ID , PCI_ANY_ID, 0, 0,
3308 * Oxford Semiconductor Inc. Tornado PCI express device range.
3310 { PCI_VENDOR_ID_OXSEMI, 0xc101, /* OXPCIe952 1 Legacy UART */
3311 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3313 { PCI_VENDOR_ID_OXSEMI, 0xc105, /* OXPCIe952 1 Legacy UART */
3314 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3316 { PCI_VENDOR_ID_OXSEMI, 0xc11b, /* OXPCIe952 1 Native UART */
3317 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3318 pbn_oxsemi_1_4000000 },
3319 { PCI_VENDOR_ID_OXSEMI, 0xc11f, /* OXPCIe952 1 Native UART */
3320 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3321 pbn_oxsemi_1_4000000 },
3322 { PCI_VENDOR_ID_OXSEMI, 0xc120, /* OXPCIe952 1 Legacy UART */
3323 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3325 { PCI_VENDOR_ID_OXSEMI, 0xc124, /* OXPCIe952 1 Legacy UART */
3326 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3328 { PCI_VENDOR_ID_OXSEMI, 0xc138, /* OXPCIe952 1 Native UART */
3329 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3330 pbn_oxsemi_1_4000000 },
3331 { PCI_VENDOR_ID_OXSEMI, 0xc13d, /* OXPCIe952 1 Native UART */
3332 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3333 pbn_oxsemi_1_4000000 },
3334 { PCI_VENDOR_ID_OXSEMI, 0xc140, /* OXPCIe952 1 Legacy UART */
3335 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3337 { PCI_VENDOR_ID_OXSEMI, 0xc141, /* OXPCIe952 1 Legacy UART */
3338 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3340 { PCI_VENDOR_ID_OXSEMI, 0xc144, /* OXPCIe952 1 Legacy UART */
3341 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3343 { PCI_VENDOR_ID_OXSEMI, 0xc145, /* OXPCIe952 1 Legacy UART */
3344 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3346 { PCI_VENDOR_ID_OXSEMI, 0xc158, /* OXPCIe952 2 Native UART */
3347 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3348 pbn_oxsemi_2_4000000 },
3349 { PCI_VENDOR_ID_OXSEMI, 0xc15d, /* OXPCIe952 2 Native UART */
3350 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3351 pbn_oxsemi_2_4000000 },
3352 { PCI_VENDOR_ID_OXSEMI, 0xc208, /* OXPCIe954 4 Native UART */
3353 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3354 pbn_oxsemi_4_4000000 },
3355 { PCI_VENDOR_ID_OXSEMI, 0xc20d, /* OXPCIe954 4 Native UART */
3356 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3357 pbn_oxsemi_4_4000000 },
3358 { PCI_VENDOR_ID_OXSEMI, 0xc308, /* OXPCIe958 8 Native UART */
3359 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3360 pbn_oxsemi_8_4000000 },
3361 { PCI_VENDOR_ID_OXSEMI, 0xc30d, /* OXPCIe958 8 Native UART */
3362 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3363 pbn_oxsemi_8_4000000 },
3364 { PCI_VENDOR_ID_OXSEMI, 0xc40b, /* OXPCIe200 1 Native UART */
3365 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3366 pbn_oxsemi_1_4000000 },
3367 { PCI_VENDOR_ID_OXSEMI, 0xc40f, /* OXPCIe200 1 Native UART */
3368 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3369 pbn_oxsemi_1_4000000 },
3370 { PCI_VENDOR_ID_OXSEMI, 0xc41b, /* OXPCIe200 1 Native UART */
3371 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3372 pbn_oxsemi_1_4000000 },
3373 { PCI_VENDOR_ID_OXSEMI, 0xc41f, /* OXPCIe200 1 Native UART */
3374 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3375 pbn_oxsemi_1_4000000 },
3376 { PCI_VENDOR_ID_OXSEMI, 0xc42b, /* OXPCIe200 1 Native UART */
3377 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3378 pbn_oxsemi_1_4000000 },
3379 { PCI_VENDOR_ID_OXSEMI, 0xc42f, /* OXPCIe200 1 Native UART */
3380 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3381 pbn_oxsemi_1_4000000 },
3382 { PCI_VENDOR_ID_OXSEMI, 0xc43b, /* OXPCIe200 1 Native UART */
3383 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3384 pbn_oxsemi_1_4000000 },
3385 { PCI_VENDOR_ID_OXSEMI, 0xc43f, /* OXPCIe200 1 Native UART */
3386 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3387 pbn_oxsemi_1_4000000 },
3388 { PCI_VENDOR_ID_OXSEMI, 0xc44b, /* OXPCIe200 1 Native UART */
3389 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3390 pbn_oxsemi_1_4000000 },
3391 { PCI_VENDOR_ID_OXSEMI, 0xc44f, /* OXPCIe200 1 Native UART */
3392 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3393 pbn_oxsemi_1_4000000 },
3394 { PCI_VENDOR_ID_OXSEMI, 0xc45b, /* OXPCIe200 1 Native UART */
3395 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3396 pbn_oxsemi_1_4000000 },
3397 { PCI_VENDOR_ID_OXSEMI, 0xc45f, /* OXPCIe200 1 Native UART */
3398 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3399 pbn_oxsemi_1_4000000 },
3400 { PCI_VENDOR_ID_OXSEMI, 0xc46b, /* OXPCIe200 1 Native UART */
3401 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3402 pbn_oxsemi_1_4000000 },
3403 { PCI_VENDOR_ID_OXSEMI, 0xc46f, /* OXPCIe200 1 Native UART */
3404 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3405 pbn_oxsemi_1_4000000 },
3406 { PCI_VENDOR_ID_OXSEMI, 0xc47b, /* OXPCIe200 1 Native UART */
3407 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3408 pbn_oxsemi_1_4000000 },
3409 { PCI_VENDOR_ID_OXSEMI, 0xc47f, /* OXPCIe200 1 Native UART */
3410 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3411 pbn_oxsemi_1_4000000 },
3412 { PCI_VENDOR_ID_OXSEMI, 0xc48b, /* OXPCIe200 1 Native UART */
3413 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3414 pbn_oxsemi_1_4000000 },
3415 { PCI_VENDOR_ID_OXSEMI, 0xc48f, /* OXPCIe200 1 Native UART */
3416 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3417 pbn_oxsemi_1_4000000 },
3418 { PCI_VENDOR_ID_OXSEMI, 0xc49b, /* OXPCIe200 1 Native UART */
3419 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3420 pbn_oxsemi_1_4000000 },
3421 { PCI_VENDOR_ID_OXSEMI, 0xc49f, /* OXPCIe200 1 Native UART */
3422 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3423 pbn_oxsemi_1_4000000 },
3424 { PCI_VENDOR_ID_OXSEMI, 0xc4ab, /* OXPCIe200 1 Native UART */
3425 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3426 pbn_oxsemi_1_4000000 },
3427 { PCI_VENDOR_ID_OXSEMI, 0xc4af, /* OXPCIe200 1 Native UART */
3428 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3429 pbn_oxsemi_1_4000000 },
3430 { PCI_VENDOR_ID_OXSEMI, 0xc4bb, /* OXPCIe200 1 Native UART */
3431 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3432 pbn_oxsemi_1_4000000 },
3433 { PCI_VENDOR_ID_OXSEMI, 0xc4bf, /* OXPCIe200 1 Native UART */
3434 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3435 pbn_oxsemi_1_4000000 },
3436 { PCI_VENDOR_ID_OXSEMI, 0xc4cb, /* OXPCIe200 1 Native UART */
3437 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3438 pbn_oxsemi_1_4000000 },
3439 { PCI_VENDOR_ID_OXSEMI, 0xc4cf, /* OXPCIe200 1 Native UART */
3440 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3441 pbn_oxsemi_1_4000000 },
3443 * Mainpine Inc. IQ Express "Rev3" utilizing OxSemi Tornado
3445 { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 1 Port V.34 Super-G3 Fax */
3446 PCI_VENDOR_ID_MAINPINE, 0x4001, 0, 0,
3447 pbn_oxsemi_1_4000000 },
3448 { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 2 Port V.34 Super-G3 Fax */
3449 PCI_VENDOR_ID_MAINPINE, 0x4002, 0, 0,
3450 pbn_oxsemi_2_4000000 },
3451 { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 4 Port V.34 Super-G3 Fax */
3452 PCI_VENDOR_ID_MAINPINE, 0x4004, 0, 0,
3453 pbn_oxsemi_4_4000000 },
3454 { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 8 Port V.34 Super-G3 Fax */
3455 PCI_VENDOR_ID_MAINPINE, 0x4008, 0, 0,
3456 pbn_oxsemi_8_4000000 },
3459 * Digi/IBM PCIe 2-port Async EIA-232 Adapter utilizing OxSemi Tornado
3461 { PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_2_OX_IBM,
3462 PCI_SUBVENDOR_ID_IBM, PCI_ANY_ID, 0, 0,
3463 pbn_oxsemi_2_4000000 },
3466 * SBS Technologies, Inc. P-Octal and PMC-OCTPRO cards,
3467 * from skokodyn@yahoo.com
3469 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
3470 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO232, 0, 0,
3472 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
3473 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO422, 0, 0,
3475 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
3476 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL232, 0, 0,
3478 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
3479 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL422, 0, 0,
3483 * Digitan DS560-558, from jimd@esoft.com
3485 { PCI_VENDOR_ID_ATT, PCI_DEVICE_ID_ATT_VENUS_MODEM,
3486 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3490 * Titan Electronic cards
3491 * The 400L and 800L have a custom setup quirk.
3493 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100,
3494 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3496 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200,
3497 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3499 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400,
3500 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3502 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800B,
3503 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3505 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100L,
3506 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3508 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200L,
3509 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3510 pbn_b1_bt_2_921600 },
3511 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400L,
3512 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3513 pbn_b0_bt_4_921600 },
3514 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800L,
3515 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3516 pbn_b0_bt_8_921600 },
3517 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200I,
3518 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3519 pbn_b4_bt_2_921600 },
3520 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400I,
3521 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3522 pbn_b4_bt_4_921600 },
3523 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800I,
3524 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3525 pbn_b4_bt_8_921600 },
3526 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400EH,
3527 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3529 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800EH,
3530 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3532 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800EHB,
3533 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3535 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100E,
3536 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3537 pbn_oxsemi_1_4000000 },
3538 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200E,
3539 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3540 pbn_oxsemi_2_4000000 },
3541 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400E,
3542 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3543 pbn_oxsemi_4_4000000 },
3544 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800E,
3545 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3546 pbn_oxsemi_8_4000000 },
3547 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200EI,
3548 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3549 pbn_oxsemi_2_4000000 },
3550 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200EISI,
3551 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3552 pbn_oxsemi_2_4000000 },
3553 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400V3,
3554 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3556 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_410V3,
3557 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3559 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800V3,
3560 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3562 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800V3B,
3563 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3566 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_550,
3567 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3569 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_650,
3570 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3572 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_850,
3573 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3575 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_550,
3576 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3577 pbn_b2_bt_2_921600 },
3578 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_650,
3579 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3580 pbn_b2_bt_2_921600 },
3581 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_850,
3582 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3583 pbn_b2_bt_2_921600 },
3584 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_550,
3585 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3586 pbn_b2_bt_4_921600 },
3587 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_650,
3588 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3589 pbn_b2_bt_4_921600 },
3590 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_850,
3591 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3592 pbn_b2_bt_4_921600 },
3593 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_550,
3594 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3596 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_650,
3597 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3599 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_850,
3600 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3602 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_550,
3603 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3604 pbn_b0_bt_2_921600 },
3605 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_650,
3606 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3607 pbn_b0_bt_2_921600 },
3608 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_850,
3609 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3610 pbn_b0_bt_2_921600 },
3611 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_550,
3612 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3613 pbn_b0_bt_4_921600 },
3614 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_650,
3615 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3616 pbn_b0_bt_4_921600 },
3617 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_850,
3618 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3619 pbn_b0_bt_4_921600 },
3620 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_550,
3621 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3622 pbn_b0_bt_8_921600 },
3623 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_650,
3624 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3625 pbn_b0_bt_8_921600 },
3626 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_850,
3627 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3628 pbn_b0_bt_8_921600 },
3631 * Computone devices submitted by Doug McNash dmcnash@computone.com
3633 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
3634 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG4,
3635 0, 0, pbn_computone_4 },
3636 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
3637 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG8,
3638 0, 0, pbn_computone_8 },
3639 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
3640 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG6,
3641 0, 0, pbn_computone_6 },
3643 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI95N,
3644 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3646 { PCI_VENDOR_ID_TIMEDIA, PCI_DEVICE_ID_TIMEDIA_1889,
3647 PCI_VENDOR_ID_TIMEDIA, PCI_ANY_ID, 0, 0,
3648 pbn_b0_bt_1_921600 },
3651 * AFAVLAB serial card, from Harald Welte <laforge@gnumonks.org>
3653 { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P028,
3654 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3655 pbn_b0_bt_8_115200 },
3656 { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P030,
3657 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3658 pbn_b0_bt_8_115200 },
3660 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_DSERIAL,
3661 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3662 pbn_b0_bt_2_115200 },
3663 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATRO_A,
3664 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3665 pbn_b0_bt_2_115200 },
3666 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATRO_B,
3667 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3668 pbn_b0_bt_2_115200 },
3669 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATTRO_A,
3670 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3671 pbn_b0_bt_2_115200 },
3672 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATTRO_B,
3673 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3674 pbn_b0_bt_2_115200 },
3675 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_OCTO_A,
3676 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3677 pbn_b0_bt_4_460800 },
3678 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_OCTO_B,
3679 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3680 pbn_b0_bt_4_460800 },
3681 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PORT_PLUS,
3682 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3683 pbn_b0_bt_2_460800 },
3684 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUAD_A,
3685 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3686 pbn_b0_bt_2_460800 },
3687 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUAD_B,
3688 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3689 pbn_b0_bt_2_460800 },
3690 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_SSERIAL,
3691 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3692 pbn_b0_bt_1_115200 },
3693 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PORT_650,
3694 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3695 pbn_b0_bt_1_460800 },
3698 * Korenix Jetcard F0/F1 cards (JC1204, JC1208, JC1404, JC1408).
3699 * Cards are identified by their subsystem vendor IDs, which
3700 * (in hex) match the model number.
3702 * Note that JC140x are RS422/485 cards which require ox950
3703 * ACR = 0x10, and as such are not currently fully supported.
3705 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
3706 0x1204, 0x0004, 0, 0,
3708 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
3709 0x1208, 0x0004, 0, 0,
3711 /* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
3712 0x1402, 0x0002, 0, 0,
3713 pbn_b0_2_921600 }, */
3714 /* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
3715 0x1404, 0x0004, 0, 0,
3716 pbn_b0_4_921600 }, */
3717 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF1,
3718 0x1208, 0x0004, 0, 0,
3721 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF2,
3722 0x1204, 0x0004, 0, 0,
3724 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF2,
3725 0x1208, 0x0004, 0, 0,
3727 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF3,
3728 0x1208, 0x0004, 0, 0,
3731 * Dell Remote Access Card 4 - Tim_T_Murphy@Dell.com
3733 { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RAC4,
3734 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3738 * Dell Remote Access Card III - Tim_T_Murphy@Dell.com
3740 { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RACIII,
3741 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3745 * RAStel 2 port modem, gerg@moreton.com.au
3747 { PCI_VENDOR_ID_MORETON, PCI_DEVICE_ID_RASTEL_2PORT,
3748 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3749 pbn_b2_bt_2_115200 },
3752 * EKF addition for i960 Boards form EKF with serial port
3754 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_80960_RP,
3755 0xE4BF, PCI_ANY_ID, 0, 0,
3759 * Xircom Cardbus/Ethernet combos
3761 { PCI_VENDOR_ID_XIRCOM, PCI_DEVICE_ID_XIRCOM_X3201_MDM,
3762 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3765 * Xircom RBM56G cardbus modem - Dirk Arnold (temp entry)
3767 { PCI_VENDOR_ID_XIRCOM, PCI_DEVICE_ID_XIRCOM_RBM56G,
3768 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3772 * Untested PCI modems, sent in from various folks...
3776 * Elsa Model 56K PCI Modem, from Andreas Rath <arh@01019freenet.de>
3778 { PCI_VENDOR_ID_ROCKWELL, 0x1004,
3779 0x1048, 0x1500, 0, 0,
3782 { PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC3,
3789 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA,
3790 PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_RMP3, 0, 0,
3792 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA,
3793 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3795 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_AUX,
3796 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3799 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM2,
3800 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3802 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM4,
3803 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3805 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM8,
3806 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3810 * Exar Corp. XR17C15[248] Dual/Quad/Octal UART
3812 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
3813 PCI_ANY_ID, PCI_ANY_ID,
3815 0, pbn_exar_XR17C152 },
3816 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
3817 PCI_ANY_ID, PCI_ANY_ID,
3819 0, pbn_exar_XR17C154 },
3820 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
3821 PCI_ANY_ID, PCI_ANY_ID,
3823 0, pbn_exar_XR17C158 },
3826 * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke)
3828 { PCI_VENDOR_ID_TOPIC, PCI_DEVICE_ID_TOPIC_TP560,
3829 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3834 { PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8872,
3835 PCI_ANY_ID, PCI_ANY_ID,
3837 pbn_b1_bt_1_115200 },
3842 { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200,
3843 PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */
3848 { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS400,
3849 PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0dc0 */
3852 * Perle PCI-RAS cards
3854 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
3855 PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS4,
3856 0, 0, pbn_b2_4_921600 },
3857 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
3858 PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS8,
3859 0, 0, pbn_b2_8_921600 },
3862 * Mainpine series cards: Fairly standard layout but fools
3863 * parts of the autodetect in some cases and uses otherwise
3864 * unmatched communications subclasses in the PCI Express case
3867 { /* RockForceDUO */
3868 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3869 PCI_VENDOR_ID_MAINPINE, 0x0200,
3870 0, 0, pbn_b0_2_115200 },
3871 { /* RockForceQUATRO */
3872 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3873 PCI_VENDOR_ID_MAINPINE, 0x0300,
3874 0, 0, pbn_b0_4_115200 },
3875 { /* RockForceDUO+ */
3876 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3877 PCI_VENDOR_ID_MAINPINE, 0x0400,
3878 0, 0, pbn_b0_2_115200 },
3879 { /* RockForceQUATRO+ */
3880 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3881 PCI_VENDOR_ID_MAINPINE, 0x0500,
3882 0, 0, pbn_b0_4_115200 },
3884 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3885 PCI_VENDOR_ID_MAINPINE, 0x0600,
3886 0, 0, pbn_b0_2_115200 },
3888 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3889 PCI_VENDOR_ID_MAINPINE, 0x0700,
3890 0, 0, pbn_b0_4_115200 },
3891 { /* RockForceOCTO+ */
3892 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3893 PCI_VENDOR_ID_MAINPINE, 0x0800,
3894 0, 0, pbn_b0_8_115200 },
3895 { /* RockForceDUO+ */
3896 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3897 PCI_VENDOR_ID_MAINPINE, 0x0C00,
3898 0, 0, pbn_b0_2_115200 },
3899 { /* RockForceQUARTRO+ */
3900 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3901 PCI_VENDOR_ID_MAINPINE, 0x0D00,
3902 0, 0, pbn_b0_4_115200 },
3903 { /* RockForceOCTO+ */
3904 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3905 PCI_VENDOR_ID_MAINPINE, 0x1D00,
3906 0, 0, pbn_b0_8_115200 },
3908 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3909 PCI_VENDOR_ID_MAINPINE, 0x2000,
3910 0, 0, pbn_b0_1_115200 },
3912 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3913 PCI_VENDOR_ID_MAINPINE, 0x2100,
3914 0, 0, pbn_b0_1_115200 },
3916 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3917 PCI_VENDOR_ID_MAINPINE, 0x2200,
3918 0, 0, pbn_b0_2_115200 },
3920 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3921 PCI_VENDOR_ID_MAINPINE, 0x2300,
3922 0, 0, pbn_b0_2_115200 },
3924 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3925 PCI_VENDOR_ID_MAINPINE, 0x2400,
3926 0, 0, pbn_b0_4_115200 },
3928 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3929 PCI_VENDOR_ID_MAINPINE, 0x2500,
3930 0, 0, pbn_b0_4_115200 },
3932 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3933 PCI_VENDOR_ID_MAINPINE, 0x2600,
3934 0, 0, pbn_b0_8_115200 },
3936 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3937 PCI_VENDOR_ID_MAINPINE, 0x2700,
3938 0, 0, pbn_b0_8_115200 },
3939 { /* IQ Express D1 */
3940 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3941 PCI_VENDOR_ID_MAINPINE, 0x3000,
3942 0, 0, pbn_b0_1_115200 },
3943 { /* IQ Express F1 */
3944 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3945 PCI_VENDOR_ID_MAINPINE, 0x3100,
3946 0, 0, pbn_b0_1_115200 },
3947 { /* IQ Express D2 */
3948 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3949 PCI_VENDOR_ID_MAINPINE, 0x3200,
3950 0, 0, pbn_b0_2_115200 },
3951 { /* IQ Express F2 */
3952 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3953 PCI_VENDOR_ID_MAINPINE, 0x3300,
3954 0, 0, pbn_b0_2_115200 },
3955 { /* IQ Express D4 */
3956 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3957 PCI_VENDOR_ID_MAINPINE, 0x3400,
3958 0, 0, pbn_b0_4_115200 },
3959 { /* IQ Express F4 */
3960 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3961 PCI_VENDOR_ID_MAINPINE, 0x3500,
3962 0, 0, pbn_b0_4_115200 },
3963 { /* IQ Express D8 */
3964 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3965 PCI_VENDOR_ID_MAINPINE, 0x3C00,
3966 0, 0, pbn_b0_8_115200 },
3967 { /* IQ Express F8 */
3968 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
3969 PCI_VENDOR_ID_MAINPINE, 0x3D00,
3970 0, 0, pbn_b0_8_115200 },
3974 * PA Semi PA6T-1682M on-chip UART
3976 { PCI_VENDOR_ID_PASEMI, 0xa004,
3977 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3981 * National Instruments
3983 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI23216,
3984 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3986 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2328,
3987 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3989 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2324,
3990 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3991 pbn_b1_bt_4_115200 },
3992 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2322,
3993 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3994 pbn_b1_bt_2_115200 },
3995 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2324I,
3996 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3997 pbn_b1_bt_4_115200 },
3998 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2322I,
3999 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4000 pbn_b1_bt_2_115200 },
4001 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_23216,
4002 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4004 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2328,
4005 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4007 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2324,
4008 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4009 pbn_b1_bt_4_115200 },
4010 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2322,
4011 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4012 pbn_b1_bt_2_115200 },
4013 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8422_2324,
4014 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4015 pbn_b1_bt_4_115200 },
4016 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8422_2322,
4017 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4018 pbn_b1_bt_2_115200 },
4019 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2322,
4020 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4022 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2322,
4023 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4025 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2324,
4026 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4028 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2324,
4029 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4031 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2328,
4032 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4034 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2328,
4035 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4037 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_23216,
4038 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4040 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_23216,
4041 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4043 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8432_2322,
4044 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4046 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8432_2322,
4047 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4049 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8432_2324,
4050 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4052 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8432_2324,
4053 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4057 * ADDI-DATA GmbH communication cards <info@addi-data.com>
4059 { PCI_VENDOR_ID_ADDIDATA,
4060 PCI_DEVICE_ID_ADDIDATA_APCI7500,
4067 { PCI_VENDOR_ID_ADDIDATA,
4068 PCI_DEVICE_ID_ADDIDATA_APCI7420,
4075 { PCI_VENDOR_ID_ADDIDATA,
4076 PCI_DEVICE_ID_ADDIDATA_APCI7300,
4083 { PCI_VENDOR_ID_ADDIDATA_OLD,
4084 PCI_DEVICE_ID_ADDIDATA_APCI7800,
4091 { PCI_VENDOR_ID_ADDIDATA,
4092 PCI_DEVICE_ID_ADDIDATA_APCI7500_2,
4099 { PCI_VENDOR_ID_ADDIDATA,
4100 PCI_DEVICE_ID_ADDIDATA_APCI7420_2,
4107 { PCI_VENDOR_ID_ADDIDATA,
4108 PCI_DEVICE_ID_ADDIDATA_APCI7300_2,
4115 { PCI_VENDOR_ID_ADDIDATA,
4116 PCI_DEVICE_ID_ADDIDATA_APCI7500_3,
4123 { PCI_VENDOR_ID_ADDIDATA,
4124 PCI_DEVICE_ID_ADDIDATA_APCI7420_3,
4131 { PCI_VENDOR_ID_ADDIDATA,
4132 PCI_DEVICE_ID_ADDIDATA_APCI7300_3,
4139 { PCI_VENDOR_ID_ADDIDATA,
4140 PCI_DEVICE_ID_ADDIDATA_APCI7800_3,
4147 { PCI_VENDOR_ID_ADDIDATA,
4148 PCI_DEVICE_ID_ADDIDATA_APCIe7500,
4153 pbn_ADDIDATA_PCIe_4_3906250 },
4155 { PCI_VENDOR_ID_ADDIDATA,
4156 PCI_DEVICE_ID_ADDIDATA_APCIe7420,
4161 pbn_ADDIDATA_PCIe_2_3906250 },
4163 { PCI_VENDOR_ID_ADDIDATA,
4164 PCI_DEVICE_ID_ADDIDATA_APCIe7300,
4169 pbn_ADDIDATA_PCIe_1_3906250 },
4171 { PCI_VENDOR_ID_ADDIDATA,
4172 PCI_DEVICE_ID_ADDIDATA_APCIe7800,
4177 pbn_ADDIDATA_PCIe_8_3906250 },
4179 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835,
4180 PCI_VENDOR_ID_IBM, 0x0299,
4181 0, 0, pbn_b0_bt_2_115200 },
4183 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9901,
4185 0, 0, pbn_b0_1_115200 },
4187 /* the 9901 is a rebranded 9912 */
4188 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9912,
4190 0, 0, pbn_b0_1_115200 },
4192 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9922,
4194 0, 0, pbn_b0_1_115200 },
4196 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9904,
4198 0, 0, pbn_b0_1_115200 },
4200 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9900,
4202 0, 0, pbn_b0_1_115200 },
4204 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9900,
4206 0, 0, pbn_NETMOS9900_2s_115200 },
4209 * Best Connectivity and Rosewill PCI Multi I/O cards
4212 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
4214 0, 0, pbn_b0_1_115200 },
4216 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
4218 0, 0, pbn_b0_bt_2_115200 },
4220 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
4222 0, 0, pbn_b0_bt_4_115200 },
4224 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CE4100_UART,
4225 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4226 pbn_ce4100_1_115200 },
4231 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_CRONYX_OMEGA,
4232 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4236 * AgeStar as-prs2-009
4238 { PCI_VENDOR_ID_AGESTAR, PCI_DEVICE_ID_AGESTAR_9375,
4239 PCI_ANY_ID, PCI_ANY_ID,
4240 0, 0, pbn_b0_bt_2_115200 },
4243 * WCH CH353 series devices: The 2S1P is handled by parport_serial
4244 * so not listed here.
4246 { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH353_4S,
4247 PCI_ANY_ID, PCI_ANY_ID,
4248 0, 0, pbn_b0_bt_4_115200 },
4250 { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH353_2S1PF,
4251 PCI_ANY_ID, PCI_ANY_ID,
4252 0, 0, pbn_b0_bt_2_115200 },
4255 * These entries match devices with class COMMUNICATION_SERIAL,
4256 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
4258 { PCI_ANY_ID, PCI_ANY_ID,
4259 PCI_ANY_ID, PCI_ANY_ID,
4260 PCI_CLASS_COMMUNICATION_SERIAL << 8,
4261 0xffff00, pbn_default },
4262 { PCI_ANY_ID, PCI_ANY_ID,
4263 PCI_ANY_ID, PCI_ANY_ID,
4264 PCI_CLASS_COMMUNICATION_MODEM << 8,
4265 0xffff00, pbn_default },
4266 { PCI_ANY_ID, PCI_ANY_ID,
4267 PCI_ANY_ID, PCI_ANY_ID,
4268 PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
4269 0xffff00, pbn_default },
4273 static pci_ers_result_t serial8250_io_error_detected(struct pci_dev *dev,
4274 pci_channel_state_t state)
4276 struct serial_private *priv = pci_get_drvdata(dev);
4278 if (state == pci_channel_io_perm_failure)
4279 return PCI_ERS_RESULT_DISCONNECT;
4282 pciserial_suspend_ports(priv);
4284 pci_disable_device(dev);
4286 return PCI_ERS_RESULT_NEED_RESET;
4289 static pci_ers_result_t serial8250_io_slot_reset(struct pci_dev *dev)
4293 rc = pci_enable_device(dev);
4296 return PCI_ERS_RESULT_DISCONNECT;
4298 pci_restore_state(dev);
4299 pci_save_state(dev);
4301 return PCI_ERS_RESULT_RECOVERED;
4304 static void serial8250_io_resume(struct pci_dev *dev)
4306 struct serial_private *priv = pci_get_drvdata(dev);
4309 pciserial_resume_ports(priv);
4312 static struct pci_error_handlers serial8250_err_handler = {
4313 .error_detected = serial8250_io_error_detected,
4314 .slot_reset = serial8250_io_slot_reset,
4315 .resume = serial8250_io_resume,
4318 static struct pci_driver serial_pci_driver = {
4320 .probe = pciserial_init_one,
4321 .remove = __devexit_p(pciserial_remove_one),
4323 .suspend = pciserial_suspend_one,
4324 .resume = pciserial_resume_one,
4326 .id_table = serial_pci_tbl,
4327 .err_handler = &serial8250_err_handler,
4330 static int __init serial8250_pci_init(void)
4332 return pci_register_driver(&serial_pci_driver);
4335 static void __exit serial8250_pci_exit(void)
4337 pci_unregister_driver(&serial_pci_driver);
4340 module_init(serial8250_pci_init);
4341 module_exit(serial8250_pci_exit);
4343 MODULE_LICENSE("GPL");
4344 MODULE_DESCRIPTION("Generic 8250/16x50 PCI serial probe module");
4345 MODULE_DEVICE_TABLE(pci, serial_pci_tbl);