1. 17 8月, 2012 1 次提交
    • X
      n_gsm.c: Implement 3GPP27.010 DLC start-up procedure in MUX · 7e8ac7b2
      xiaojin 提交于
      In 3GPP27.010 5.8.1, it defined:
      The TE multiplexer initiates the establishment of the multiplexer control channel by sending a SABM frame on DLCI 0 using the procedures of clause 5.4.1.
      Once the multiplexer channel is established other DLCs may be established using the procedures of clause 5.4.1.
      This patch implement 5.8.1 in MUX level, it make sure DLC0 is the first channel to be setup.
      
      [or for those not familiar with the specification: it was possible to try
       and open a data connection while the control channel was not yet fully
       open, which is a spec violation and confuses some modems]
      Signed-off-by: Nxiaojin <jin.xiao@intel.com>
      Tested-by: NYin, Fengwei <fengwei.yin@intel.com>
      [tweaked the order we check things and error code]
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Cc: The Horsebox <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7e8ac7b2
  2. 11 8月, 2012 1 次提交
  3. 17 7月, 2012 1 次提交
  4. 09 3月, 2012 1 次提交
  5. 09 11月, 2011 1 次提交
    • A
      n_gsm: Fix timings · a8d12007
      Alan Cox 提交于
      Alek Du reported that the code erroneously applies time to jiffies
      conversions twice to the t1 and t2 values. In normal use on a modem link
      this cases no visible problem but on a slower link it will break as with
      HZ=1000 as is typical we are running t1/t2 ten times too fast.
      
      Alek's original patch removed the conversion from the timer setting but we
      in fact have to be more careful as the contents of t1/t2 are visible via
      the device API and we thus need to correct the constants.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a8d12007
  6. 27 9月, 2011 3 次提交
  7. 27 8月, 2011 2 次提交
  8. 09 7月, 2011 1 次提交
  9. 02 7月, 2011 3 次提交
    • R
      tty: n_gsm: Added refcount usage to gsm_mux and gsm_dlci structs · 6ab8fba7
      Russ Gorby 提交于
      The gsm_mux is created/destroyed when ldisc is
      opened/closed but clients of the MUX channel devices (gsmttyN)
      may access this structure as long as the TTYs are open.
      For the open, the ldisc open is guaranteed to preceed the TTY open,
      but the close has no such guaranteed ordering. As a result,
      the gsm_mux can be freed in the ldisc close before being accessed
      by one of the TTY clients. This can happen if the ldisc is removed
      while there are open, active MUX channels.
      A similar situation exists for DLCI-0, it is basically a resource
      shared by MUX and DLCI  , and should not be freed while they can
      be accessed
      
      To avoid this, gsm_mux and dlcis now have a reference counter
      ldisc open takes a reference on the mux and all the dlcis
      gsmtty_open takes a reference on the mux, dlci0 and its specific
      dlci. Dropping the last reference initiates the actual free.
      Signed-off-by: NRuss Gorby <russ.gorby@intel.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6ab8fba7
    • R
      tty: n_gsm: Add raw-ip support · bcd5abe2
      Russ Gorby 提交于
      This patch adds the ability to open a network data connection over a mux
      virtual tty channel. This is for modems that support data connections
      with raw IP frames instead of PPP. On high speed data connections this
      eliminates a significant amount of PPP overhead. To use this interface,
      the application must first tell the modem to open a network connection on
      a virtual tty. Once that has been accomplished, the app will issue an
      IOCTL on that virtual tty to create the network interface. The IOCTL will
      return the index of the interface created.
      
      The two IOCTL commands are:
      
          ioctl( fd, GSMIOC_ENABLE_NET );
      
          ioctl( fd, GSMIOC_DISABLE_NET );
      Signed-off-by: NRuss Gorby <russ.gorby@intel.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bcd5abe2
    • R
      tty: n_gsm: expose gsmtty device nodes at ldisc open time · d50f6dca
      Russ Gorby 提交于
      The n_gsm driver being an ldisc, does not provide a convenient method
      e.g. udev to create the tty device nodes automatically when the ldisc
      is opened.
      
      The TTY device nodes are now created via calls to tty_register_device
      from the ldisc open.
      Signed-off-by: NRuss Gorby <russ.gorby@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d50f6dca
  10. 17 6月, 2011 2 次提交
  11. 04 6月, 2011 1 次提交
    • L
      Revert "tty: make receive_buf() return the amout of bytes received" · 55db4c64
      Linus Torvalds 提交于
      This reverts commit b1c43f82.
      
      It was broken in so many ways, and results in random odd pty issues.
      
      It re-introduced the buggy schedule_work() in flush_to_ldisc() that can
      cause endless work-loops (see commit a5660b41: "tty: fix endless
      work loop when the buffer fills up").
      
      It also used an "unsigned int" return value fo the ->receive_buf()
      function, but then made multiple functions return a negative error code,
      and didn't actually check for the error in the caller.
      
      And it didn't actually work at all.  BenH bisected down odd tty behavior
      to it:
        "It looks like the patch is causing some major malfunctions of the X
         server for me, possibly related to PTYs.  For example, cat'ing a
         large file in a gnome terminal hangs the kernel for -minutes- in a
         loop of what looks like flush_to_ldisc/workqueue code, (some ftrace
         data in the quoted bits further down).
      
         ...
      
         Some more data: It -looks- like what happens is that the
         flush_to_ldisc work queue entry constantly re-queues itself (because
         the PTY is full ?) and the workqueue thread will basically loop
         forver calling it without ever scheduling, thus starving the consumer
         process that could have emptied the PTY."
      
      which is pretty much exactly the problem we fixed in a5660b41.
      
      Milton Miller pointed out the 'unsigned int' issue.
      Reported-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Reported-by: NMilton Miller <miltonm@bga.com>
      Cc: Stefan Bigler <stefan.bigler@keymile.com>
      Cc: Toby Gray <toby.gray@realvnc.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      55db4c64
  12. 10 5月, 2011 1 次提交
  13. 30 4月, 2011 1 次提交
  14. 23 4月, 2011 1 次提交
  15. 20 4月, 2011 1 次提交
  16. 31 3月, 2011 1 次提交
  17. 10 3月, 2011 1 次提交
  18. 18 2月, 2011 3 次提交
  19. 04 2月, 2011 1 次提交
  20. 17 12月, 2010 2 次提交
  21. 12 11月, 2010 4 次提交
  22. 05 11月, 2010 1 次提交
  23. 11 8月, 2010 2 次提交
  24. 05 6月, 2010 1 次提交
  25. 22 5月, 2010 1 次提交
    • A
      tty: n_gsm line discipline · e1eaea46
      Alan Cox 提交于
      Add an implementation of GSM 0710 MUX. The implementation currently supports
      
      - Basic and advanced framing (as either end of the link)
      - UI or UIH data frames
      - Adaption layer 1-4 (1 and 2 via tty, 3 and 4 as skbuff lists)
      - Modem and control messages including the correct retry process
      - Flow control
      
      and exposes the MUX channels as a set of virtual tty devices including modem
      signals. This is an experimental driver.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e1eaea46