1. 07 1月, 2011 1 次提交
  2. 17 12月, 2010 6 次提交
  3. 11 12月, 2010 8 次提交
    • O
      8250: fix uninitialized FIFOs · e4f05af1
      Ondrej Puzman 提交于
      I have found a bug in 8250.c driver which causes that 16550A uart FIFOs
      are not turned on during initialization if they are manually configured
      by setserial. UART is then working only as plain 16450 without FIFOs. On
      systems with higher interrupt latency this causes buffer overruns and
      loss of received data when using higher communication speeds.
      
      I'm working for a company which produces industrial computers. These
      devices typically contain high number (8 or more) of traditional 16550A
      uarts - we use TL16C554A chips, but that is not much relevant. UARTs are
      connected to the CPU by ISA bus (Celeron based devices) or LPC bus (Atom
      based devices).
      
      In the Linux the UARTs are using standard 8250.c driver and are
      initialized using setserial command:
      setserial /dev/ttyS4 uart 16550A port 0x3E0 irq 10 baud_base 115200
      
      This executes the UART initialization through serial8250_startup()
      function. At the beginning of the function up->capabilities is
      initialized from uart_config:
       up->capabilities = uart_config[up->port.type].flags;
      Please note that neither up->port.fifosize nor up->tx_loadsz is
      initialized here!!
      
      Later in the same function serial8250_clear_fifos() is called and
      disables FIFOs. The above comment says that they will be reenabled in
      set_termios (they won't ...)
      
      After serial8250_startup() the serial8250_set_termios() is called. In
      this function the following check fails because up->port.fifosize is
      zero because it is not initialized correctly.
      
              if (up->capabilities & UART_CAP_FIFO && up->port.fifosize > 1) {
                      if (baud < 2400)
                              fcr = UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1;
                      else
                              fcr = uart_config[up->port.type].fcr;
              }
      
      fcr variable remains zero and in the end the FCR register is set to zero
      which results in disabled FIFOs even if the UART type is 16550A. This is
      also true for other types of UARTs with FIFOs.
      
      If the UART is autoconfigured via 'setserial /dev/ttySx autoconfig' then
      port.fifosize and tx_loadsz are initialized correctly in the
      autoconfig() function and the UART is working correctly then.
      
      I checked the source codes and I can say that this bug is present in
      2.6.x series of kernels for a couple of years. Namely I can confirm its
      presence in 2.6.16.57, 2.6.32.24 and 2.6.36.1 (tested all of them on our
      hardware).
      
      I think it was not noticed before because not many people use manually
      configured non PNP UARTs on ISA/LPC bus these days. Also the data loss
      caused by buffer overruns occures only if  IRQ latency is higher then
      time needed to receive one character on given communication speed.
      For example our hardware looses received characters only if the UARTs
      are connected throught LPC bus with SERIRQ (serial IRQ transport) and
      not if they are connected to ISA bus because LPC SERIRQ has higher
      interrupt latency then parallel ISA interupt lines.
      
      Here is the patch to correct the bug created against 2.6.36.1:
      Signed-off-by: NOndrej Puzman <puzman@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e4f05af1
    • N
      ip2: fix compiler warning on ip2main_pci_tbl · 53139e36
      Namhyung Kim 提交于
      Annotate ip2main_pci_tbl as '__used' to fix following warning:
      
        CC      drivers/char/ip2/ip2main.o
      drivers/char/ip2/ip2main.c:3227: warning: ‘ip2main_pci_tbl’ defined but not used
      Signed-off-by: NNamhyung Kim <namhyung@gmail.com>
      Cc: "Michael H. Warfield" <mhw@wittsend.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      53139e36
    • N
      specialix: fix compiler warning on specialix_pci_tbl · fd0f5c54
      Namhyung Kim 提交于
      Annotate specialx_pci_tbl as '__used' to fix following warning:
      
        CC      drivers/char/specialix.o
      drivers/char/specialix.c:2358: warning: ‘specialx_pci_tbl’ defined but not used
      Signed-off-by: NNamhyung Kim <namhyung@gmail.com>
      Cc: Roger Wolff <R.E.Wolff@BitWizard.nl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fd0f5c54
    • N
      rocket: fix compiler warning on rocket_pci_ids · 6835a209
      Namhyung Kim 提交于
      Annotate rocket_pci_ids as '__used' to fix following warning:
      
        CC      drivers/char/rocket.o
      drivers/char/rocket.c:1767: warning: ‘rocket_pci_ids’ defined but not used
      Signed-off-by: NNamhyung Kim <namhyung@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6835a209
    • J
      8250: add a UPIO_DWAPB32 for 32 bit accesses · a3ae0fc3
      Jamie Iles 提交于
      Some platforms contain a Synopsys DesignWare APB UART that is attached
      to a 32-bit APB bus where sub-word accesses are not allowed. Add a new
      IO type (UPIO_DWAPB32) that performs 32 bit acccesses to the UART.
      
      v2:
      	- don't test for 32 bit in the output fast path, provide a
      	  separate dwabp32_serial_out() function. Refactor
      	  dwabp_serial_out() so that we can reuse the LCR saving
      	  code.
      v3:
      	- rebased on top of "8250: use container_of() instead of
      	  casting"
      Signed-off-by: NJamie Iles <jamie@jamieiles.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a3ae0fc3
    • J
      8250: use container_of() instead of casting · 49d5741b
      Jamie Iles 提交于
      The 8250 driver structure uart_8250_port took advantage of the fact
      that the struct uart_port was the first member of its structure and
      used an explicit cast to convert to the derived class. Replace the
      explicit casts with container_of() for safety and clarity.
      Signed-off-by: NJamie Iles <jamie@jamieiles.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      49d5741b
    • C
      serial: omap-serial: Add support for kernel debugger · 1b41dbc1
      Cosmin Cojocar 提交于
      The kgdb invokes the poll_put_char and poll_get_char when communicating
      with the host. This patch also changes the initialization order because the
      kgdb will check at the very beginning, if there is a valid serial
      driver.
      Signed-off-by: NCosmin Cojocar <cosmin.cojocar@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1b41dbc1
    • R
      serial: fix pch_uart kconfig & build · 5ac387d9
      Randy Dunlap 提交于
      The dma_request_channel/dma_release_channel interfaces are not
      built when DMADEVICES is not enabled, so make the driver depend on
      DMADEVICES.  Also, the help text says that the driver enables & uses
      PCH_DMA, which is not enabled, so select that.
      
      ERROR: "__dma_request_channel" [drivers/serial/pch_uart.ko] undefined!
      ERROR: "dma_release_channel" [drivers/serial/pch_uart.ko] undefined!
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
      Reported-by: NZimny Lech <napohybelskurwysynom2010@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5ac387d9
  4. 01 12月, 2010 6 次提交
  5. 17 11月, 2010 8 次提交
  6. 12 11月, 2010 7 次提交
  7. 09 11月, 2010 4 次提交