aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250/8250_pci.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 15:26:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 15:26:52 -0400
commit3498d13b8090c0b0ef911409fbc503a7c4cca6ef (patch)
tree254ca00276e863d9fba25707690c66b2a04c49e9 /drivers/tty/serial/8250/8250_pci.c
parentdef7cb8cd4e3258db88050eaaca5438bcc3dafca (diff)
parent0c57dfcc6c1d037243c2f8fbf62eab3633326ec0 (diff)
Merge tag 'tty-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull TTY changes from Greg Kroah-Hartman: "As we skipped the merge window for 3.6-rc1 for the tty tree, everything is now settled down and working properly, so we are ready for 3.7-rc1. Here's the patchset, it's big, but the large changes are removing a firmware file and adding a staging tty driver (it depended on the tty core changes, so it's going through this tree instead of the staging tree.) All of these patches have been in the linux-next tree for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fix up more-or-less trivial conflicts in - drivers/char/pcmcia/synclink_cs.c: tty NULL dereference fix vs tty_port_cts_enabled() helper function - drivers/staging/{Kconfig,Makefile}: add-add conflict (dgrp driver added close to other staging drivers) - drivers/staging/ipack/devices/ipoctal.c: "split ipoctal_channel from iopctal" vs "TTY: use tty_port_register_device" * tag 'tty-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (235 commits) tty/serial: Add kgdb_nmi driver tty/serial/amba-pl011: Quiesce interrupts in poll_get_char tty/serial/amba-pl011: Implement poll_init callback tty/serial/core: Introduce poll_init callback kdb: Turn KGDB_KDB=n stubs into static inlines kdb: Implement disable_nmi command kernel/debug: Mask KGDB NMI upon entry serial: pl011: handle corruption at high clock speeds serial: sccnxp: Make 'default' choice in switch last serial: sccnxp: Remove mask termios caps for SW flow control serial: sccnxp: Report actual baudrate back to core serial: samsung: Add poll_get_char & poll_put_char Powerpc 8xx CPM_UART setting MAXIDL register proportionaly to baud rate Powerpc 8xx CPM_UART maxidl should not depend on fifo size Powerpc 8xx CPM_UART too many interrupts Powerpc 8xx CPM_UART desynchronisation serial: set correct baud_base for EXSYS EX-41092 Dual 16950 serial: omap: fix the reciever line error case 8250: blacklist Winbond CIR port 8250_pnp: do pnp probe before legacy probe ...
Diffstat (limited to 'drivers/tty/serial/8250/8250_pci.c')
-rw-r--r--drivers/tty/serial/8250/8250_pci.c214
1 files changed, 146 insertions, 68 deletions
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 452278efef29..17b7d26abf41 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -44,7 +44,7 @@ struct pci_serial_quirk {
44 int (*init)(struct pci_dev *dev); 44 int (*init)(struct pci_dev *dev);
45 int (*setup)(struct serial_private *, 45 int (*setup)(struct serial_private *,
46 const struct pciserial_board *, 46 const struct pciserial_board *,
47 struct uart_port *, int); 47 struct uart_8250_port *, int);
48 void (*exit)(struct pci_dev *dev); 48 void (*exit)(struct pci_dev *dev);
49}; 49};
50 50
@@ -59,7 +59,7 @@ struct serial_private {
59}; 59};
60 60
61static int pci_default_setup(struct serial_private*, 61static int pci_default_setup(struct serial_private*,
62 const struct pciserial_board*, struct uart_port*, int); 62 const struct pciserial_board*, struct uart_8250_port *, int);
63 63
64static void moan_device(const char *str, struct pci_dev *dev) 64static void moan_device(const char *str, struct pci_dev *dev)
65{ 65{
@@ -74,7 +74,7 @@ static void moan_device(const char *str, struct pci_dev *dev)
74} 74}
75 75
76static int 76static int
77setup_port(struct serial_private *priv, struct uart_port *port, 77setup_port(struct serial_private *priv, struct uart_8250_port *port,
78 int bar, int offset, int regshift) 78 int bar, int offset, int regshift)
79{ 79{
80 struct pci_dev *dev = priv->dev; 80 struct pci_dev *dev = priv->dev;
@@ -93,17 +93,17 @@ setup_port(struct serial_private *priv, struct uart_port *port,
93 if (!priv->remapped_bar[bar]) 93 if (!priv->remapped_bar[bar])
94 return -ENOMEM; 94 return -ENOMEM;
95 95
96 port->iotype = UPIO_MEM; 96 port->port.iotype = UPIO_MEM;
97 port->iobase = 0; 97 port->port.iobase = 0;
98 port->mapbase = base + offset; 98 port->port.mapbase = base + offset;
99 port->membase = priv->remapped_bar[bar] + offset; 99 port->port.membase = priv->remapped_bar[bar] + offset;
100 port->regshift = regshift; 100 port->port.regshift = regshift;
101 } else { 101 } else {
102 port->iotype = UPIO_PORT; 102 port->port.iotype = UPIO_PORT;
103 port->iobase = base + offset; 103 port->port.iobase = base + offset;
104 port->mapbase = 0; 104 port->port.mapbase = 0;
105 port->membase = NULL; 105 port->port.membase = NULL;
106 port->regshift = 0; 106 port->port.regshift = 0;
107 } 107 }
108 return 0; 108 return 0;
109} 109}
@@ -113,7 +113,7 @@ setup_port(struct serial_private *priv, struct uart_port *port,
113 */ 113 */
114static int addidata_apci7800_setup(struct serial_private *priv, 114static int addidata_apci7800_setup(struct serial_private *priv,
115 const struct pciserial_board *board, 115 const struct pciserial_board *board,
116 struct uart_port *port, int idx) 116 struct uart_8250_port *port, int idx)
117{ 117{
118 unsigned int bar = 0, offset = board->first_offset; 118 unsigned int bar = 0, offset = board->first_offset;
119 bar = FL_GET_BASE(board->flags); 119 bar = FL_GET_BASE(board->flags);
@@ -140,7 +140,7 @@ static int addidata_apci7800_setup(struct serial_private *priv,
140 */ 140 */
141static int 141static int
142afavlab_setup(struct serial_private *priv, const struct pciserial_board *board, 142afavlab_setup(struct serial_private *priv, const struct pciserial_board *board,
143 struct uart_port *port, int idx) 143 struct uart_8250_port *port, int idx)
144{ 144{
145 unsigned int bar, offset = board->first_offset; 145 unsigned int bar, offset = board->first_offset;
146 146
@@ -195,7 +195,7 @@ static int pci_hp_diva_init(struct pci_dev *dev)
195static int 195static int
196pci_hp_diva_setup(struct serial_private *priv, 196pci_hp_diva_setup(struct serial_private *priv,
197 const struct pciserial_board *board, 197 const struct pciserial_board *board,
198 struct uart_port *port, int idx) 198 struct uart_8250_port *port, int idx)
199{ 199{
200 unsigned int offset = board->first_offset; 200 unsigned int offset = board->first_offset;
201 unsigned int bar = FL_GET_BASE(board->flags); 201 unsigned int bar = FL_GET_BASE(board->flags);
@@ -370,7 +370,7 @@ static void __devexit pci_ni8430_exit(struct pci_dev *dev)
370/* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */ 370/* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */
371static int 371static int
372sbs_setup(struct serial_private *priv, const struct pciserial_board *board, 372sbs_setup(struct serial_private *priv, const struct pciserial_board *board,
373 struct uart_port *port, int idx) 373 struct uart_8250_port *port, int idx)
374{ 374{
375 unsigned int bar, offset = board->first_offset; 375 unsigned int bar, offset = board->first_offset;
376 376
@@ -525,7 +525,7 @@ static int pci_siig_init(struct pci_dev *dev)
525 525
526static int pci_siig_setup(struct serial_private *priv, 526static int pci_siig_setup(struct serial_private *priv,
527 const struct pciserial_board *board, 527 const struct pciserial_board *board,
528 struct uart_port *port, int idx) 528 struct uart_8250_port *port, int idx)
529{ 529{
530 unsigned int bar = FL_GET_BASE(board->flags) + idx, offset = 0; 530 unsigned int bar = FL_GET_BASE(board->flags) + idx, offset = 0;
531 531
@@ -619,7 +619,7 @@ static int pci_timedia_init(struct pci_dev *dev)
619static int 619static int
620pci_timedia_setup(struct serial_private *priv, 620pci_timedia_setup(struct serial_private *priv,
621 const struct pciserial_board *board, 621 const struct pciserial_board *board,
622 struct uart_port *port, int idx) 622 struct uart_8250_port *port, int idx)
623{ 623{
624 unsigned int bar = 0, offset = board->first_offset; 624 unsigned int bar = 0, offset = board->first_offset;
625 625
@@ -653,7 +653,7 @@ pci_timedia_setup(struct serial_private *priv,
653static int 653static int
654titan_400l_800l_setup(struct serial_private *priv, 654titan_400l_800l_setup(struct serial_private *priv,
655 const struct pciserial_board *board, 655 const struct pciserial_board *board,
656 struct uart_port *port, int idx) 656 struct uart_8250_port *port, int idx)
657{ 657{
658 unsigned int bar, offset = board->first_offset; 658 unsigned int bar, offset = board->first_offset;
659 659
@@ -754,7 +754,7 @@ static int pci_ni8430_init(struct pci_dev *dev)
754static int 754static int
755pci_ni8430_setup(struct serial_private *priv, 755pci_ni8430_setup(struct serial_private *priv,
756 const struct pciserial_board *board, 756 const struct pciserial_board *board,
757 struct uart_port *port, int idx) 757 struct uart_8250_port *port, int idx)
758{ 758{
759 void __iomem *p; 759 void __iomem *p;
760 unsigned long base, len; 760 unsigned long base, len;
@@ -781,7 +781,7 @@ pci_ni8430_setup(struct serial_private *priv,
781 781
782static int pci_netmos_9900_setup(struct serial_private *priv, 782static int pci_netmos_9900_setup(struct serial_private *priv,
783 const struct pciserial_board *board, 783 const struct pciserial_board *board,
784 struct uart_port *port, int idx) 784 struct uart_8250_port *port, int idx)
785{ 785{
786 unsigned int bar; 786 unsigned int bar;
787 787
@@ -1032,10 +1032,17 @@ static int pci_oxsemi_tornado_init(struct pci_dev *dev)
1032 return number_uarts; 1032 return number_uarts;
1033} 1033}
1034 1034
1035static int 1035static int pci_asix_setup(struct serial_private *priv,
1036pci_default_setup(struct serial_private *priv, 1036 const struct pciserial_board *board,
1037 struct uart_8250_port *port, int idx)
1038{
1039 port->bugs |= UART_BUG_PARITY;
1040 return pci_default_setup(priv, board, port, idx);
1041}
1042
1043static int pci_default_setup(struct serial_private *priv,
1037 const struct pciserial_board *board, 1044 const struct pciserial_board *board,
1038 struct uart_port *port, int idx) 1045 struct uart_8250_port *port, int idx)
1039{ 1046{
1040 unsigned int bar, offset = board->first_offset, maxnr; 1047 unsigned int bar, offset = board->first_offset, maxnr;
1041 1048
@@ -1057,15 +1064,15 @@ pci_default_setup(struct serial_private *priv,
1057static int 1064static int
1058ce4100_serial_setup(struct serial_private *priv, 1065ce4100_serial_setup(struct serial_private *priv,
1059 const struct pciserial_board *board, 1066 const struct pciserial_board *board,
1060 struct uart_port *port, int idx) 1067 struct uart_8250_port *port, int idx)
1061{ 1068{
1062 int ret; 1069 int ret;
1063 1070
1064 ret = setup_port(priv, port, 0, 0, board->reg_shift); 1071 ret = setup_port(priv, port, 0, 0, board->reg_shift);
1065 port->iotype = UPIO_MEM32; 1072 port->port.iotype = UPIO_MEM32;
1066 port->type = PORT_XSCALE; 1073 port->port.type = PORT_XSCALE;
1067 port->flags = (port->flags | UPF_FIXED_PORT | UPF_FIXED_TYPE); 1074 port->port.flags = (port->port.flags | UPF_FIXED_PORT | UPF_FIXED_TYPE);
1068 port->regshift = 2; 1075 port->port.regshift = 2;
1069 1076
1070 return ret; 1077 return ret;
1071} 1078}
@@ -1073,16 +1080,16 @@ ce4100_serial_setup(struct serial_private *priv,
1073static int 1080static int
1074pci_omegapci_setup(struct serial_private *priv, 1081pci_omegapci_setup(struct serial_private *priv,
1075 const struct pciserial_board *board, 1082 const struct pciserial_board *board,
1076 struct uart_port *port, int idx) 1083 struct uart_8250_port *port, int idx)
1077{ 1084{
1078 return setup_port(priv, port, 2, idx * 8, 0); 1085 return setup_port(priv, port, 2, idx * 8, 0);
1079} 1086}
1080 1087
1081static int skip_tx_en_setup(struct serial_private *priv, 1088static int skip_tx_en_setup(struct serial_private *priv,
1082 const struct pciserial_board *board, 1089 const struct pciserial_board *board,
1083 struct uart_port *port, int idx) 1090 struct uart_8250_port *port, int idx)
1084{ 1091{
1085 port->flags |= UPF_NO_TXEN_TEST; 1092 port->port.flags |= UPF_NO_TXEN_TEST;
1086 printk(KERN_DEBUG "serial8250: skipping TxEn test for device " 1093 printk(KERN_DEBUG "serial8250: skipping TxEn test for device "
1087 "[%04x:%04x] subsystem [%04x:%04x]\n", 1094 "[%04x:%04x] subsystem [%04x:%04x]\n",
1088 priv->dev->vendor, 1095 priv->dev->vendor,
@@ -1131,11 +1138,11 @@ static unsigned int kt_serial_in(struct uart_port *p, int offset)
1131 1138
1132static int kt_serial_setup(struct serial_private *priv, 1139static int kt_serial_setup(struct serial_private *priv,
1133 const struct pciserial_board *board, 1140 const struct pciserial_board *board,
1134 struct uart_port *port, int idx) 1141 struct uart_8250_port *port, int idx)
1135{ 1142{
1136 port->flags |= UPF_BUG_THRE; 1143 port->port.flags |= UPF_BUG_THRE;
1137 port->serial_in = kt_serial_in; 1144 port->port.serial_in = kt_serial_in;
1138 port->handle_break = kt_handle_break; 1145 port->port.handle_break = kt_handle_break;
1139 return skip_tx_en_setup(priv, board, port, idx); 1146 return skip_tx_en_setup(priv, board, port, idx);
1140} 1147}
1141 1148
@@ -1151,9 +1158,19 @@ static int pci_eg20t_init(struct pci_dev *dev)
1151static int 1158static int
1152pci_xr17c154_setup(struct serial_private *priv, 1159pci_xr17c154_setup(struct serial_private *priv,
1153 const struct pciserial_board *board, 1160 const struct pciserial_board *board,
1154 struct uart_port *port, int idx) 1161 struct uart_8250_port *port, int idx)
1155{ 1162{
1156 port->flags |= UPF_EXAR_EFR; 1163 port->port.flags |= UPF_EXAR_EFR;
1164 return pci_default_setup(priv, board, port, idx);
1165}
1166
1167static int
1168pci_wch_ch353_setup(struct serial_private *priv,
1169 const struct pciserial_board *board,
1170 struct uart_8250_port *port, int idx)
1171{
1172 port->port.flags |= UPF_FIXED_TYPE;
1173 port->port.type = PORT_16550A;
1157 return pci_default_setup(priv, board, port, idx); 1174 return pci_default_setup(priv, board, port, idx);
1158} 1175}
1159 1176
@@ -1164,6 +1181,8 @@ pci_xr17c154_setup(struct serial_private *priv,
1164#define PCI_SUBDEVICE_ID_OCTPRO422 0x0208 1181#define PCI_SUBDEVICE_ID_OCTPRO422 0x0208
1165#define PCI_SUBDEVICE_ID_POCTAL232 0x0308 1182#define PCI_SUBDEVICE_ID_POCTAL232 0x0308
1166#define PCI_SUBDEVICE_ID_POCTAL422 0x0408 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
1167#define PCI_VENDOR_ID_ADVANTECH 0x13fe 1186#define PCI_VENDOR_ID_ADVANTECH 0x13fe
1168#define PCI_DEVICE_ID_INTEL_CE4100_UART 0x2e66 1187#define PCI_DEVICE_ID_INTEL_CE4100_UART 0x2e66
1169#define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620 1188#define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620
@@ -1187,6 +1206,13 @@ pci_xr17c154_setup(struct serial_private *priv,
1187#define PCIE_DEVICE_ID_NEO_2_OX_IBM 0x00F6 1206#define PCIE_DEVICE_ID_NEO_2_OX_IBM 0x00F6
1188#define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001 1207#define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001
1189#define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d 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
1190 1216
1191/* Unknown vendors/cards - this should not be in linux/pci_ids.h */ 1217/* Unknown vendors/cards - this should not be in linux/pci_ids.h */
1192#define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 1218#define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584
@@ -1726,7 +1752,41 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
1726 .subvendor = PCI_ANY_ID, 1752 .subvendor = PCI_ANY_ID,
1727 .subdevice = PCI_ANY_ID, 1753 .subdevice = PCI_ANY_ID,
1728 .setup = pci_omegapci_setup, 1754 .setup = pci_omegapci_setup,
1729 }, 1755 },
1756 /* WCH CH353 2S1P card (16550 clone) */
1757 {
1758 .vendor = PCI_VENDOR_ID_WCH,
1759 .device = PCI_DEVICE_ID_WCH_CH353_2S1P,
1760 .subvendor = PCI_ANY_ID,
1761 .subdevice = PCI_ANY_ID,
1762 .setup = pci_wch_ch353_setup,
1763 },
1764 /* WCH CH353 4S card (16550 clone) */
1765 {
1766 .vendor = PCI_VENDOR_ID_WCH,
1767 .device = PCI_DEVICE_ID_WCH_CH353_4S,
1768 .subvendor = PCI_ANY_ID,
1769 .subdevice = PCI_ANY_ID,
1770 .setup = pci_wch_ch353_setup,
1771 },
1772 /* WCH CH353 2S1PF card (16550 clone) */
1773 {
1774 .vendor = PCI_VENDOR_ID_WCH,
1775 .device = PCI_DEVICE_ID_WCH_CH353_2S1PF,
1776 .subvendor = PCI_ANY_ID,
1777 .subdevice = PCI_ANY_ID,
1778 .setup = pci_wch_ch353_setup,
1779 },
1780 /*
1781 * ASIX devices with FIFO bug
1782 */
1783 {
1784 .vendor = PCI_VENDOR_ID_ASIX,
1785 .device = PCI_ANY_ID,
1786 .subvendor = PCI_ANY_ID,
1787 .subdevice = PCI_ANY_ID,
1788 .setup = pci_asix_setup,
1789 },
1730 /* 1790 /*
1731 * Default "match everything" terminator entry 1791 * Default "match everything" terminator entry
1732 */ 1792 */
@@ -1887,7 +1947,6 @@ enum pci_board_num_t {
1887 pbn_panacom, 1947 pbn_panacom,
1888 pbn_panacom2, 1948 pbn_panacom2,
1889 pbn_panacom4, 1949 pbn_panacom4,
1890 pbn_exsys_4055,
1891 pbn_plx_romulus, 1950 pbn_plx_romulus,
1892 pbn_oxsemi, 1951 pbn_oxsemi,
1893 pbn_oxsemi_1_4000000, 1952 pbn_oxsemi_1_4000000,
@@ -2393,13 +2452,6 @@ static struct pciserial_board pci_boards[] __devinitdata = {
2393 .reg_shift = 7, 2452 .reg_shift = 7,
2394 }, 2453 },
2395 2454
2396 [pbn_exsys_4055] = {
2397 .flags = FL_BASE2,
2398 .num_ports = 4,
2399 .base_baud = 115200,
2400 .uart_offset = 8,
2401 },
2402
2403 /* I think this entry is broken - the first_offset looks wrong --rmk */ 2455 /* I think this entry is broken - the first_offset looks wrong --rmk */
2404 [pbn_plx_romulus] = { 2456 [pbn_plx_romulus] = {
2405 .flags = FL_BASE2, 2457 .flags = FL_BASE2,
@@ -2624,10 +2676,14 @@ static struct pciserial_board pci_boards[] __devinitdata = {
2624 }, 2676 },
2625}; 2677};
2626 2678
2627static const struct pci_device_id softmodem_blacklist[] = { 2679static const struct pci_device_id blacklist[] = {
2680 /* softmodems */
2628 { PCI_VDEVICE(AL, 0x5457), }, /* ALi Corporation M5457 AC'97 Modem */ 2681 { PCI_VDEVICE(AL, 0x5457), }, /* ALi Corporation M5457 AC'97 Modem */
2629 { PCI_VDEVICE(MOTOROLA, 0x3052), }, /* Motorola Si3052-based modem */ 2682 { PCI_VDEVICE(MOTOROLA, 0x3052), }, /* Motorola Si3052-based modem */
2630 { PCI_DEVICE(0x1543, 0x3052), }, /* Si3052-based modem, default IDs */ 2683 { PCI_DEVICE(0x1543, 0x3052), }, /* Si3052-based modem, default IDs */
2684
2685 /* multi-io cards handled by parport_serial */
2686 { PCI_DEVICE(0x4348, 0x7053), }, /* WCH CH353 2S1P */
2631}; 2687};
2632 2688
2633/* 2689/*
@@ -2638,7 +2694,7 @@ static const struct pci_device_id softmodem_blacklist[] = {
2638static int __devinit 2694static int __devinit
2639serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board) 2695serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
2640{ 2696{
2641 const struct pci_device_id *blacklist; 2697 const struct pci_device_id *bldev;
2642 int num_iomem, num_port, first_port = -1, i; 2698 int num_iomem, num_port, first_port = -1, i;
2643 2699
2644 /* 2700 /*
@@ -2655,13 +2711,13 @@ serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
2655 2711
2656 /* 2712 /*
2657 * Do not access blacklisted devices that are known not to 2713 * Do not access blacklisted devices that are known not to
2658 * feature serial ports. 2714 * feature serial ports or are handled by other modules.
2659 */ 2715 */
2660 for (blacklist = softmodem_blacklist; 2716 for (bldev = blacklist;
2661 blacklist < softmodem_blacklist + ARRAY_SIZE(softmodem_blacklist); 2717 bldev < blacklist + ARRAY_SIZE(blacklist);
2662 blacklist++) { 2718 bldev++) {
2663 if (dev->vendor == blacklist->vendor && 2719 if (dev->vendor == bldev->vendor &&
2664 dev->device == blacklist->device) 2720 dev->device == bldev->device)
2665 return -ENODEV; 2721 return -ENODEV;
2666 } 2722 }
2667 2723
@@ -2728,7 +2784,7 @@ serial_pci_matches(const struct pciserial_board *board,
2728struct serial_private * 2784struct serial_private *
2729pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board) 2785pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board)
2730{ 2786{
2731 struct uart_port serial_port; 2787 struct uart_8250_port uart;
2732 struct serial_private *priv; 2788 struct serial_private *priv;
2733 struct pci_serial_quirk *quirk; 2789 struct pci_serial_quirk *quirk;
2734 int rc, nr_ports, i; 2790 int rc, nr_ports, i;
@@ -2768,22 +2824,22 @@ pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board)
2768 priv->dev = dev; 2824 priv->dev = dev;
2769 priv->quirk = quirk; 2825 priv->quirk = quirk;
2770 2826
2771 memset(&serial_port, 0, sizeof(struct uart_port)); 2827 memset(&uart, 0, sizeof(uart));
2772 serial_port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ; 2828 uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;
2773 serial_port.uartclk = board->base_baud * 16; 2829 uart.port.uartclk = board->base_baud * 16;
2774 serial_port.irq = get_pci_irq(dev, board); 2830 uart.port.irq = get_pci_irq(dev, board);
2775 serial_port.dev = &dev->dev; 2831 uart.port.dev = &dev->dev;
2776 2832
2777 for (i = 0; i < nr_ports; i++) { 2833 for (i = 0; i < nr_ports; i++) {
2778 if (quirk->setup(priv, board, &serial_port, i)) 2834 if (quirk->setup(priv, board, &uart, i))
2779 break; 2835 break;
2780 2836
2781#ifdef SERIAL_DEBUG_PCI 2837#ifdef SERIAL_DEBUG_PCI
2782 printk(KERN_DEBUG "Setup PCI port: port %lx, irq %d, type %d\n", 2838 printk(KERN_DEBUG "Setup PCI port: port %lx, irq %d, type %d\n",
2783 serial_port.iobase, serial_port.irq, serial_port.iotype); 2839 uart.port.iobase, uart.port.irq, uart.port.iotype);
2784#endif 2840#endif
2785 2841
2786 priv->line[i] = serial8250_register_port(&serial_port); 2842 priv->line[i] = serial8250_register_8250_port(&uart);
2787 if (priv->line[i] < 0) { 2843 if (priv->line[i] < 0) {
2788 printk(KERN_WARNING "Couldn't register serial port %s: %d\n", pci_name(dev), priv->line[i]); 2844 printk(KERN_WARNING "Couldn't register serial port %s: %d\n", pci_name(dev), priv->line[i]);
2789 break; 2845 break;
@@ -3193,7 +3249,7 @@ static struct pci_device_id serial_pci_tbl[] = {
3193 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, 3249 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
3194 PCI_SUBVENDOR_ID_EXSYS, 3250 PCI_SUBVENDOR_ID_EXSYS,
3195 PCI_SUBDEVICE_ID_EXSYS_4055, 0, 0, 3251 PCI_SUBDEVICE_ID_EXSYS_4055, 0, 0,
3196 pbn_exsys_4055 }, 3252 pbn_b2_4_115200 },
3197 /* 3253 /*
3198 * Megawolf Romulus PCI Serial Card, from Mike Hudson 3254 * Megawolf Romulus PCI Serial Card, from Mike Hudson
3199 * (Exoray@isys.ca) 3255 * (Exoray@isys.ca)
@@ -3232,8 +3288,11 @@ static struct pci_device_id serial_pci_tbl[] = {
3232 * For now just used the hex ID 0x950a. 3288 * For now just used the hex ID 0x950a.
3233 */ 3289 */
3234 { PCI_VENDOR_ID_OXSEMI, 0x950a, 3290 { PCI_VENDOR_ID_OXSEMI, 0x950a,
3235 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_DUAL_SERIAL, 0, 0, 3291 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_DUAL_00,
3236 pbn_b0_2_115200 }, 3292 0, 0, pbn_b0_2_115200 },
3293 { PCI_VENDOR_ID_OXSEMI, 0x950a,
3294 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_DUAL_30,
3295 0, 0, pbn_b0_2_115200 },
3237 { PCI_VENDOR_ID_OXSEMI, 0x950a, 3296 { PCI_VENDOR_ID_OXSEMI, 0x950a,
3238 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3297 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3239 pbn_b0_2_1130000 }, 3298 pbn_b0_2_1130000 },
@@ -4179,6 +4238,25 @@ static struct pci_device_id serial_pci_tbl[] = {
4179 pbn_omegapci }, 4238 pbn_omegapci },
4180 4239
4181 /* 4240 /*
4241 * AgeStar as-prs2-009
4242 */
4243 { PCI_VENDOR_ID_AGESTAR, PCI_DEVICE_ID_AGESTAR_9375,
4244 PCI_ANY_ID, PCI_ANY_ID,
4245 0, 0, pbn_b0_bt_2_115200 },
4246
4247 /*
4248 * WCH CH353 series devices: The 2S1P is handled by parport_serial
4249 * so not listed here.
4250 */
4251 { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH353_4S,
4252 PCI_ANY_ID, PCI_ANY_ID,
4253 0, 0, pbn_b0_bt_4_115200 },
4254
4255 { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH353_2S1PF,
4256 PCI_ANY_ID, PCI_ANY_ID,
4257 0, 0, pbn_b0_bt_2_115200 },
4258
4259 /*
4182 * These entries match devices with class COMMUNICATION_SERIAL, 4260 * These entries match devices with class COMMUNICATION_SERIAL,
4183 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL 4261 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
4184 */ 4262 */