1. 19 4月, 2012 1 次提交
  2. 10 4月, 2012 2 次提交
  3. 10 3月, 2012 6 次提交
  4. 11 2月, 2012 1 次提交
  5. 04 2月, 2012 1 次提交
    • C
      tty: fix a build failure on sparc · e7c9bba7
      Cong Wang 提交于
      On sparc, there is a build failure:
      
      drivers/tty/serial/8250/8250.c:48:21: error: suncore.h: No such file or directory
      drivers/tty/serial/8250/8250.c:3275: error: implicit declaration of function 'sunserial_register_minors'
      drivers/tty/serial/8250/8250.c:3305: error: implicit declaration of function 'sunserial_unregister_minors'
      
      this is due to commit 9bef3d41
      (serial: group all the 8250 related code together) moved these files
      into 8250/ subdirectory, but forgot to change the reference
      to drivers/tty/serial/suncore.h.
      
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NWANG Cong <xiyou.wangcong@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e7c9bba7
  6. 25 1月, 2012 1 次提交
  7. 10 12月, 2011 6 次提交
  8. 27 11月, 2011 1 次提交
  9. 16 11月, 2011 2 次提交
    • G
      Revert "tty/serial: Prevent drop of DCD on suspend for Tegra UARTs" · 6edf0c9b
      Greg Kroah-Hartman 提交于
      This reverts commit 9636b755.
      
      It wasn't supposed to be applied, thanks to Doug for letting me know.
      
      Cc: Doug Anderson <dianders@chromium.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6edf0c9b
    • D
      tty/serial: Prevent drop of DCD on suspend for Tegra UARTs · 9636b755
      Doug Anderson 提交于
      On Tegra UARTs (except UART1), the DTR / DCD / DSR lines are not
      externally accessible.  Instead, the DTR line internally appears to be
      looped back to be the input to the DCD and DSR lines.  The net effect
      of this is that when we drop DTR (like when we suspend), we'll see DCD
      drop too.  ...and when we see DCD drop, we treat that as a hangup.
      
      In order to prevent this hangup from occurring at every sleep, we need
      to force DTR to remain high on Tegra UARTs.
      
      This patch uses the mcr_mask / mcr_force fields, which were originally
      added for the kludge ALPHA_KLUDGE_MCR.  Using these fields does not
      prevent us from removing ALPHA_KLUDGE_MCR--we can just remove the "if"
      tests I have added and always init mcr_mask / mcr_force from the
      serial8250_config.
      
      NOTE: If we have people that are using UARTA on a Tegra and need to
      control DTR, we'll need to either add a separate port type for UARTA
      or we'll need to add some tegra-specific code to detect whether the
      DTR needs to be left high.
      Signed-off-by: NDoug Anderson <dianders@chromium.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9636b755
  10. 27 9月, 2011 1 次提交
  11. 23 9月, 2011 1 次提交
  12. 20 9月, 2011 1 次提交
  13. 27 8月, 2011 1 次提交
  14. 24 8月, 2011 3 次提交
    • J
      tty: serial8250: remove UPIO_DWAPB{,32} · 4834d028
      Jamie Iles 提交于
      Now that platforms can override the port IRQ handler and the only user
      of these UPIO modes has been converted over, kill off UPIO_DWAPB and
      UPIO_DWAPB32.
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NJamie Iles <jamie@jamieiles.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4834d028
    • J
      tty: serial8250: allow platforms to override irq handler · 583d28e9
      Jamie Iles 提交于
      Some ports (e.g. Synopsys DesignWare 8250) have special requirements for
      handling the interrupts.  Allow these platforms to specify their own
      interrupt handler that will override the default.
      serial8250_handle_irq() is provided so that platforms can extend the IRQ
      handler rather than completely replacing it.
      Signed-off-by: NJamie Iles <jamie@jamieiles.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      583d28e9
    • A
      8250: Fix race condition in serial8250_backup_timeout(). · dbb3b1ca
      Al Cooper 提交于
      This is to fix an issue where output will suddenly become very slow.
      The problem occurs on 8250 UARTS with the hardware bug UART_BUG_THRE.
      
      BACKGROUND
      For normal UARTs (without UART_BUG_THRE): When the serial core layer
      gets new transmit data and the transmitter is idle, it buffers the
      data and calls the 8250s' serial8250_start_tx() routine which will
      simply enable the TX interrupt in the IER register and return. This
      should immediately fire a THRE interrupt and begin transmitting the
      data.
      For buggy UARTs (with UART_BUG_THRE): merely enabling the TX interrupt
      in IER does not necessarily generate a new THRE interrupt.
      Therefore, a background timer periodically checks to see if there is
      pending data, and starts transmission if that is the case.
      
      The bug happens on SMP systems when the system has nothing to transmit,
      the transmit interrupt is disabled and the following sequence occurs:
      - CPU0: The background timer routine serial8250_backup_timeout()
        starts and saves the state of the interrupt enable register (IER)
        and then disables all interrupts in IER. NOTE: The transmit interrupt
        (TI) bit is saved as disabled.
      - CPU1: The serial core gets data to transmit, grabs the port lock and
        calls serial8250_start_tx() which enables the TI in IER.
      - CPU0: serial8250_backup_timeout() waits for the port lock.
      - CPU1: finishes (with TI enabled) and releases the port lock.
      - CPU0: serial8250_backup_timeout() calls the interrupt routine which
        will transmit the next fifo's worth of data and then restores the
        IER from the previously saved value (TI disabled).
      At this point, as long as the serial core has more transmit data
      buffered, it will not call serial8250_start_tx() again and the
      background timer routine will slowly transmit the data.
      
      The fix is to have serial8250_start_tx() get the port lock before
      it saves the IER state and release it after restoring IER. This will
      prevent serial8250_start_tx() from running in parallel.
      Signed-off-by: NAl Cooper <alcooperx@gmail.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      dbb3b1ca
  15. 02 7月, 2011 1 次提交
  16. 08 6月, 2011 2 次提交
  17. 20 5月, 2011 2 次提交
  18. 20 4月, 2011 1 次提交
  19. 31 3月, 2011 1 次提交
  20. 18 2月, 2011 2 次提交
    • Y
      serial: change the divisor latch only when prescalar actually changed · 0d0389e5
      Yin Kangkai 提交于
      In 8250.c original ns16550 autoconfig code, we change the divisor latch when
      we goto to high speed mode, we're assuming the previous speed is legacy. This
      some times is not true.
      
      For example in a system with both CONFIG_SERIAL_8250 and
      CONFIG_SERIAL_8250_PNP set, in this case, the code (autoconfig) will be called
      twice, one in serial8250_init/probe() and the other is from
      serial_pnp_probe. When serial_pnp_probe calls the autoconfig for NS16550A,
      it's already in high speed mode, change the divisor latch (quot << 3) in this
      case will make the UART console garbled.
      
      CC: Greg Kroah-Hartman <greg@kroah.com>
      CC: David Woodhouse <dwmw2@infradead.org>
      CC: linux-kernel@vger.kernel.org
      CC: stable@kernel.org
      Signed-off-by: NYin Kangkai <kangkai.yin@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0d0389e5
    • Y
      serial: also set the uartclk value in resume after goes to highspeed · 95926d2d
      Yin Kangkai 提交于
      For any reason if the NS16550A was not work in high speed mode (e.g. we hold
      NS16550A from going to high speed mode in autoconfig_16550a()), now we are
      resume from suspend, we should also set the uartclk to the correct
      value. Otherwise it is still the old 1843200 and that will bring issues.
      
      CC: Greg Kroah-Hartman <greg@kroah.com>
      CC: David Woodhouse <dwmw2@infradead.org>
      CC: linux-kernel@vger.kernel.org
      CC: stable@kernel.org
      Signed-off-by: NYin Kangkai <kangkai.yin@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      95926d2d
  21. 23 1月, 2011 1 次提交
  22. 14 1月, 2011 1 次提交
    • G
      tty: move drivers/serial/ to drivers/tty/serial/ · ab4382d2
      Greg Kroah-Hartman 提交于
      The serial drivers are really just tty drivers, so move them to
      drivers/tty/ to make things a bit neater overall.
      
      This is part of the tty/serial driver movement proceedure as proposed by
      Arnd Bergmann and approved by everyone involved a number of months ago.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Rogier Wolff <R.E.Wolff@bitwizard.nl>
      Cc: Michael H. Warfield <mhw@wittsend.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ab4382d2
  23. 11 12月, 2010 1 次提交
    • 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