1. 25 Jun, 2016 1 commit
  2. 30 Apr, 2016 2 commits
  3. 06 Feb, 2016 5 commits
  4. 13 Dec, 2015 2 commits
  5. 06 May, 2015 1 commit
  6. 10 Apr, 2015 1 commit
  7. 26 Mar, 2015 3 commits
  8. 06 Mar, 2015 3 commits
  9. 02 Feb, 2015 1 commit
    • Peter Hurley's avatar
      serial: core: Rework hw-assisted flow control support · 391f93f2
      Peter Hurley authored
      hw-assisted flow control support was added to the serial core
      in v3.8 with commits,
      dba05832 ("SERIAL: core: add hardware assisted h/w flow control support")
      2cbacafd ("SERIAL: core: add hardware assisted s/w flow control support")
      9aba8d5b ("SERIAL: core: add throttle/unthrottle callbacks for hardware
                      assisted flow control")
      Since then, additional requirements for serial core support have arisen.
      1. Separate tx and rx flow control settings for UARTs which only support
         tx flow control (ie., autoCTS).
      2. Disable sw-assisted CTS flow control in autoCTS mode
      3. Support for RTS flow control by serial core and userspace in autoRTS mode
      Distinguish mode from capability; introduce UPSTAT_AUTORTS, UPSTAT_AUTOCTS
      and UPSTAT_AUTOXOFF which, when set by the uart driver, enable serial core
      support for hw-assisted rx, hw-assisted tx and hw-assisted in-band/IXOFF
      rx flow control, respectively. [Note: hw-assisted in-band/IXON tx flow
      control does not require serial core support/intervention and can be
      enabled by the uart driver when required.]
      These modes must be set/reset in the driver's set_termios() method, based
      on termios settings, and thus can be safely queried in any context in which
      one of the port lock, port mutex or termios rwsem are held. Set these modes
      in the 2 in-tree drivers, omap-serial and 8250_omap, which currently
      use UPF_HARD_FLOW/UPF_SOFT_FLOW support.
      Retain UPF_HARD_FLOW and UPF_SOFT_FLOW as capabilities; re-define
      UPF_HARD_FLOW as both UPF_AUTO_RTS and UPF_AUTO_CTS to allow for distinct
      and separate rx and tx flow control capabilities.
      Disable sw-assisted CTS flow control when UPSTAT_AUTOCTS is enabled.
      Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  10. 09 Jan, 2015 1 commit
    • Peter Hurley's avatar
      serial: omap_8250: Fix RTS handling · 4bf4ea9d
      Peter Hurley authored
      The OMAP3 UART ignores MCR[1] (ie., UART_MCR_RTS) when in autoRTS
      mode (UPF_HARD_FLOW + CRTSCTS). This makes it impossible for either
      the serial core or userspace to manually flow control the sender.
      Disable autoRTS mode when RTS is lowered and restore the previous
      mode when RTS is raised.
      Note that the OMAP3 UART provides no mechanism for switching from
      autoRTS mode without corrupting incoming data; to access the
      necessary register, the line control settings must be set to 8-e-2
      and thus any data received during that time will be interpreted with
      those settings. This corruption has been observed in practice.
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  11. 25 Nov, 2014 1 commit
  12. 06 Nov, 2014 2 commits
  13. 05 Nov, 2014 2 commits
    • Peter Hurley's avatar
      tty,serial: Unify UPF_* and ASYNC_* flag definitions · 904326ec
      Peter Hurley authored
      The userspace-defined ASYNC_* flags in include/uapi/linux/tty_flags.h
      are the authoritative bit definitions for the serial_struct flags,
      and thus for any derivative values or fields.
      Although the serial core provides the TIOCSSERIAL and TIOCGSERIAL
      ioctls to set and retrieve these flags from userspace, it defines these
      bits independently, as UPF_* macros.
      Define the UPF_* macros which are userspace-modifiable directly from
      the ASYNC_* symbolic constants. Add compile-time test to ensure the
      bits changeable by TIOCSSERIAL match the defined range in the uapi
      Add ASYNCB_MAGIC_MULTIPLIER to the uapi header since this bit is
      programmable by userspace.
      Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    • Peter Hurley's avatar
      serial: Fix upstat_t sparse warnings · d4260b51
      Peter Hurley authored
      Commit 299245a1,
      serial: core: Privatize modem status enable flags, introduced
      the upstat_t type and matching bit definitions. The purpose is to
      produce sparse warnings if the wrong bit definitions are used
      (by warning of implicit integer conversions).
      Fix implicit conversion to integer return type from uart_cts_enabled()
      and uart_dcd_enabled().
      Fixes the following sparse warnings:
      drivers/tty/serial/serial_core.c:63:30: warning: incorrect type in return expression (different base types)
      drivers/tty/serial/serial_core.c:63:30:    expected int
      drivers/tty/serial/serial_core.c:63:30:    got restricted upstat_t
      include/linux/serial_core.h:364:30: warning: incorrect type in return expression (different base types)
      include/linux/serial_core.h:364:30:    expected bool
      include/linux/serial_core.h:364:30:    got restricted upstat_t
      include/linux/serial_core.h:364:30: warning: incorrect type in return expression (different base types)
      include/linux/serial_core.h:364:30:    expected bool
      include/linux/serial_core.h:364:30:    got restricted upstat_t
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  14. 26 Sep, 2014 1 commit
  15. 23 Sep, 2014 2 commits
  16. 08 Sep, 2014 2 commits
  17. 17 Jul, 2014 1 commit
  18. 20 May, 2014 1 commit
  19. 24 Apr, 2014 1 commit
    • Rob Herring's avatar
      tty/serial: add generic serial earlycon · 9aac5887
      Rob Herring authored
      This introduces generic earlycon infrastructure for serial devices
      based on the 8250 earlycon. This allows for supporting earlycon option
      with other serial devices. The earlycon output is enabled at the time
      early_params are processed.
      Only architectures that have fixmap support or have functional ioremap
      when early_params are processed are supported. This is the same
      restriction that the 8250 driver had.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  20. 16 Oct, 2013 1 commit
    • Linus Walleij's avatar
      serial: core: delete .set_wake() callback · fa2b5ea0
      Linus Walleij authored
      This deletes the .set_wake() callback in the struct uart_ops.
      Apparently this has been unused since pre-git times. In the
      old-2.6-bkcvs it is deleted as part of a changeset removing
      the PM_SET_WAKEUP from pm_request_t which is since also deleted
      from the kernel.
      The apropriate way to set wakeups in the kernel is to have a
      code snippet like this in .suspend() or .runtime_suspend()
      static int foo_suspend(struct device *dev)
      	if (device_may_wakeup(dev)) {
      		/* Enable wakeups, set internal states */
      This specific callback is not coming back.
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Dmitry Artamonow <mad_soft@inbox.ru>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  21. 20 May, 2013 1 commit
  22. 13 Feb, 2013 1 commit
    • George Spelvin's avatar
      pps: Move timestamp read into PPS code proper · 593fb1ae
      George Spelvin authored
      The PPS (Pulse-Per-Second) line discipline has developed a number of
      unhealthy attachments to core tty data and functions, ultimately leading
      to its breakage.
      The previous patches fixed the crashing.  This one reduces coupling further
      by eliminating the timestamp parameter from the dcd_change ldisc method.
      This reduces header file linkage and makes the extension more generic,
      and the timestamp read is delayed only slightly, from just before the
      ldisc->ops->dcd_change method call to just after.
      Fix attendant build breakage in
      Cc: William Hubbs <w.d.hubbs@gmail.com>
      Cc: Chris Brannon <chris@the-brannons.com>
      Cc: Kirk Reiser <kirk@braille.uwo.ca>
      Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
      Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: default avatarGeorge Spelvin <linux@horizon.com>
      Acked-by: default avatarRodolfo Giometti <giometti@enneenne.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  23. 29 Jan, 2013 1 commit
  24. 15 Jan, 2013 3 commits