1. 01 7月, 2022 4 次提交
  2. 10 6月, 2022 1 次提交
  3. 20 5月, 2022 1 次提交
  4. 06 5月, 2022 3 次提交
  5. 26 4月, 2022 1 次提交
  6. 22 4月, 2022 3 次提交
    • D
      tty: n_gsm: fix software flow control handling · f4f7d632
      Daniel Starke 提交于
      n_gsm is based on the 3GPP 07.010 and its newer version is the 3GPP 27.010.
      See https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516
      The changes from 07.010 to 27.010 are non-functional. Therefore, I refer to
      the newer 27.010 here. Chapter 5.4.8.1 states that XON/XOFF characters
      shall be used instead of Fcon/Fcoff command in advanced option mode to
      handle flow control. Chapter 5.4.8.2 describes how XON/XOFF characters
      shall be handled. Basic option mode only used Fcon/Fcoff commands and no
      XON/XOFF characters. These are treated as data bytes here.
      The current implementation uses the gsm_mux field 'constipated' to handle
      flow control from the remote peer and the gsm_dlci field 'constipated' to
      handle flow control from each DLCI. The later is unrelated to this patch.
      The gsm_mux field is correctly set for Fcon/Fcoff commands in
      gsm_control_message(). However, the same is not true for XON/XOFF
      characters in gsm1_receive().
      Disable software flow control handling in the tty to allow explicit
      handling by n_gsm.
      Add the missing handling in advanced option mode for gsm_mux in
      gsm1_receive() to comply with the standard.
      
      This patch depends on the following commit:
      Commit 8838b2af ("tty: n_gsm: fix SW flow control encoding/handling")
      
      Fixes: e1eaea46 ("tty: n_gsm line discipline")
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Starke <daniel.starke@siemens.com>
      Link: https://lore.kernel.org/r/20220422071025.5490-3-daniel.starke@siemens.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f4f7d632
    • D
      tty: n_gsm: fix invalid use of MSC in advanced option · c19ffe00
      Daniel Starke 提交于
      n_gsm is based on the 3GPP 07.010 and its newer version is the 3GPP 27.010.
      See https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516
      The changes from 07.010 to 27.010 are non-functional. Therefore, I refer to
      the newer 27.010 here. Chapter 5.4.6.3.7 states that the Modem Status
      Command (MSC) shall only be used if the basic option was chosen.
      The current implementation uses MSC frames even if advanced option was
      chosen to inform the peer about modem line state updates. A standard
      conform peer may choose to discard these frames in advanced option mode.
      Furthermore, gsmtty_modem_update() is not part of the 'tty_operations'
      functions despite its name.
      Rename gsmtty_modem_update() to gsm_modem_update() to clarify this. Split
      its function into gsm_modem_upd_via_data() and gsm_modem_upd_via_msc()
      depending on the encoding and adaption. Introduce gsm_dlci_modem_output()
      as adaption of gsm_dlci_data_output() to encode and queue empty frames in
      advanced option mode. Use it in gsm_modem_upd_via_data().
      gsm_modem_upd_via_msc() is based on the initial gsmtty_modem_update()
      function which used only MSC frames to update modem states.
      
      Fixes: e1eaea46 ("tty: n_gsm line discipline")
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Starke <daniel.starke@siemens.com>
      Link: https://lore.kernel.org/r/20220422071025.5490-2-daniel.starke@siemens.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c19ffe00
    • D
      tty: n_gsm: fix broken virtual tty handling · a8c5b825
      Daniel Starke 提交于
      Dynamic virtual tty registration was introduced to allow the user to handle
      these cases with uevent rules. The following commits relate to this:
      Commit 5b87686e ("tty: n_gsm: Modify gsmtty driver register method when config requester")
      Commit 0b91b533 ("tty: n_gsm: Save dlci address open status when config requester")
      Commit 46292622 ("tty: n_gsm: clean up indenting in gsm_queue()")
      
      However, the following behavior can be seen with this implementation:
      - n_gsm ldisc is activated via ioctl
      - all configuration parameters are set to their default value (initiator=0)
      - the mux gets activated and attached and gsmtty0 is being registered in
        in gsm_dlci_open() after DLCI 0 was established (DLCI 0 is the control
        channel)
      - the user configures n_gsm via ioctl GSMIOC_SETCONF as initiator
      - this re-attaches the n_gsm mux
      - no new gsmtty devices are registered in gsmld_attach_gsm() because the
        mux is already active
      - the initiator side registered only the control channel as gsmtty0
        (which should never happen) and no user channel tty
      
      The commits above make it impossible to operate the initiator side as no
      user channel tty is or will be available.
      On the other hand, this behavior will make it also impossible to allow DLCI
      parameter negotiation on responder side in the future. The responder side
      first needs to provide a device for the application before the application
      can set its parameters of the associated DLCI via ioctl.
      Note that the user application is still able to detect a link establishment
      without relaying to uevent by waiting for DTR open on responder side. This
      is the same behavior as on a physical serial interface. And on initiator
      side a tty hangup can be detected if a link establishment request failed.
      
      Revert the commits above completely to always register all user channels
      and no control channel after mux attachment. No other changes are made.
      
      Fixes: 5b87686e ("tty: n_gsm: Modify gsmtty driver register method when config requester")
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Starke <daniel.starke@siemens.com>
      Link: https://lore.kernel.org/r/20220422071025.5490-1-daniel.starke@siemens.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a8c5b825
  7. 20 4月, 2022 3 次提交
  8. 15 4月, 2022 16 次提交
  9. 22 2月, 2022 7 次提交
  10. 26 1月, 2022 1 次提交