1. 17 3月, 2013 1 次提交
  2. 24 1月, 2013 1 次提交
    • B
      net: cdc_mbim: send ZLP only for the specific buggy device · 844e88f0
      Bjørn Mork 提交于
      Reverting 328d7b8a and instead adding an exception for the
      Sierra Wireless MC7710.
      
      commit 328d7b8a (net: cdc_mbim: send ZLP after max sized NTBs)
      added a workaround for an issue observed on one specific device.
      Concerns were raised that this workaround adds a performance
      penalty to all devices based on questionable, if not buggy,
      behaviour of a single device:
      
       "If you add ZLP for NTBs of dwNtbOutMaxSize, you are heavily affecting CPU
        load, increasing interrupt load by factor of 2 in high load traffic
        scenario and possibly decreasing throughput for all other devices
        which behaves correctly."
      
       "The idea of NCM was to avoid extra ZLPs. If your transfer is exactly
        dwNtbOutMaxSize, it's known, you can submit such request on the receiver
        side and you do not need any EOT indicatation, so the frametime can be
        used for useful data."
      
      Adding a device specific exception to prevent the workaround from
      affecting well behaved devices.
      
      The assumption here is that needing a ZLP is truly an *exception*.
      We do not yet have enough data to verify this.  The generic
      workaround in commit 328d7b8a should be considered acceptable despite
      the performance penalty if the exception list becomes a maintainance
      hassle.
      
      Cc: Alexey ORISHKO <alexey.orishko@stericsson.com>
      Cc: Yauheni Kaliuta <y.kaliuta@gmail.com>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      844e88f0
  3. 22 1月, 2013 1 次提交
    • B
      net: cdc_mbim: send ZLP after max sized NTBs · 328d7b8a
      Bjørn Mork 提交于
      We normally avoid sending ZLPs by padding NTBs with a zero byte
      if the NTB is shorter than dwNtbOutMaxSize, resulting in a short
      USB packet instead of a ZLP.  But in the case where the NTB length
      is exactly dwNtbOutMaxSize and this is an exact multiplum of
      wMaxPacketSize, then we must send a ZLP.
      
      This fixes an issue seen on a Sierra Wireless MC7710 device
      where the transmission would fail whenever we ended up padding
      the NTBs to max size.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      328d7b8a
  4. 23 10月, 2012 3 次提交
    • B
      net: cdc_mbim: Device Service Stream support · 9f651cac
      Bjørn Mork 提交于
      MBIM devices can support up to 256 generic streams called
      Device Service Streams (DSS). The MBIM spec says
      
         The format of the Device Service Stream payload depends
         on the device service (as identified by the corresponding
         UUID) that is used when opening the data stream.
      
      Example use cases are serial AT command interfaces and NMEA
      data streams. We cannot make any assumptions about these
      device services.
      
      Adding support for Device Service Stream by extending
      the MBIM session to VLAN mapping scheme, allocating
      VLAN IDs 256 to 511 for DSS, using the DSS SessionID
      as the lower 8bit of the VLAN ID.
      
      Using a netdev for DSS keeps the device framing intact and
      allows userspace to do whatever it want with the streams.
      For example, exporting an AT command interface using DSS
      session #0 to a PTY for use with a terminal application like
      minicom:
      
        vconfig add wwan0 256
        ip link set dev wwan0 up
        ip link set dev wwan0.256 up
        socat INTERFACE:wwan0.256,type=2 PTY:,echo=0,link=/tmp/modem
      
      Device configuration must be done using MBIM control commands
      over the /dev/cdc-wdmx device. The userspace management
      application should coordinate host VLAN configuration and the
      device MBIM configuration using the device capabilities to
      find out if it needs to set up PTY mappings etc.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9f651cac
    • B
      net: cdc_ncm: map MBIM IPS SessionID to VLAN ID · a82c7ce5
      Bjørn Mork 提交于
      MBIM devices can support up to 256 independent IP Streams.
      The main network device will only handle SessionID 0. Mapping
      SessionIDs 1 to 255 to VLANs using the SessionID as VLAN ID
      allow userspace to use these streams with traditional tools
      like vconfig.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a82c7ce5
    • G
      net: cdc_mbim: adding MBIM driver · 9bf211a3
      Greg Suarez 提交于
      The CDC Mobile Broadband Interface Model (MBIM) specification
      extends CDC NCM by
       - removing the redundant ethernet header from the point-to-point
         USB channel
       - adding support for multiple IP (v4 and/or v6) sessions multiplexed
         on the same USB channel
       - adding a MBIM control channel encapsulated in CDC
       - adding Device Service Streams (DSS), which are non IP generic data
         streams multiplexed on the same USB channel as the IP sessions
      
      MBIM devices are managed using the dedicated control channel, and no
      data will flow on the data channel until a control session has been
      established.  This driver has no knowledge of MBIM control messages.
      It just exports the control channel to a /dev/cdc-wdmX character
      device for userspace management applications. Such an application is
      therefore required to use this driver.
      
      This patch implements basic MBIM support, reusing the NCM and WDM driver
      APIs, currently limited to IP sessions with SessionID 0. DSS and
      multiplexed IP sessions are not yet supported.
      Signed-off-by: NGreg Suarez <gsuarez@smithmicro.com>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9bf211a3