1. 23 4月, 2018 4 次提交
  2. 22 4月, 2018 3 次提交
    • M
      serial: mvebu-uart: Fix local flags handling on termios update · 46c6975a
      Marc Zyngier 提交于
      Commit 68a0db1d reworked the baud rate selection, but also added
      a (not so) subtle change in the way the local flags (c_lflag in the
      termios structure) are handled, forcing the new flags to always be the
      same as the old ones.
      
      The reason for that particular change is both obscure and undocumented.
      It also completely breaks userspace. Something as trivial as getty is
      unusable:
      
      <example>
      	Debian GNU/Linux 9 sy-borg ttyMV0
      
      	sy-borg login: root
      	root
      	[timeout]
      
      	Debian GNU/Linux 9 sy-borg ttyMV0
      </example>
      
      which is quite obvious in retrospect: getty cannot get in control of
      the echo mode, is stuck in canonical mode, and times out without ever
      seeing anything valid. It also begs the question of how this change was
      ever tested.
      
      The fix is pretty obvious: stop messing with c_lflag, and the world
      will be a happier place.
      
      Cc: stable@vger.kernel.org # 4.15+
      Fixes: 68a0db1d ("serial: mvebu-uart: add function to change baudrate")
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      46c6975a
    • T
      tty: n_gsm: Fix DLCI handling for ADM mode if debug & 2 is not set · b2d89ad9
      Tony Lindgren 提交于
      At least on droid 4 with control channel in ADM mode, there is no response
      to Modem Status Command (MSC). Currently gsmtty_modem_update() expects to
      have data in dlci->modem_rx unless debug & 2 is set. This means that on
      droid 4, things only work if debug & 2 is set.
      
      Let's fix the issue by ignoring empty dlci->modem_rx for ADM mode. In
      the AMD mode, CMD_MSC will never respond and gsm_process_modem() won't
      get called to set dlci->modem_rx.
      
      And according to ts_127010v140000p.pdf, MSC is only relevant if basic
      option is chosen, so let's test for that too.
      
      Fixes: ea3d8465 ("tty: n_gsm: Allow ADM response in addition to UA for control dlci")
      Cc: linux-serial@vger.kernel.org
      Cc: Alan Cox <alan@llwyncelyn.cymru>
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: Jiri Prchal <jiri.prchal@aksignal.cz>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Marcel Partap <mpartap@gmx.net>
      Cc: Merlijn Wajer <merlijn@wizzup.org>
      Cc: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
      Cc: Michael Scott <michael.scott@linaro.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Russ Gorby <russ.gorby@intel.com>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Sebastian Reichel <sre@kernel.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2d89ad9
    • T
      tty: n_gsm: Fix long delays with control frame timeouts in ADM mode · e9ec2254
      Tony Lindgren 提交于
      Commit ea3d8465 ("tty: n_gsm: Allow ADM response in addition to UA for
      control dlci") added support for DLCI to stay in Asynchronous Disconnected
      Mode (ADM). But we still get long delays waiting for commands to other
      DLCI to complete:
      
      --> 5) C: SABM(P)
      Q>  0) C: UIH(F)
      Q>  0) C: UIH(F)
      Q>  0) C: UIH(F)
      ...
      
      This happens because gsm_control_send() sets cretries timer to T2 that is
      by default set to 34. This will cause resend for T2 times for the control
      frame. In ADM mode, we will never get a response so the control frame, so
      retries are just delaying all the commands.
      
      Let's fix the issue by setting DLCI_MODE_ADM flag after detecting the ADM
      mode for the control DLCI. Then we can use that in gsm_control_send() to
      set retries to 1. This means the control frame will be sent once allowing
      the other end at an opportunity to switch from ADM to ABM mode.
      
      Note that retries will be decremented in gsm_control_retransmit() so
      we don't want to set it to 0 here.
      
      Fixes: ea3d8465 ("tty: n_gsm: Allow ADM response in addition to UA for control dlci")
      Cc: linux-serial@vger.kernel.org
      Cc: Alan Cox <alan@llwyncelyn.cymru>
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: Jiri Prchal <jiri.prchal@aksignal.cz>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Marcel Partap <mpartap@gmx.net>
      Cc: Merlijn Wajer <merlijn@wizzup.org>
      Cc: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
      Cc: Michael Scott <michael.scott@linaro.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Russ Gorby <russ.gorby@intel.com>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Sebastian Reichel <sre@kernel.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e9ec2254
  3. 03 4月, 2018 2 次提交
  4. 26 3月, 2018 7 次提交
  5. 23 3月, 2018 3 次提交
  6. 20 3月, 2018 1 次提交
  7. 19 3月, 2018 1 次提交
  8. 16 3月, 2018 2 次提交
  9. 15 3月, 2018 2 次提交
  10. 14 3月, 2018 3 次提交
  11. 10 3月, 2018 12 次提交