Series short description
Subsystems (6)
cover Series short description
Serial patch queue for 2.6.30 window. This is mostly consolidation - fixing kref leaks and the like. The controversial cpu_relax change for blackfin, and the PnP serial console patch have been dropped from this set.
---
Alan Cox (2):
isicom: isicom kref leak fix
ucc: Fix leaky error path
Alexander Beregalov (1):
mux: fix build problem
Breno Leitao (3):
icom: remove unused variables
jsm: Fix the return variable and removing the unused retval.
jsm: define init function as __devinit
Danny Kukawka (1):
8250_pnp.c: add another Wacom tablet
Graf Yang (1):
blackfin: Subtract ANOMALY_05000230 on quot
Jiri Slaby (3):
PCI: quirks, don't mark one netmos as class other
mxser: remove tty_port_tty_get from mxser_check_modem_status
tty: moxa, fix refcounting in moxa_poll_port
Matthew Garrett (1):
serial: Update PNP IDs
Michael Hennerich (1):
blackfin: BF538/9 serial uart support
Mike Frysinger (1):
blackfin: Use unsigned long for flags with irq functions
Roel Kluin (1):
rio: addition has higher precedence than ?:
Scott James Remnant (5):
riscom8: Auto-load riscom8 module when device opened.
usb: Auto-load cdc_acm module when device opened.
specialix: Auto-load specialix module when device opened.
cyclades: Auto-load cyclades module when device opened.
applicom: Auto-load applicom module when device opened.
Shawn Bohrer (1):
8250_pci: add support for National Instruments 843x RS232 devices
Sonic Zhang (2):
Fix DMA rx ring buffer handling
blackfin: Fix tty compile error in PIO mode
Will Page (1):
8250_pci: add support for National Instruments legacy 8420 RS232 boards
drivers/char/applicom.c | 1 drivers/char/cyclades.c | 2 drivers/char/isicom.c | 1 drivers/char/moxa.c | 9 - drivers/char/mxser.c | 1 drivers/char/rio/rio_linux.c | 2 drivers/char/riscom8.c | 2 drivers/char/specialix.c | 1 drivers/pci/quirks.c | 6 - drivers/serial/8250_pci.c | 411 +++++++++++++++++++++++++++++++++++++ drivers/serial/8250_pnp.c | 7 + drivers/serial/Kconfig | 2 drivers/serial/bfin_5xx.c | 15 + drivers/serial/icom.c | 14 - drivers/serial/jsm/jsm_driver.c | 9 - drivers/serial/jsm/jsm_tty.c | 4 drivers/serial/ucc_uart.c | 1 drivers/usb/class/cdc-acm.c | 2 drivers/usb/serial/symbolserial.c | 67 ------ include/linux/pci_ids.h | 26 ++ include/linux/serial_core.h | 2 22 files changed, 483 insertions(+), 104 deletions(-)
PATCH 1/24 8250_pnp.c: add another Wacom tablet
From: Danny Kukawka <[email protected]>
Add another serial Wacom tablet with pnp_id: WACF009.
--
8250_pnp.c | 1 + 1 file changed, 1 insertion(+)
---
drivers/serial/8250_pnp.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/serial/8250_pnp.c +1 -0
@@ -333,6 +333,7 @@ static const struct pnp_device_id pnp_dev_table[] = { { "WACF006", 0 }, { "WACF007", 0 }, { "WACF008", 0 }, + { "WACF009", 0 },/* Compaq touchscreen */ { "FPI2002", 0 }, /* Fujitsu Stylistic touchscreens */
PATCH 2/24 serial: Update PNP IDs
In reply to Alan CoxFrom: Matthew Garrett <[email protected]>
Add new Wacom device IDs to the 8250_pnp serial driver, to support autoconfig on some newer tablet PCs. Also add a comment to clarify that the FUJ02E6 device is a custom protocol, not a Wacom tablet.
---
drivers/serial/8250_pnp.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/serial/8250_pnp.c +5 -1
@@ -334,6 +334,9 @@ static const struct pnp_device_id pnp_dev_table[] = { { "WACF007", 0 }, { "WACF008", 0 }, { "WACF009", 0 }, + { "WACF00A", 0 }, + { "WACF00B", 0 }, + { "WACF00C", 0 },/* Compaq touchscreen */ { "FPI2002", 0 }, /* Fujitsu Stylistic touchscreens */
@@ -347,8 +350,9 @@ static const struct pnp_device_id pnp_dev_table[] = { { "FUJ02B8", 0 }, { "FUJ02B9", 0 }, { "FUJ02BC", 0 }, -/* Fujitsu Wacom Tablet PC devices */ +/* Fujitsu Wacom Tablet PC device */ { "FUJ02E5", 0 }, +/* Fujitsu P-series tablet PC device */ { "FUJ02E6", 0 },/* * LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in
PATCH 3/24 8250_pci: add support for National Instruments 843x RS232 devices
In reply to Alan CoxFrom: Shawn Bohrer <[email protected]>
This implements basic support for all 843x RS232 devices, but does not add DMA support. This means that sustained data transfers at high baud rates may not be possible on multiple ports simultaneously.
---
drivers/serial/8250_pci.c | 193 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/pci_ids.h | 14 +++ 2 files changed, 207 insertions(+), 0 deletions(-)
drivers/serial/8250_pci.c +193 -0
@@ -306,6 +306,36 @@ static void __devexit pci_plx9050_exit(struct pci_dev *dev) } } +/* MITE registers */ +#define MITE_IOWBSR1 0xc4 +#define MITE_IOWCR1 0xf4 +#define MITE_LCIMR1 0x08 +#define MITE_LCIMR2 0x10 + +#define MITE_LCIMR2_CLR_CPU_IE (1 << 30) + +static void __devexit pci_ni8430_exit(struct pci_dev *dev) +{ +void __iomem *p; +unsigned long base, len; +unsigned int bar =0 ; + +if ((pci_resource_flags (dev, bar) &IORESOURCE_MEM ) ==0 ) { +moan_device ("no memory in bar" , dev); +return ; + } + + base =pci_resource_start (dev, bar); + len =pci_resource_len (dev, bar); + p =ioremap_nocache (base, len); +if (p ==NULL ) +return ; + +/* Disable the CPU Interrupt */ +writel (MITE_LCIMR2_CLR_CPU_IE , p +MITE_LCIMR2 ); +iounmap (p); +} +/* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */ static int sbs_setup(struct serial_private *priv, const struct pciserial_board *board,
@@ -597,6 +627,82 @@ static int pci_xircom_init(struct pci_dev *dev)return 0 ; } +#define MITE_IOWBSR1_WSIZE 0xa +#define MITE_IOWBSR1_WIN_OFFSET 0x800 +#define MITE_IOWBSR1_WENAB (1 << 7) +#define MITE_LCIMR1_IO_IE_0 (1 << 24) +#define MITE_LCIMR2_SET_CPU_IE (1 << 31) +#define MITE_IOWCR1_RAMSEL_MASK 0xfffffffe + +static int pci_ni8430_init (struct pci_dev *dev) +{ +void __iomem *p; +unsigned long base, len; +u32 device_window; +unsigned int bar =0 ; + +if ((pci_resource_flags (dev, bar) &IORESOURCE_MEM ) ==0 ) { +moan_device ("no memory in bar" , dev); +return 0 ; + } + + base =pci_resource_start (dev, bar); + len =pci_resource_len (dev, bar); + p =ioremap_nocache (base, len); +if (p ==NULL ) +return -ENOMEM ; + +/* Set device window address and size in BAR0 */ + device_window = ((base +MITE_IOWBSR1_WIN_OFFSET ) &0xffffff00 ) + |MITE_IOWBSR1_WENAB |MITE_IOWBSR1_WSIZE ; +writel (device_window, p +MITE_IOWBSR1 ); + +/* Set window access to go to RAMSEL IO address space */ +writel ((readl (p +MITE_IOWCR1 ) &MITE_IOWCR1_RAMSEL_MASK ), + p +MITE_IOWCR1 ); + +/* Enable IO Bus Interrupt 0 */ +writel (MITE_LCIMR1_IO_IE_0 , p +MITE_LCIMR1 ); + +/* Enable CPU Interrupt */ +writel (MITE_LCIMR2_SET_CPU_IE , p +MITE_LCIMR2 ); + +iounmap (p); +return 0 ; +} + +/* UART Port Control Register */ +#define NI8430_PORTCON 0x0f +#define NI8430_PORTCON_TXVR_ENABLE (1 << 3) + +static int +pci_ni8430_setup (struct serial_private *priv,struct pciserial_board *board, +struct uart_port *port,int idx) +{ +void __iomem *p; +unsigned long base, len; +unsigned int bar, offset = board->first_offset; + +if (idx >= board->num_ports) +return 1 ; + + bar =FL_GET_BASE (board->flags); + offset += idx * board->uart_offset; + + base =pci_resource_start (priv->dev, bar); + len =pci_resource_len (priv->dev, bar); + p =ioremap_nocache (base, len); + +/* enable the transciever */ +writeb (readb (p + offset +NI8430_PORTCON ) |NI8430_PORTCON_TXVR_ENABLE , + p + offset +NI8430_PORTCON ); + +iounmap (p); + +return setup_port (priv, port, bar, offset, board->reg_shift); +} + +static int pci_netmos_init (struct pci_dev *dev) {/* subdevice 0x00PS means <P> parallel, <S> serial */
@@ -913,6 +1019,18 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { .exit = __devexit_p(pci_ite887x_exit), },/* +* National Instruments +*/ + { + .vendor = PCI_VENDOR_ID_NI, + .device = PCI_ANY_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_ni8430_init, + .setup = pci_ni8430_setup, + .exit = __devexit_p(pci_ni8430_exit), + }, +/* * Panacom */ {
@@ -1280,6 +1398,10 @@ enum pci_board_num_t { pbn_exar_XR17C154, pbn_exar_XR17C158, pbn_pasemi_1682M, + pbn_ni8430_2, + pbn_ni8430_4, + pbn_ni8430_8, + pbn_ni8430_16, };/*
@@ -1850,6 +1972,37 @@ static struct pciserial_board pci_boards[] __devinitdata = { .num_ports = 1, .base_baud = 8333333, }, +/* +* National Instruments 843x +*/ + [pbn_ni8430_16] = { + .flags = FL_BASE0, + .num_ports = 16, + .base_baud = 3686400, + .uart_offset = 0x10, + .first_offset = 0x800, + }, + [pbn_ni8430_8] = { + .flags = FL_BASE0, + .num_ports = 8, + .base_baud = 3686400, + .uart_offset = 0x10, + .first_offset = 0x800, + }, + [pbn_ni8430_4] = { + .flags = FL_BASE0, + .num_ports = 4, + .base_baud = 3686400, + .uart_offset = 0x10, + .first_offset = 0x800, + }, + [pbn_ni8430_2] = { + .flags = FL_BASE0, + .num_ports = 2, + .base_baud = 3686400, + .uart_offset = 0x10, + .first_offset = 0x800, + }, };static const struct pci_device_id softmodem_blacklist[] = {
@@ -3052,6 +3205,46 @@ static struct pci_device_id serial_pci_tbl[] = { pbn_pasemi_1682M },/* +* National Instruments +*/ + {PCI_VENDOR_ID_NI ,PCI_DEVICE_ID_NI_PXI8430_2322 , +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_ni8430_2 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2322, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_ni8430_2 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2324, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_ni8430_4 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2324, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_ni8430_4 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2328, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_ni8430_8 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2328, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_ni8430_8 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_23216, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_ni8430_16 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_23216, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_ni8430_16 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8432_2322, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_ni8430_2 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8432_2322, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_ni8430_2 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8432_2324, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_ni8430_4 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8432_2324, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_ni8430_4 }, + +/* * ADDI-DATA GmbH communication cards <[email protected]> */ { PCI_VENDOR_ID_ADDIDATA,
include/linux/pci_ids.h +14 -0
@@ -943,6 +943,20 @@#define PCI_DEVICE_ID_SUN_TOMATILLO 0xa801#define PCI_DEVICE_ID_SUN_CASSINI 0xabba +#define PCI_VENDOR_ID_NI 0x1093 +#define PCI_DEVICE_ID_NI_PXI8430_2322 0x7080 +#define PCI_DEVICE_ID_NI_PCI8430_2322 0x70db +#define PCI_DEVICE_ID_NI_PXI8430_2324 0x70dd +#define PCI_DEVICE_ID_NI_PCI8430_2324 0x70df +#define PCI_DEVICE_ID_NI_PXI8430_2328 0x70e2 +#define PCI_DEVICE_ID_NI_PCI8430_2328 0x70e4 +#define PCI_DEVICE_ID_NI_PXI8430_23216 0x70e6 +#define PCI_DEVICE_ID_NI_PCI8430_23216 0x70e7 +#define PCI_DEVICE_ID_NI_PXI8432_2322 0x70e8 +#define PCI_DEVICE_ID_NI_PCI8432_2322 0x70ea +#define PCI_DEVICE_ID_NI_PXI8432_2324 0x70ec +#define PCI_DEVICE_ID_NI_PCI8432_2324 0x70ee +#define PCI_VENDOR_ID_CMD 0x1095#define PCI_DEVICE_ID_CMD_643 0x0643#define PCI_DEVICE_ID_CMD_646 0x0646
PATCH 4/24 8250_pci: add support for National Instruments legacy 8420 RS232 boards
In reply to Alan CoxFrom: Will Page <[email protected]>
---
drivers/serial/8250_pci.c | 218 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/pci_ids.h | 12 ++ 2 files changed, 230 insertions(+), 0 deletions(-)
drivers/serial/8250_pci.c +218 -0
@@ -306,6 +306,33 @@ static void __devexit pci_plx9050_exit(struct pci_dev *dev) } } +#define NI8420_INT_ENABLE_REG 0x38 +#define NI8420_INT_ENABLE_BIT 0x2000 + +static void __devexit pci_ni8420_exit(struct pci_dev *dev) +{ +void __iomem *p; +unsigned long base, len; +unsigned int bar =0 ; + +if ((pci_resource_flags (dev, bar) &IORESOURCE_MEM ) ==0 ) { +moan_device ("no memory in bar" , dev); +return ; + } + + base =pci_resource_start (dev, bar); + len =pci_resource_len (dev, bar); + p =ioremap_nocache (base, len); +if (p ==NULL ) +return ; + +/* Disable the CPU Interrupt */ +writel (readl (p +NI8420_INT_ENABLE_REG ) & ~(NI8420_INT_ENABLE_BIT ), + p +NI8420_INT_ENABLE_REG ); +iounmap (p); +} + +/* MITE registers */ #define MITE_IOWBSR1 0xc4#define MITE_IOWCR1 0xf4
@@ -627,6 +654,31 @@ static int pci_xircom_init(struct pci_dev *dev)return 0 ; } +static int pci_ni8420_init (struct pci_dev *dev) +{ +void __iomem *p; +unsigned long base, len; +unsigned int bar =0 ; + +if ((pci_resource_flags (dev, bar) &IORESOURCE_MEM ) ==0 ) { +moan_device ("no memory in bar" , dev); +return 0 ; + } + + base =pci_resource_start (dev, bar); + len =pci_resource_len (dev, bar); + p =ioremap_nocache (base, len); +if (p ==NULL ) +return -ENOMEM ; + +/* Enable CPU Interrupt */ +writel (readl (p +NI8420_INT_ENABLE_REG ) |NI8420_INT_ENABLE_BIT , + p +NI8420_INT_ENABLE_REG ); + +iounmap (p); +return 0 ; +} +#define MITE_IOWBSR1_WSIZE 0xa#define MITE_IOWBSR1_WIN_OFFSET 0x800#define MITE_IOWBSR1_WENAB (1 << 7)
@@ -1023,6 +1075,114 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {*/ { .vendor = PCI_VENDOR_ID_NI, + .device = PCI_DEVICE_ID_NI_PCI23216, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_ni8420_init, + .setup = pci_default_setup, + .exit = __devexit_p(pci_ni8420_exit), + }, + { + .vendor = PCI_VENDOR_ID_NI, + .device = PCI_DEVICE_ID_NI_PCI2328, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_ni8420_init, + .setup = pci_default_setup, + .exit = __devexit_p(pci_ni8420_exit), + }, + { + .vendor = PCI_VENDOR_ID_NI, + .device = PCI_DEVICE_ID_NI_PCI2324, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_ni8420_init, + .setup = pci_default_setup, + .exit = __devexit_p(pci_ni8420_exit), + }, + { + .vendor = PCI_VENDOR_ID_NI, + .device = PCI_DEVICE_ID_NI_PCI2322, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_ni8420_init, + .setup = pci_default_setup, + .exit = __devexit_p(pci_ni8420_exit), + }, + { + .vendor = PCI_VENDOR_ID_NI, + .device = PCI_DEVICE_ID_NI_PCI2324I, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_ni8420_init, + .setup = pci_default_setup, + .exit = __devexit_p(pci_ni8420_exit), + }, + { + .vendor = PCI_VENDOR_ID_NI, + .device = PCI_DEVICE_ID_NI_PCI2322I, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_ni8420_init, + .setup = pci_default_setup, + .exit = __devexit_p(pci_ni8420_exit), + }, + { + .vendor = PCI_VENDOR_ID_NI, + .device = PCI_DEVICE_ID_NI_PXI8420_23216, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_ni8420_init, + .setup = pci_default_setup, + .exit = __devexit_p(pci_ni8420_exit), + }, + { + .vendor = PCI_VENDOR_ID_NI, + .device = PCI_DEVICE_ID_NI_PXI8420_2328, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_ni8420_init, + .setup = pci_default_setup, + .exit = __devexit_p(pci_ni8420_exit), + }, + { + .vendor = PCI_VENDOR_ID_NI, + .device = PCI_DEVICE_ID_NI_PXI8420_2324, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_ni8420_init, + .setup = pci_default_setup, + .exit = __devexit_p(pci_ni8420_exit), + }, + { + .vendor = PCI_VENDOR_ID_NI, + .device = PCI_DEVICE_ID_NI_PXI8420_2322, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_ni8420_init, + .setup = pci_default_setup, + .exit = __devexit_p(pci_ni8420_exit), + }, + { + .vendor = PCI_VENDOR_ID_NI, + .device = PCI_DEVICE_ID_NI_PXI8422_2324, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_ni8420_init, + .setup = pci_default_setup, + .exit = __devexit_p(pci_ni8420_exit), + }, + { + .vendor = PCI_VENDOR_ID_NI, + .device = PCI_DEVICE_ID_NI_PXI8422_2322, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_ni8420_init, + .setup = pci_default_setup, + .exit = __devexit_p(pci_ni8420_exit), + }, + { + .vendor = PCI_VENDOR_ID_NI, .device = PCI_ANY_ID, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
@@ -1334,6 +1494,7 @@ enum pci_board_num_t { pbn_b1_2_115200, pbn_b1_4_115200, pbn_b1_8_115200, + pbn_b1_16_115200, pbn_b1_1_921600, pbn_b1_2_921600,
@@ -1343,6 +1504,9 @@ enum pci_board_num_t { pbn_b1_2_1250000, pbn_b1_bt_1_115200, + pbn_b1_bt_2_115200, + pbn_b1_bt_4_115200, + pbn_b1_bt_2_921600, pbn_b1_1_1382400,
@@ -1609,6 +1773,12 @@ static struct pciserial_board pci_boards[] __devinitdata = { .base_baud = 115200, .uart_offset = 8, }, + [pbn_b1_16_115200] = { + .flags = FL_BASE1, + .num_ports = 16, + .base_baud = 115200, + .uart_offset = 8, + }, [pbn_b1_1_921600] = { .flags = FL_BASE1,
@@ -1647,6 +1817,18 @@ static struct pciserial_board pci_boards[] __devinitdata = { .base_baud = 115200, .uart_offset = 8, }, + [pbn_b1_bt_2_115200] = { + .flags = FL_BASE1|FL_BASE_BARS, + .num_ports = 2, + .base_baud = 115200, + .uart_offset = 8, + }, + [pbn_b1_bt_4_115200] = { + .flags = FL_BASE1|FL_BASE_BARS, + .num_ports = 4, + .base_baud = 115200, + .uart_offset = 8, + }, [pbn_b1_bt_2_921600] = { .flags = FL_BASE1|FL_BASE_BARS,
@@ -3207,6 +3389,42 @@ static struct pci_device_id serial_pci_tbl[] = {/* * National Instruments */ + {PCI_VENDOR_ID_NI ,PCI_DEVICE_ID_NI_PCI23216 , +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_b1_16_115200 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2328, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_b1_8_115200 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2324, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_b1_bt_4_115200 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2322, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_b1_bt_2_115200 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2324I, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_b1_bt_4_115200 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2322I, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_b1_bt_2_115200 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_23216, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_b1_16_115200 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2328, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_b1_8_115200 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2324, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_b1_bt_4_115200 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2322, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_b1_bt_2_115200 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8422_2324, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_b1_bt_4_115200 }, + { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8422_2322, +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , + pbn_b1_bt_2_115200 }, { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2322,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , pbn_ni8430_2 },
include/linux/pci_ids.h +12 -0
@@ -944,6 +944,18 @@#define PCI_DEVICE_ID_SUN_CASSINI 0xabba#define PCI_VENDOR_ID_NI 0x1093 +#define PCI_DEVICE_ID_NI_PCI2322 0xd130 +#define PCI_DEVICE_ID_NI_PCI2324 0xd140 +#define PCI_DEVICE_ID_NI_PCI2328 0xd150 +#define PCI_DEVICE_ID_NI_PXI8422_2322 0xd190 +#define PCI_DEVICE_ID_NI_PXI8422_2324 0xd1a0 +#define PCI_DEVICE_ID_NI_PXI8420_2322 0xd1d0 +#define PCI_DEVICE_ID_NI_PXI8420_2324 0xd1e0 +#define PCI_DEVICE_ID_NI_PXI8420_2328 0xd1f0 +#define PCI_DEVICE_ID_NI_PXI8420_23216 0xd1f1 +#define PCI_DEVICE_ID_NI_PCI2322I 0xd250 +#define PCI_DEVICE_ID_NI_PCI2324I 0xd270 +#define PCI_DEVICE_ID_NI_PCI23216 0xd2b0#define PCI_DEVICE_ID_NI_PXI8430_2322 0x7080#define PCI_DEVICE_ID_NI_PCI8430_2322 0x70db#define PCI_DEVICE_ID_NI_PXI8430_2324 0x70dd
PATCH 5/24 blackfin: BF538/9 serial uart support
In reply to Alan CoxFrom: Michael Hennerich <[email protected]>
Enable third UART on BF538/9
---
drivers/serial/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/serial/Kconfig +1 -1
@@ -770,7 +770,7 @@ config UART1_RTS_PIN config SERIAL_BFIN_UART2 bool "Enable UART2" - depends on SERIAL_BFIN && (BF54x) + depends on SERIAL_BFIN && (BF54x || BF538 || BF539) help Enable UART2
PATCH 6/24 blackfin: Use unsigned long for flags with irq functions
In reply to Alan CoxFrom: Mike Frysinger <[email protected]>
---
drivers/serial/bfin_5xx.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/serial/bfin_5xx.c +3 -2
@@ -415,7 +415,8 @@ static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)void bfin_serial_rx_dma_timeout (struct bfin_serial_port *uart) { -int x_pos, pos, flags; +int x_pos, pos; +unsigned long flags;spin_lock_irqsave (&uart->port.lock, flags);
@@ -1088,7 +1089,7 @@ static void bfin_serial_console_write(struct console *co, const char *s, unsigned int count) { struct bfin_serial_port *uart = &bfin_serial_ports[co->index]; -int flags =0 ; +unsigned long flags;spin_lock_irqsave (&uart->port.lock, flags);uart_console_write (&uart->port, s, count, bfin_serial_console_putchar);
PATCH 7/24 blackfin: Fix tty compile error in PIO mode
In reply to Alan CoxFrom: Sonic Zhang <[email protected]>
drivers/serial/bfin_5xx.c: In function bfin_serial_rx_chars:drivers/serial/bfin_5xx.c:178: error: struct uart_info has no member
named tty
make[3]: *** [drivers/serial/bfin_5xx.o] Error 1
make[2]: *** [drivers/serial] Error 2
make[1]: *** [drivers] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/root/projects/uClinux-dist/linux-2.6.x'
make: *** [linux] Error 1
---
drivers/serial/bfin_5xx.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/serial/bfin_5xx.c +2 -2
@@ -174,10 +174,10 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart) return; } -if (!uart->port.info || !uart->port.info->tty) +if (!uart->port.info || !uart->port.info->port.tty)return ;#endif - tty = uart->port.info->tty; + tty = uart->port.info->port.tty;if (ANOMALY_05000363 ) {/* The BF533 (and BF561) family of processors have a nice anomaly
PATCH 8/24 Fix DMA rx ring buffer handling
In reply to Alan CoxFrom: Sonic Zhang <[email protected]>
---
drivers/serial/bfin_5xx.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/serial/bfin_5xx.c +3 -1
@@ -401,9 +401,11 @@ static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)else flg =TTY_NORMAL ; -for (i = uart->rx_dma_buf.tail; i != uart->rx_dma_buf.head; i++) { +for (i = uart->rx_dma_buf.tail; ; i++) {if (i >=UART_XMIT_SIZE ) i =0 ; +if (i == uart->rx_dma_buf.head) +break ;if (!uart_handle_sysrq_char (&uart->port, uart->rx_dma_buf.buf[i]))uart_insert_char (&uart->port, status,OE , uart->rx_dma_buf.buf[i], flg);
PATCH 9/24 blackfin: Subtract ANOMALY_05000230 on quot
In reply to Alan CoxFrom: Graf Yang <[email protected]>
Fix bug - up arrow key works abnormal for bf561 ezkit board
---
drivers/serial/bfin_5xx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/serial/bfin_5xx.c +1 -1
@@ -760,7 +760,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios, } baud =uart_get_baud_rate (port, termios, old,0 , port->uartclk/16 ); - quot =uart_get_divisor (port, baud); + quot =uart_get_divisor (port, baud) -ANOMALY_05000230 ;spin_lock_irqsave (&uart->port.lock, flags);UART_SET_ANOMALY_THRESHOLD (uart,USEC_PER_SEC / baud *15 );
PATCH 10/24 applicom: Auto-load applicom module when device opened.
In reply to Alan CoxFrom: Scott James Remnant <[email protected]>
The applicom module is missing the char-major-10-157 alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
---
drivers/char/applicom.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/char/applicom.c +1 -0
@@ -75,6 +75,7 @@ MODULE_DEVICE_TABLE(pci, applicom_pci_tbl);MODULE_AUTHOR ("David Woodhouse & Applicom International" );MODULE_DESCRIPTION ("Driver for Applicom Profibus card" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_MISCDEV (AC_MINOR );MODULE_SUPPORTED_DEVICE ("ac" );
PATCH 11/24 cyclades: Auto-load cyclades module when device opened.
In reply to Alan CoxFrom: Scott James Remnant <[email protected]>
The cyclades module is missing the char-major-19-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
---
drivers/char/cyclades.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/char/cyclades.c +2 -0
@@ -646,6 +646,7 @@#include <linux/spinlock.h> #include <linux/bitops.h> #include <linux/firmware.h> +#include <linux/device.h> #include <asm/system.h> #include <linux/io.h>
@@ -5422,3 +5423,4 @@ module_exit(cy_cleanup_module);MODULE_LICENSE ("GPL" );MODULE_VERSION (CY_VERSION ); +MODULE_ALIAS_CHARDEV_MAJOR (CYCLADES_MAJOR );
PATCH 12/24 specialix: Auto-load specialix module when device opened.
In reply to Alan CoxFrom: Scott James Remnant <[email protected]>
The specialix module is missing the char-major-75-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
---
drivers/char/specialix.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/char/specialix.c +1 -0
@@ -2365,3 +2365,4 @@ module_init(specialix_init_module);module_exit (specialix_exit_module);MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV_MAJOR (SPECIALIX_NORMAL_MAJOR );
PATCH 13/24 usb: Auto-load cdc_acm module when device opened.
In reply to Alan CoxFrom: Scott James Remnant <[email protected]>
The cdc_acm module is missing the char-major-166-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
---
drivers/usb/class/cdc-acm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/class/cdc-acm.c +1 -1
@@ -1496,4 +1496,4 @@ module_exit(acm_exit);MODULE_AUTHOR (DRIVER_AUTHOR );MODULE_DESCRIPTION (DRIVER_DESC );MODULE_LICENSE ("GPL" ); - +MODULE_ALIAS_CHARDEV_MAJOR (ACM_TTY_MAJOR );
PATCH 14/24 riscom8: Auto-load riscom8 module when device opened.
In reply to Alan CoxFrom: Scott James Remnant <[email protected]>
The riscom8 module is missing the char-major-48-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
---
drivers/char/riscom8.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/char/riscom8.c +2 -0
@@ -48,6 +48,7 @@#include <linux/delay.h> #include <linux/tty_flip.h> #include <linux/spinlock.h> +#include <linux/device.h> #include <linux/uaccess.h>
@@ -1524,6 +1525,7 @@ module_param(iobase2, int, 0);module_param (iobase3, int,0 );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV_MAJOR (RISCOM8_NORMAL_MAJOR );#endif /* MODULE */ /*
PATCH 15/24 ucc: Fix leaky error path
In reply to Alan CoxFound by Daniel Marjamäki using cppcheck
---
drivers/serial/ucc_uart.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/serial/ucc_uart.c +1 -0
@@ -1274,6 +1274,7 @@ static int ucc_uart_probe(struct of_device *ofdev,if (!iprop) { iprop =of_get_property (np,"device-id" ,NULL );if (!iprop) { +kfree (qe_port);dev_err (&ofdev->dev,"UCC is unspecified in " "device tree\n" );return -EINVAL ;
PATCH 16/24 isicom: isicom kref leak fix
In reply to Alan CoxThe isicom driver leaks a kref on the shutdown path. Drop the additional kref we took
---
drivers/char/isicom.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/char/isicom.c +1 -0
@@ -925,6 +925,7 @@ static void isicom_shutdown_port(struct isi_port *port)if (!card->count)isicom_shutdown_board (card); } +tty_kref_put (tty); }static void isicom_flush_buffer (struct tty_struct *tty)
PATCH 17/24 tty: moxa, fix refcounting in moxa_poll_port
In reply to Alan CoxFrom: Jiri Slaby <[email protected]>
There is missing tty_kref_put on some paths in moxa_poll_port, although the reference is always taken. Fix it.
---
drivers/char/moxa.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/char/moxa.c +5 -4
@@ -1486,11 +1486,11 @@ static int moxa_poll_port(struct moxa_port *p, unsigned int handle, }if (!handle)/* nothing else to do */ -return 0 ; + goto put; intr =readw (ip);/* port irq status */ if (intr ==0 ) -return 0 ; + goto put;writew (0 , ip);/* ACK port */ ofsAddr = p->tableAddr;
@@ -1499,16 +1499,17 @@ static int moxa_poll_port(struct moxa_port *p, unsigned int handle, ofsAddr + HostStat);if (!inited) -return 0 ; + goto put;if (tty && (intr & IntrBreak) && !I_IGNBRK (tty)) {/* BREAK */ tty_insert_flip_char (tty,0 ,TTY_BREAK );tty_schedule_flip (tty); } -tty_kref_put (tty);if (intr & IntrLine)moxa_new_dcdstate (p,readb (ofsAddr + FlagStat) & DCD_state); +put: +tty_kref_put (tty);return 0 ; }
PATCH 18/24 mxser: remove tty_port_tty_get from mxser_check_modem_status
In reply to Alan CoxFrom: Jiri Slaby <[email protected]>
mxser_check_modem_status is called with tty parameter, so the reference should be increased by callers already -- for ioctl syscall it is held whole time gap since open to close, for interrupt, the reference count is increased in the irq handler.
There is no tty_kref_put in that function, so this also fixes a refcounting bug.
---
drivers/char/mxser.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/char/mxser.c +0 -1
@@ -820,7 +820,6 @@ static void mxser_check_modem_status(struct tty_struct *tty,wake_up_interruptible (&port->port.open_wait); } - tty =tty_port_tty_get (&port->port);if (port->port.flags &ASYNC_CTS_FLOW ) {if (tty->hw_stopped) {if (status &UART_MSR_CTS ) {
PATCH 19/24 jsm: define init function as __devinit
In reply to Alan CoxFrom: Breno Leitao <[email protected]>
---
drivers/serial/jsm/jsm_driver.c | 2 +- drivers/serial/jsm/jsm_tty.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/serial/jsm/jsm_driver.c +1 -1
@@ -52,7 +52,7 @@ int jsm_debug;module_param (jsm_debug, int,0 );MODULE_PARM_DESC (jsm_debug,"Driver debugging level" ); -static int jsm_probe_one (struct pci_dev *pdev,const struct pci_device_id *ent) +static int __devinit jsm_probe_one (struct pci_dev *pdev,const struct pci_device_id *ent) {int rc =0 ;struct jsm_board *brd;
drivers/serial/jsm/jsm_tty.c +2 -2
@@ -367,7 +367,7 @@ static struct uart_ops jsm_ops = {* Init the tty subsystem. Called once per board after board has been * downloaded and init'ed. */ -int jsm_tty_init (struct jsm_board *brd) +int __devinit jsm_tty_init (struct jsm_board *brd) {int i;void __iomem *vaddr;
@@ -431,7 +431,7 @@ int jsm_tty_init(struct jsm_board *brd)return 0 ; } -int jsm_uart_port_init (struct jsm_board *brd) +int __devinit jsm_uart_port_init (struct jsm_board *brd) {int i;struct jsm_channel *ch;
PATCH 20/24 jsm: Fix the return variable and removing the unused retval.
In reply to Alan CoxFrom: Breno Leitao <[email protected]>
As it was, the retval was never returned, so its assignments were silly. Just consolidate everything to rc, and remove the unused retval variable.
---
drivers/serial/jsm/jsm_driver.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/serial/jsm/jsm_driver.c +3 -4
@@ -57,7 +57,6 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_deviceint rc =0 ;struct jsm_board *brd;static int adapter_count =0 ; -int retval; rc =pci_enable_device (pdev);if (rc) {
@@ -134,7 +133,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device rc =jsm_tty_init (brd);if (rc <0 ) {dev_err (&pdev->dev,"Can't init tty devices (%d)\n" , rc); - retval = -ENXIO ; + rc = -ENXIO ; goto out_free_irq; }
@@ -142,7 +141,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_deviceif (rc <0 ) {/* XXX: leaking all resources from jsm_tty_init here! */ dev_err (&pdev->dev,"Can't init uart port (%d)\n" , rc); - retval = -ENXIO ; + rc = -ENXIO ; goto out_free_irq; }
@@ -161,7 +160,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device/* XXX: leaking all resources from jsm_tty_init and jsm_uart_port_init here! */ dev_err (&pdev->dev,"memory allocation for flipbuf failed\n" ); - retval = -ENOMEM ; + rc = -ENOMEM ; goto out_free_irq; }
PATCH 21/24 mux: fix build problem
In reply to Alan CoxFrom: Alexander Beregalov <[email protected]>
Fixes:
In file included from drivers/serial/mux.c:37:include/linux/serial_core.h: In function 'uart_handle_sysrq_char':include/linux/serial_core.h:467: error: 'struct uart_port' has no member named 'sysrq' include/linux/serial_core.h:468: error: 'struct uart_port' has no member named 'sysrq'
---
include/linux/serial_core.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/serial_core.h +1 -1
@@ -277,7 +277,7 @@ struct uart_port {struct uart_icount icount;/* statistics */ struct console *cons;/* struct console, if any */ -#ifdef CONFIG_SERIAL_CORE_CONSOLE +#if defined(CONFIG_SERIAL_CORE_CONSOLE ) || defined(SUPPORT_SYSRQ )unsigned long sysrq;/* sysrq timeout */ #endif
PATCH 22/24 icom: remove unused variables
In reply to Alan CoxFrom: Breno Leitao <[email protected]>
---
drivers/serial/icom.c | 14 ++------------ 1 files changed, 2 insertions(+), 12 deletions(-)
drivers/serial/icom.c +2 -12
@@ -1098,7 +1098,6 @@ static void icom_set_termios(struct uart_port *port, {int baud;unsigned cflag, iflag; -int bits;char new_config2;char new_config3 =0 ;char tmp_byte;
@@ -1119,34 +1118,27 @@ static void icom_set_termios(struct uart_port *port,switch (cflag &CSIZE ) {case CS5 :/* 5 bits/char */ new_config2 |=ICOM_ACFG_5BPC ; - bits =7 ;break ;case CS6 :/* 6 bits/char */ new_config2 |=ICOM_ACFG_6BPC ; - bits =8 ;break ;case CS7 :/* 7 bits/char */ new_config2 |=ICOM_ACFG_7BPC ; - bits =9 ;break ;case CS8 :/* 8 bits/char */ new_config2 |=ICOM_ACFG_8BPC ; - bits =10 ;break ;default : - bits =10 ;break ; }if (cflag &CSTOPB ) {/* 2 stop bits */ new_config2 |=ICOM_ACFG_2STOP_BIT ; - bits++; }if (cflag &PARENB ) {/* parity bit enabled */ new_config2 |=ICOM_ACFG_PARITY_ENAB ;trace (ICOM_PORT ,"PARENB" ,0 ); - bits++; }if (cflag &PARODD ) {/* odd parity */
@@ -1322,7 +1314,6 @@ static struct uart_driver icom_uart_driver = {static int __devinit icom_init_ports (struct icom_adapter *icom_adapter) {u32 subsystem_id = icom_adapter->subsystem_id; -int retval =0 ;int i;struct icom_port *icom_port;
@@ -1368,7 +1359,7 @@ static int __devinit icom_init_ports(struct icom_adapter *icom_adapter) } } -return retval; +return 0 ; }static void icom_port_active (struct icom_port *icom_port,struct icom_adapter *icom_adapter,int port_num)
@@ -1391,7 +1382,6 @@ static int __devinit icom_load_ports(struct icom_adapter *icom_adapter) {struct icom_port *icom_port;int port_num; -int retval;for (port_num =0 ; port_num < icom_adapter->numb_ports; port_num++) {
@@ -1405,7 +1395,7 @@ static int __devinit icom_load_ports(struct icom_adapter *icom_adapter) icom_port->adapter = icom_adapter;/* get port memory */ -if ((retval =get_port_memory (icom_port)) !=0 ) { +if (get_port_memory (icom_port) !=0 ) {dev_err (&icom_port->adapter->pci_dev->dev,"Memory allocation for port FAILED\n" ); }
PATCH 23/24 PCI: quirks, don't mark one netmos as class other
In reply to Alan CoxFrom: Jiri Slaby <[email protected]>
Let it as serial, since it doesn't have subdevice in the form of 0x00PS.
---
drivers/pci/quirks.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/pci/quirks.c +5 -1
@@ -1664,9 +1664,13 @@ static void __devinit quirk_netmos(struct pci_dev *dev)* of parallel ports and <S> is the number of serial ports. */ switch (dev->device) { +case PCI_DEVICE_ID_NETMOS_9835 : +/* Well, this rule doesn't hold for the following 9835 device */ +if (dev->subsystem_vendor ==PCI_VENDOR_ID_IBM && + dev->subsystem_device ==0x0299 ) +return ;case PCI_DEVICE_ID_NETMOS_9735 :case PCI_DEVICE_ID_NETMOS_9745 : -case PCI_DEVICE_ID_NETMOS_9835 :case PCI_DEVICE_ID_NETMOS_9845 :case PCI_DEVICE_ID_NETMOS_9855 : if ((dev->class >> 8) == PCI_CLASS_COMMUNICATION_SERIAL &&
PATCH 24/24 rio: addition has higher precedence than ?:
In reply to Alan CoxFrom: Roel Kluin <[email protected]>
---
drivers/char/rio/rio_linux.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/rio/rio_linux.c +1 -1
@@ -333,7 +333,7 @@ void rio_copy_to_card(void *from, void __iomem *to, int len)int rio_minor (struct tty_struct *tty) { -return tty->index + (tty->driver == rio_driver) ?0 :256 ; +return tty->index + ((tty->driver == rio_driver) ?0 :256 ); }static int rio_set_real_termios (void *ptr)