12 #include <linux/module.h>
14 #include <linux/pci.h>
15 #include <linux/string.h>
16 #include <linux/kernel.h>
17 #include <linux/slab.h>
19 #include <linux/tty.h>
21 #include <linux/serial_core.h>
23 #include <linux/bitops.h>
25 #include <asm/byteorder.h>
30 #undef SERIAL_DEBUG_PCI
51 #define PCI_NUM_BAR_RESOURCES 6
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"
78 int bar,
int offset,
int regshift)
97 port->
port.iobase = 0;
100 port->
port.regshift = regshift;
104 port->
port.mapbase = 0;
106 port->
port.regshift = 0;
123 }
else if ((idx >= 2) && (idx < 4)) {
126 }
else if ((idx >= 4) && (idx < 6)) {
129 }
else if (idx >= 6) {
134 return setup_port(priv, port, bar, offset, board->
reg_shift);
155 return setup_port(priv, port, bar, offset, board->
reg_shift);
165 static int pci_hp_diva_init(
struct pci_dev *dev)
203 switch (priv->
dev->subsystem_device) {
220 return setup_port(priv, port, bar, offset, board->
reg_shift);
226 static int pci_inteli960ni_init(
struct pci_dev *dev)
228 unsigned long oldval;
234 pci_read_config_dword(dev, 0x44, (
void *)&oldval);
235 if (oldval == 0x00001000L) {
248 static int pci_plx9050_init(
struct pci_dev *dev)
254 moan_device(
"no memory in bar 0", dev);
280 writel(irq_config, p + 0x4c);
313 #define NI8420_INT_ENABLE_REG 0x38
314 #define NI8420_INT_ENABLE_BIT 0x2000
319 unsigned long base, len;
320 unsigned int bar = 0;
323 moan_device(
"no memory in bar", dev);
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)
351 unsigned long base, len;
352 unsigned int bar = 0;
355 moan_device(
"no memory in bar", dev);
382 }
else if (idx < 8) {
388 return setup_port(priv, port, bar, offset, board->
reg_shift);
399 #define OCT_REG_CR_OFF 0x500
401 static int sbs_init(
struct pci_dev *dev)
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) {
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)
501 pci_read_config_byte(dev, 0x6f, &data);
502 pci_write_config_byte(dev, 0x6f, data & 0xef);
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)
518 return pci_siig10x_init(dev);
519 else if (type == 0x2000)
520 return pci_siig20x_init(dev);
522 moan_device(
"Unknown SIIG card", dev);
534 offset = (idx - 4) * 8;
537 return setup_port(priv, port, bar, offset, 0);
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 }
585 static int pci_timedia_probe(
struct pci_dev *dev)
593 "ignoring Timedia subdevice %04x for parport_serial\n",
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++)
610 return timedia_data[
i].num;
647 return setup_port(priv, port, bar, offset, board->
reg_shift);
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;
688 moan_device(
"no memory in bar", dev);
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;
721 moan_device(
"no memory in bar", dev);
751 #define NI8430_PORTCON 0x0f
752 #define NI8430_PORTCON_TXVR_ENABLE (1 << 3)
760 unsigned long base, len;
779 return setup_port(priv, port, bar, offset, board->
reg_shift);
788 if ((priv->
dev->subsystem_device & 0xff00) == 0x3000) {
794 return setup_port(priv, port, bar, 0, board->
reg_shift);
796 return pci_default_setup(priv, board, port, idx);
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) &&
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)
857 num_serial = pci_netmos_9900_numports(dev);
861 if (num_serial == 0 ) {
862 moan_device(
"unknown NetMos/Mostech device", dev);
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
892 #define ITE_887x_POSIO_IOSIZE_8 (3 << 24)
894 #define ITE_887x_POSIO_IOSIZE_32 (5 << 24)
896 #define ITE_887x_POSIO_SPEED (3 << 29)
898 #define ITE_887x_POSIO_ENABLE (1 << 31)
900 static int pci_ite887x_init(
struct pci_dev *dev)
903 static const short inta_addr[] = { 0x2a0, 0x2c0, 0x220, 0x240, 0x1e0,
911 while (inta_addr[i] && iobase ==
NULL) {
914 if (iobase !=
NULL) {
922 ret =
inb(inta_addr[i]);
939 type =
inb(iobase->
start + 0x18) & 0x0f;
956 moan_device(
"Unknown ITE887x", dev);
961 for (i = 0; i <
ret; i++) {
965 ioport &= 0x0000FF00;
972 uartbar &= ~(0xffff << (16 *
i));
973 uartbar |= (ioport << (16 *
i));
979 miscr &= ~(0xf << (12 - 4 *
i));
981 miscr |= 1 << (23 -
i);
1008 static int pci_oxsemi_tornado_init(
struct pci_dev *dev)
1011 unsigned long deviceID;
1012 unsigned int number_uarts = 0;
1016 (dev->
device & 0xF000) != 0xC000)
1019 p = pci_iomap(dev, 0, 5);
1025 if (deviceID == 0x07000200) {
1026 number_uarts =
ioread8(p + 4);
1028 "%d ports detected on Oxford PCI Express device\n",
1032 return number_uarts;
1040 return pci_default_setup(priv, board, port, idx);
1061 return setup_port(priv, port, bar, offset, board->
reg_shift);
1071 ret = setup_port(priv, port, 0, 0, board->
reg_shift);
1075 port->
port.regshift = 2;
1085 return setup_port(priv, port, 2, idx * 8, 0);
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)
1115 static unsigned int kt_serial_in(
struct uart_port *p,
int offset)
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)
1164 return pci_default_setup(priv, board, port, idx);
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_SUBDEVICE_ID_SIIG_DUAL_00 0x2500
1185 #define PCI_SUBDEVICE_ID_SIIG_DUAL_30 0x2530
1186 #define PCI_VENDOR_ID_ADVANTECH 0x13fe
1187 #define PCI_DEVICE_ID_INTEL_CE4100_UART 0x2e66
1188 #define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620
1189 #define PCI_DEVICE_ID_TITAN_200I 0x8028
1190 #define PCI_DEVICE_ID_TITAN_400I 0x8048
1191 #define PCI_DEVICE_ID_TITAN_800I 0x8088
1192 #define PCI_DEVICE_ID_TITAN_800EH 0xA007
1193 #define PCI_DEVICE_ID_TITAN_800EHB 0xA008
1194 #define PCI_DEVICE_ID_TITAN_400EH 0xA009
1195 #define PCI_DEVICE_ID_TITAN_100E 0xA010
1196 #define PCI_DEVICE_ID_TITAN_200E 0xA012
1197 #define PCI_DEVICE_ID_TITAN_400E 0xA013
1198 #define PCI_DEVICE_ID_TITAN_800E 0xA014
1199 #define PCI_DEVICE_ID_TITAN_200EI 0xA016
1200 #define PCI_DEVICE_ID_TITAN_200EISI 0xA017
1201 #define PCI_DEVICE_ID_TITAN_400V3 0xA310
1202 #define PCI_DEVICE_ID_TITAN_410V3 0xA312
1203 #define PCI_DEVICE_ID_TITAN_800V3 0xA314
1204 #define PCI_DEVICE_ID_TITAN_800V3B 0xA315
1205 #define PCI_DEVICE_ID_OXSEMI_16PCI958 0x9538
1206 #define PCIE_DEVICE_ID_NEO_2_OX_IBM 0x00F6
1207 #define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001
1208 #define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d
1209 #define PCI_VENDOR_ID_WCH 0x4348
1210 #define PCI_DEVICE_ID_WCH_CH353_4S 0x3453
1211 #define PCI_DEVICE_ID_WCH_CH353_2S1PF 0x5046
1212 #define PCI_DEVICE_ID_WCH_CH353_2S1P 0x7053
1213 #define PCI_VENDOR_ID_AGESTAR 0x5372
1214 #define PCI_DEVICE_ID_AGESTAR_9375 0x6872
1215 #define PCI_VENDOR_ID_ASIX 0x9710
1218 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584
1237 .setup = addidata_apci7800_setup,
1248 .setup = afavlab_setup,
1258 .init = pci_hp_diva_init,
1259 .setup = pci_hp_diva_setup,
1267 .subvendor = 0xe4bf,
1269 .init = pci_inteli960ni_init,
1270 .setup = pci_default_setup,
1277 .setup = skip_tx_en_setup,
1284 .setup = skip_tx_en_setup,
1291 .setup = skip_tx_en_setup,
1298 .setup = ce4100_serial_setup,
1305 .setup = kt_serial_setup,
1315 .init = pci_ite887x_init,
1316 .setup = pci_default_setup,
1327 .init = pci_ni8420_init,
1328 .setup = pci_default_setup,
1336 .init = pci_ni8420_init,
1337 .setup = pci_default_setup,
1345 .init = pci_ni8420_init,
1346 .setup = pci_default_setup,
1354 .init = pci_ni8420_init,
1355 .setup = pci_default_setup,
1363 .init = pci_ni8420_init,
1364 .setup = pci_default_setup,
1372 .init = pci_ni8420_init,
1373 .setup = pci_default_setup,
1381 .init = pci_ni8420_init,
1382 .setup = pci_default_setup,
1390 .init = pci_ni8420_init,
1391 .setup = pci_default_setup,
1399 .init = pci_ni8420_init,
1400 .setup = pci_default_setup,
1408 .init = pci_ni8420_init,
1409 .setup = pci_default_setup,
1417 .init = pci_ni8420_init,
1418 .setup = pci_default_setup,
1426 .init = pci_ni8420_init,
1427 .setup = pci_default_setup,
1435 .init = pci_ni8430_init,
1436 .setup = pci_ni8430_setup,
1447 .init = pci_plx9050_init,
1448 .setup = pci_default_setup,
1456 .init = pci_plx9050_init,
1457 .setup = pci_default_setup,
1468 .setup = pci_default_setup,
1475 .init = pci_plx9050_init,
1476 .setup = pci_default_setup,
1484 .init = pci_plx9050_init,
1485 .setup = pci_default_setup,
1493 .init = pci_plx9050_init,
1494 .setup = pci_default_setup,
1502 .init = pci_plx9050_init,
1503 .setup = pci_default_setup,
1562 .init = pci_siig_init,
1563 .setup = pci_siig_setup,
1573 .setup = titan_400l_800l_setup,
1580 .setup = titan_400l_800l_setup,
1590 .probe = pci_timedia_probe,
1591 .init = pci_timedia_init,
1592 .setup = pci_timedia_setup,
1599 .setup = pci_timedia_setup,
1609 .setup = pci_xr17c154_setup,
1616 .setup = pci_xr17c154_setup,
1623 .setup = pci_xr17c154_setup,
1633 .init = pci_xircom_init,
1634 .setup = pci_default_setup,
1644 .init = pci_netmos_init,
1645 .setup = pci_netmos_9900_setup,
1655 .init = pci_oxsemi_tornado_init,
1656 .setup = pci_default_setup,
1663 .init = pci_oxsemi_tornado_init,
1664 .setup = pci_default_setup,
1671 .init = pci_oxsemi_tornado_init,
1672 .setup = pci_default_setup,
1679 .init = pci_eg20t_init,
1680 .setup = pci_default_setup,
1687 .init = pci_eg20t_init,
1688 .setup = pci_default_setup,
1695 .init = pci_eg20t_init,
1696 .setup = pci_default_setup,
1703 .init = pci_eg20t_init,
1704 .setup = pci_default_setup,
1711 .init = pci_eg20t_init,
1712 .setup = pci_default_setup,
1719 .init = pci_eg20t_init,
1720 .setup = pci_default_setup,
1727 .init = pci_eg20t_init,
1728 .setup = pci_default_setup,
1735 .init = pci_eg20t_init,
1736 .setup = pci_default_setup,
1743 .init = pci_eg20t_init,
1744 .setup = pci_default_setup,
1754 .setup = pci_omegapci_setup,
1762 .setup = pci_wch_ch353_setup,
1770 .setup = pci_wch_ch353_setup,
1778 .setup = pci_wch_ch353_setup,
1788 .setup = pci_asix_setup,
1798 .setup = pci_default_setup,
1802 static inline int quirk_id_matches(
u32 quirk_id,
u32 dev_id)
1811 for (quirk = pci_serial_quirks; ; quirk++)
1820 static inline int get_pci_irq(
struct pci_dev *dev,
1994 .base_baud = 115200,
2000 .base_baud = 115200,
2006 .base_baud = 115200,
2012 .base_baud = 115200,
2018 .base_baud = 115200,
2024 .base_baud = 115200,
2030 .base_baud = 921600,
2036 .base_baud = 921600,
2042 .base_baud = 921600,
2049 .base_baud = 1130000,
2056 .base_baud = 1152000,
2063 .base_baud = 1843200,
2069 .base_baud = 1843200,
2076 .base_baud = 1843200,
2077 .uart_offset = 0x200,
2082 .base_baud = 1843200,
2083 .uart_offset = 0x200,
2088 .base_baud = 1843200,
2089 .uart_offset = 0x200,
2094 .base_baud = 4000000,
2101 .base_baud = 115200,
2107 .base_baud = 115200,
2113 .base_baud = 115200,
2119 .base_baud = 115200,
2126 .base_baud = 460800,
2132 .base_baud = 460800,
2138 .base_baud = 460800,
2145 .base_baud = 921600,
2151 .base_baud = 921600,
2157 .base_baud = 921600,
2163 .base_baud = 921600,
2170 .base_baud = 115200,
2176 .base_baud = 115200,
2182 .base_baud = 115200,
2188 .base_baud = 115200,
2194 .base_baud = 115200,
2201 .base_baud = 921600,
2207 .base_baud = 921600,
2213 .base_baud = 921600,
2219 .base_baud = 921600,
2225 .base_baud = 1250000,
2232 .base_baud = 115200,
2238 .base_baud = 115200,
2244 .base_baud = 115200,
2251 .base_baud = 921600,
2258 .base_baud = 1382400,
2264 .base_baud = 1382400,
2270 .base_baud = 1382400,
2276 .base_baud = 1382400,
2283 .base_baud = 115200,
2289 .base_baud = 115200,
2295 .base_baud = 115200,
2301 .base_baud = 115200,
2308 .base_baud = 460800,
2314 .base_baud = 460800,
2320 .base_baud = 460800,
2326 .base_baud = 460800,
2333 .base_baud = 921600,
2339 .base_baud = 921600,
2345 .base_baud = 921600,
2352 .base_baud = 1152000,
2359 .base_baud = 115200,
2365 .base_baud = 115200,
2371 .base_baud = 115200,
2378 .base_baud = 921600,
2384 .base_baud = 921600,
2391 .base_baud = 115200,
2397 .base_baud = 115200,
2403 .base_baud = 115200,
2410 .base_baud = 921600,
2416 .base_baud = 921600,
2422 .base_baud = 921600,
2436 .base_baud = 921600,
2437 .uart_offset = 0x400,
2443 .base_baud = 921600,
2444 .uart_offset = 0x400,
2450 .base_baud = 921600,
2451 .uart_offset = 0x400,
2459 .base_baud = 921600,
2460 .uart_offset = 8 << 2,
2462 .first_offset = 0x03,
2472 .base_baud = 115200,
2478 .base_baud = 4000000,
2479 .uart_offset = 0x200,
2480 .first_offset = 0x1000,
2485 .base_baud = 4000000,
2486 .uart_offset = 0x200,
2487 .first_offset = 0x1000,
2492 .base_baud = 4000000,
2493 .uart_offset = 0x200,
2494 .first_offset = 0x1000,
2499 .base_baud = 4000000,
2500 .uart_offset = 0x200,
2501 .first_offset = 0x1000,
2512 .base_baud = 921600,
2513 .uart_offset = 8 << 2,
2515 .first_offset = 0x10000,
2520 .base_baud = 458333,
2523 .first_offset = 0x20178,
2532 .base_baud = 921600,
2533 .uart_offset = 0x40,
2535 .first_offset = 0x200,
2540 .base_baud = 921600,
2541 .uart_offset = 0x40,
2543 .first_offset = 0x200,
2548 .base_baud = 921600,
2549 .uart_offset = 0x40,
2551 .first_offset = 0x200,
2556 .base_baud = 460800,
2568 .base_baud = 921600,
2569 .uart_offset = 0x200,
2574 .base_baud = 921600,
2575 .uart_offset = 0x200,
2580 .base_baud = 921600,
2581 .uart_offset = 0x200,
2586 .base_baud = 921600,
2587 .uart_offset = 0x200,
2596 .base_baud = 8333333,
2604 .base_baud = 3686400,
2605 .uart_offset = 0x10,
2606 .first_offset = 0x800,
2611 .base_baud = 3686400,
2612 .uart_offset = 0x10,
2613 .first_offset = 0x800,
2618 .base_baud = 3686400,
2619 .uart_offset = 0x10,
2620 .first_offset = 0x800,
2625 .base_baud = 3686400,
2626 .uart_offset = 0x10,
2627 .first_offset = 0x800,
2635 .base_baud = 3906250,
2636 .uart_offset = 0x200,
2637 .first_offset = 0x1000,
2642 .base_baud = 3906250,
2643 .uart_offset = 0x200,
2644 .first_offset = 0x1000,
2649 .base_baud = 3906250,
2650 .uart_offset = 0x200,
2651 .first_offset = 0x1000,
2656 .base_baud = 3906250,
2657 .uart_offset = 0x200,
2658 .first_offset = 0x1000,
2663 .base_baud = 921600,
2669 .base_baud = 115200,
2670 .uart_offset = 0x200,
2675 .base_baud = 115200,
2698 int num_iomem, num_port, first_port = -1,
i;
2709 (dev->
class & 0xff) > 6)
2716 for (bldev = blacklist;
2724 num_iomem = num_port = 0;
2728 if (first_port == -1)
2740 if (num_iomem <= 1 && num_port == 1) {
2741 board->
flags = first_port;
2756 (first_port == -1 || (first_port + num_port) == i)) {
2758 if (first_port == -1)
2790 int rc, nr_ports,
i;
2797 quirk = find_quirk(dev);
2807 rc = quirk->
init(dev);
2817 sizeof(
unsigned int) * nr_ports,
2825 priv->
quirk = quirk;
2827 memset(&uart, 0,
sizeof(uart));
2830 uart.
port.irq = get_pci_irq(dev, board);
2833 for (i = 0; i < nr_ports; i++) {
2834 if (quirk->
setup(priv, board, &uart, i))
2837 #ifdef SERIAL_DEBUG_PCI
2843 if (priv->
line[i] < 0) {
2864 for (i = 0; i < priv->
nr; i++)
2876 quirk = find_quirk(priv->
dev);
2888 for (i = 0; i < priv->
nr; i++)
2889 if (priv->
line[i] >= 0)
2895 if (priv->
quirk->exit)
2907 if (priv->
quirk->init)
2910 for (i = 0; i < priv->
nr; i++)
2911 if (priv->
line[i] >= 0)
2929 quirk = find_quirk(dev);
2931 rc = quirk->
probe(dev);
2961 rc = serial_pci_guess_board(dev, &
tmp);
2972 rc = serial_pci_guess_board(dev, &
tmp);
2973 if (rc == 0 && serial_pci_matches(board, &
tmp))
2974 moan_device(
"Redundant entry in serial pci_table.",
2979 if (!IS_ERR(priv)) {
2980 pci_set_drvdata(dev, priv);
2995 pci_set_drvdata(dev,
NULL);
3015 static int pciserial_resume_one(
struct pci_dev *dev)
3030 printk(
KERN_ERR "pciserial: Unable to re-enable ports, trying to continue.\n");
3258 0x10b5, 0x106a, 0, 0,
3711 0x1204, 0x0004, 0, 0,
3714 0x1208, 0x0004, 0, 0,
3723 0x1208, 0x0004, 0, 0,
3727 0x1204, 0x0004, 0, 0,
3730 0x1208, 0x0004, 0, 0,
3733 0x1208, 0x0004, 0, 0,
3784 0x1048, 0x1500, 0, 0,
4266 0xffff00, pbn_default },
4270 0xffff00, pbn_default },
4274 0xffff00, pbn_default },
4309 static void serial8250_io_resume(
struct pci_dev *dev)
4318 .error_detected = serial8250_io_error_detected,
4319 .slot_reset = serial8250_io_slot_reset,
4320 .resume = serial8250_io_resume,
4323 static struct pci_driver serial_pci_driver = {
4325 .probe = pciserial_init_one,
4328 .suspend = pciserial_suspend_one,
4329 .resume = pciserial_resume_one,
4331 .id_table = serial_pci_tbl,
4332 .err_handler = &serial8250_err_handler,
4335 static int __init serial8250_pci_init(
void)
4337 return pci_register_driver(&serial_pci_driver);
4340 static void __exit serial8250_pci_exit(
void)