1. 26 4月, 2011 2 次提交
  2. 20 4月, 2011 6 次提交
  3. 18 2月, 2011 3 次提交
  4. 04 2月, 2011 1 次提交
    • Y
      serial-core: reset the console speed on resume · 5933a161
      Yin Kangkai 提交于
      On some platforms, we need to restore the console speed on resume even
      it was not suspended (no_console_suspend), and on others we don't have
      to do that.
      
      So don't care about the "console_suspend_enabled" and unconditionally
      reset the console speed if it is a console.
      
      This is actually a redo of ba15ab0e (Set proper console speed on resume
      if console suspend is disabled) from Deepak Saxena.  I also tried to
      investigate more to find out if this change will break others, here is
      what I've found out:
      
      commit 891b9dd1
      Author: Jason Wang <jason77.wang@gmail.com>
          serial-core: restore termios settings when resume console ports
      
      commit ca2e71aa
      Author: Jason Wang <jason77.wang@gmail.com>
          serial-core: skip call set_termios/console_start when no_console_suspend
      
      commit 4547be78
      Author: Stanislav Brabec <sbrabec@suse.cz>
          serial-core: resume serial hardware with no_console_suspend
      
      commit ba15ab0e
      Author: Deepak Saxena <dsaxena@laptop.org>
          Set proper console speed on resume if console suspend is disabled
      
      from ba15ab0e, we learned that, even if the console suspend is disabled
      (when no_console_suspend is set), we may still need to "reset the port
      to the state it was in before we suspended."
      
      Then with 4547be78, this piece of code is removed.
      
      And then Jason Wang added that back in ca2e71aa and 891b9dd1, to fix
      some breakage on OMAP3EVM platform. From ca2e71aa we learned that the
      "set_termios" things is actually needed by both console is suspended
      and not suspended.
      
      That's why I removed the console_suspended_enabled condition, and only
      call console_start() when we actually suspeneded it.
      
      I also noticed in this thread:
      http://marc.info/?t=129079257100004&r=1&w=2, which talked about on
      some platforms, UART HW will be cut power whether or not we set
      no_console_suspend, and then on resume it does not work quite well. I
      have a similar HW, and this patch fixed this issue, don't know if this
      patch also works on their platforms.
      
      [Update: Stanislav tested this patch on Zaurus and reported it improves the
      situation. Thanks.]
      
      CC: Greg KH <greg@kroah.com>
      CC: Deepak Saxena <dsaxena@laptop.org>
      CC: Jason Wang <jason77.wang@gmail.com>
      CC: Stanislav Brabec <sbrabec@suse.cz>
      CC: Daniel Drake <dsd@laptop.org>
      Signed-off-by: NYin Kangkai <kangkai.yin@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5933a161
  5. 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
  6. 17 12月, 2010 1 次提交
  7. 11 12月, 2010 1 次提交
    • 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
  8. 18 11月, 2010 1 次提交
  9. 23 10月, 2010 3 次提交
    • A
      tty: Make tiocgicount a handler · d281da7f
      Alan Cox 提交于
      Dan Rosenberg noted that various drivers return the struct with uncleared
      fields. Instead of spending forever trying to stomp all the drivers that
      get it wrong (and every new driver) do the job in one place.
      
      This first patch adds the needed operations and hooks them up, including
      the needed USB midlayer and serial core plumbing.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d281da7f
    • J
      serial-core: restore termios settings when resume console ports · 891b9dd1
      Jason Wang 提交于
      The commit 4547be78 rewrites suspend and resume functions. According
      to this rewrite, when a serial port is a printk console device and
      can suspend(without set no_console_suspend flag), it will definitely
      call set_termios function during its resume, but parameter termios
      isn't initialized, this will pass an unpredictable config to the
      serial port. If this serial port is not a userspace opened tty device
      , a suspend and resume action will make this serial port unusable.
      I.E. ttyS0 is a printk console device, ttyS1 or keyboard+display is
      userspace tty device, a suspend/resume action will make ttyS0
      unusable.
      
      If a serial port is both a printk console device and an opened tty
      device, this issue can be overcome because it will call set_termios
      again with the correct parameter in the uart_change_speed function.
      
      Refer to the deleted content of commit 4547be78, revert parts relate
      to restore settings into parameter termios. It is safe because if
      a serial port is a printk console only device, the only meaningful
      field in termios is c_cflag and its old config is saved in
      uport->cons->cflag, if this port is also an opened tty device,
      it will clear uport->cons->cflag in the uart_open and the old config
      is saved in tty->termios.
      Signed-off-by: NJason Wang <jason77.wang@gmail.com>
      Acked-by: NStanislav Brabec <sbrabec@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      891b9dd1
    • J
      serial-core: skip call set_termios/console_start when no_console_suspend · ca2e71aa
      Jason Wang 提交于
      The commit 4547be78 rewrites suspend and resume functions, this
      introduces a problem on the OMAP3EVM platoform. when the kernel boots
      with no_console_suspend and we suspend the kernel, then resume it,
      the serial console will be not usable. This problem should be common
      for all platforms.
      The cause for this problem is that when enter suspend, if we choose
      no_console_suspend, the console_stop will be skiped. But in resume
      function, the console port will be set to uninitialized state by
      calling set_termios function and the console_start is called without
      checking whether the no_console_suspend is set, Now fix it.
      Signed-off-by: NJason Wang <jason77.wang@gmail.com>
      Acked-by: NStanislav Brabec <sbrabec@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ca2e71aa
  10. 11 8月, 2010 9 次提交
  11. 21 1月, 2010 2 次提交
    • A
      serial: Fix crash if the minimum rate of the device is > 9600 baud · 16ae2a87
      Alan Cox 提交于
      In that situation if the old rate is invalid and the new rate is invalid
      and the chip cannot do 9600 baud we report zero, which makes all the
      drivers explode.
      
      Instead force the rate based on min/max
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      16ae2a87
    • S
      serial-core: resume serial hardware with no_console_suspend · 4547be78
      Stanislav Brabec 提交于
      Perform a tricky suspend/resume even with no_console_suspend.
      
      With no_console_suspend, kernel skips serial port suspend/resume and the
      serial hardware may remain in undefined state after resume. It actually
      happens on devices that don't have BIOS that handle serial
      initialization. It makes impossible to use serial console after resume.
      
      Devices affected by this problem include:
      Sharp Zaurus devices
      Several PXA based ARM embedded boards
      
      The patch does:
      - Save the hardware state
      - Perform buffer flush in time of its suspend call
      - Tell the driver that port is suspended
      - But still accept new data
      - And keep console hardware in state that allows to send them
      
      It allows to capture late console messages without breaking console
      after resume.
      
      This is just a resend of a patch discussed in these threads, as the
      patch was not yet applied.
      
      "Possible suspend/resume regression in .32-rc?" (Nov 1-5, 2009, ARM
      list, later LKML)
      
      "serial-core: resume serial hardware with no_console_suspend" (Sep
      15-Oct 18, 2009, LKML & ARM lists)
      Signed-off-by: NStanislav Brabec <sbrabec@suse.cz>
      Tested-by: NHaojian Zhuang <haojian.zhuang@gmail.com>
      Tested-by: NDaniel Mack <daniel@caiaq.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4547be78
  12. 12 12月, 2009 2 次提交
  13. 13 10月, 2009 1 次提交
  14. 24 9月, 2009 1 次提交
    • R
      serial core: fix new kernel-doc warnings · 1b9894f3
      Randy Dunlap 提交于
      Fix new kernel-doc warnings in serial_core.[hc] files.
      
        Warning(include/linux/serial_core.h:485): No description found for parameter 'uport'
        Warning(include/linux/serial_core.h:485): Excess function parameter 'port' description in 'uart_handle_dcd_change'
        Warning(include/linux/serial_core.h:511): No description found for parameter 'uport'
        Warning(include/linux/serial_core.h:511): Excess function parameter 'port' description in 'uart_handle_cts_change'
        Warning(drivers/serial/serial_core.c:2437): No description found for parameter 'uport'
        Warning(drivers/serial/serial_core.c:2437): Excess function parameter 'port' description in 'uart_add_one_port'
        Warning(drivers/serial/serial_core.c:2509): No description found for parameter 'uport'
        Warning(drivers/serial/serial_core.c:2509): Excess function parameter 'port' description in 'uart_remove_one_port'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1b9894f3
  15. 20 9月, 2009 6 次提交