1. 29 10月, 2014 1 次提交
  2. 29 9月, 2014 2 次提交
  3. 25 9月, 2014 1 次提交
  4. 24 9月, 2014 6 次提交
  5. 12 9月, 2014 1 次提交
  6. 09 9月, 2014 1 次提交
  7. 22 8月, 2014 1 次提交
  8. 03 8月, 2014 1 次提交
  9. 02 8月, 2014 1 次提交
    • J
      usb-core bInterval quirk · cd83ce9e
      James P Michels III 提交于
      This patch adds a usb quirk to support devices with interupt endpoints
      and bInterval values expressed as microframes. The quirk causes the
      parse endpoint function to modify the reported bInterval to a standards
      conforming value.
      
      There is currently code in the endpoint parser that checks for
      bIntervals that are outside of the valid range (1-16 for USB 2+ high
      speed and super speed interupt endpoints). In this case, the code assumes
      the bInterval is being reported in 1ms frames. As well, the correction
      is only applied if the original bInterval value is out of the 1-16 range.
      
      With this quirk applied to the device, the bInterval will be
      accurately adjusted from microframes to an exponent.
      Signed-off-by: NJames P Michels III <james.p.michels@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cd83ce9e
  10. 30 7月, 2014 2 次提交
  11. 16 7月, 2014 1 次提交
  12. 10 7月, 2014 2 次提交
  13. 01 7月, 2014 1 次提交
  14. 29 5月, 2014 1 次提交
  15. 28 5月, 2014 1 次提交
  16. 21 5月, 2014 1 次提交
  17. 17 5月, 2014 6 次提交
    • B
      net: cdc_ncm: remove redundant "disconnected" flag · fa83dbee
      Bjørn Mork 提交于
      Calling netif_carrier_{on,off} is sufficient.  There is no need
      to duplicate the carrier state in a driver specific flag.
      Acked-by: NEnrico Mioso <mrkiko.rs@gmail.com>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fa83dbee
    • B
      net: cdc_ncm: use sane defaults for rx/tx buffers · 50f1cb1c
      Bjørn Mork 提交于
      Lots of devices request much larger buffers than reasonable. This
      cause real problems for users of hosts with limited resources.
      
      Reducing the default buffer size to 16kB for such devices is
      a reasonable trade-off between allowing them to aggregate traffic
      and avoiding memory exhaustion on resource restrained hosts.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      50f1cb1c
    • B
      net: cdc_ncm/cdc_mbim: adding NCM protocol statistics · beeecd42
      Bjørn Mork 提交于
      To have an idea of the effects of the protocol coalescing
      it's useful to have some counters showing the different
      aspects.
      
      Due to the asymmetrical usbnet interface the netdev
      rx_bytes counter has been counting real received payload,
      while the tx_bytes counter has included the NCM/MBIM
      framing overhead. This overhead can be many times the
      payload because of the aggressive padding strategy of
      this driver, and will vary a lot depending on device
      and traffic.
      
      With very few exceptions, users are only interested in
      the payload size.  Having an somewhat accurate payload
      byte counter is particularly important for mobile
      broadband devices, which many NCM devices and of course
      all MBIM devices are. Users and userspace applications
      will use this counter to monitor account quotas.
      
      Having protocol specific counters for the overhead, we are
      now able to correct the tx_bytes netdev counter so that
      it shows the real payload
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      beeecd42
    • B
      net: cdc_ncm: set reasonable padding limits · 43e4c6df
      Bjørn Mork 提交于
      We pad frames larger than X to maximum size for devices which
      don't need a ZLP after maximum sized frames. This allows the
      device to optimize its transfers for one fixed buffer size.
      
      X was arbitrarily set at 512 bytes regardless of real buffer
      maximum, causing extreme overheads due to excessive padding of
      larger tx buffers. Limit the padding to at most 3 full USB
      packets, still allowing the overhead to payload ratio of 3/1.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      43e4c6df
    • B
      net: cdc_ncm: use true max dgram count for header estimates · 70559b89
      Bjørn Mork 提交于
      Many newer NCM and MBIM devices will request a maximum tx
      datagram count which is much smaller than our hard-coded
      absolute max. We can reduce the overhead without sacrificing
      any of the simplicity for these devices, by simply using the
      true negotiated count in when calculated the maximum NTH and
      NDP header sizes.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      70559b89
    • B
      net: cdc_ncm: use ethtool to tune coalescing settings · 6c4e548f
      Bjørn Mork 提交于
      Datagram coalescing is an integral part of the NCM and MBIM
      protocols, intended to reduce the interrupt load primarily
      on the device end of the USB link.  As with all coalescing
      solutions, there is a trade-off between buffering and
      interrupts.
      
      The current defaults are based on the assumption that device
      side buffers should be the limiting factor.  However, many
      modern high speed LTE modems suffers from buffer-bloat,
      making this assumption fail. This results in sub-optimal
      performance due to excessive coalescing.  And in cases where
      such modems are connected to cheap embedded hosts there is
      often severe buffer allocation issues, giving very noticeable
      performance degradation .
      
      A start on improving this is going from build time hard
      coded limits to per device user configurable limits.  The
      ethtool coalescing API was selected as user interface
      because, although the tuned values are buffer sizes, these
      settings directly control datagram coalescing.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6c4e548f
  18. 14 5月, 2014 5 次提交
    • A
      usb: gadget: configfs: OS Extended Properties descriptors support · 7419485f
      Andrzej Pietrasiewicz 提交于
      Add handling of OS Extended Properties descriptors from configfs interface.
      One kind of "OS Descriptors" are "Extended Properties" descriptors, which
      need to be specified per interface or per group of interfaces described
      by an IAD. This patch adds support for creating subdirectories
      in interface.<n> directory located in the function's directory.
      Names of subdirectories created become names of properties.
      Each property contains two attributes: "type" and "data".
      The type can be a numeric value 1..7 while data is a blob interpreted
      depending on the type specified.
      The types are:
      1 - unicode string
      2 - unicode string with environment variables
      3 - binary
      4 - little-endian 32-bit
      5 - big-endian 32-bit
      6 - unicode string with a symbolic link
      7 - multiple unicode strings
      Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      7419485f
    • A
      usb: gadget: configfs: OS Extended Compatibility descriptors support · da424314
      Andrzej Pietrasiewicz 提交于
      Add handling of OS Extended Compatibility descriptors from configfs interface.
      Hosts which expect the "OS Descriptors" ask only for configurations @ index 0,
      but linux-based USB devices can provide more than one configuration.
      This patch adds marking one of gadget's configurations the configuration
      to be reported at index 0, regardless of the actual sequence of usb_add_config
      invocations used for adding the configurations. The configuration is selected
      by creating a symbolic link pointing to it from the "os_desc" directory
      located at the top of a gadget's directory hierarchy.
      
      One kind of "OS Descriptors" are "Extended Compatibility Descriptors",
      which need to be specified per interface. This patch adds interface.<n>
      directory in function's configfs directory to represent each interface
      defined by the function. Each interface's directory contains two attributes:
      "compatible_id" and "sub_compatible_id", which represent 8-byte
      strings to be reported to the host as the "Compatible ID" and "Sub Compatible
      ID".
      Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      da424314
    • A
      usb: gadget: OS Feature Descriptors support · 37a3a533
      Andrzej Pietrasiewicz 提交于
      There is a custom (non-USB IF) extension to the USB standard:
      
      http://msdn.microsoft.com/library/windows/hardware/gg463182
      
      They grant permission to use the specification - there is
      "Microsoft OS Descriptor Specification License Agreement"
      under the link mentioned above, and its Section 2 "Grant
      of License", letter (b) reads:
      
      "Patent license. Microsoft hereby grants to You a nonexclusive,
      royalty-free, nontransferable, worldwide license under Microsoft’s
      patents embodied solely within the Specification and that are owned
      or licensable by Microsoft to make, use, import, offer to sell,
      sell and distribute directly or indirectly to Your Licensees Your
      Implementation. You may sublicense this patent license to Your
      Licensees under the same terms and conditions."
      
      The said extension is maintained by Microsoft for Microsoft.
      
      Yet it is fairly common for various devices to use it, and a
      popular proprietary operating system expects devices to provide
      "OS descriptors", so Linux-based USB gadgets whishing to be able
      to talk to a variety of operating systems should be able to provide
      the "OS descriptors".
      
      This patch adds optional support for gadgets whishing to expose
      the so called "OS Feature Descriptors", that is "Extended Compatibility ID"
      and "Extended Properties".
      
      Hosts which do request "OS descriptors" from gadgets do so during
      the enumeration phase and before the configuration is set with
      SET_CONFIGURATION. What is more, those hosts never ask for configurations
      at indices other than 0. Therefore, gadgets whishing to provide
      "OS descriptors" must designate one configuration to be used with
      this kind of hosts - this is what os_desc_config is added for in
      struct usb_composite_dev. There is an additional advantage to it:
      if a gadget provides "OS descriptors" and designates one configuration
      to be used with such non-USB-compliant hosts it can invoke
      "usb_add_config" in any order because the designated configuration
      will be reported to be at index 0 anyway.
      
      This patch also adds handling vendor-specific requests addressed
      at device or interface and related to handling "OS descriptors".
      Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      37a3a533
    • A
      usb: gadget: OS String support · 19824d5e
      Andrzej Pietrasiewicz 提交于
      There is a custom (non-USB IF) extension to the USB standard:
      
      http://msdn.microsoft.com/library/windows/hardware/gg463182
      
      They grant permission to use the specification - there is
      "Microsoft OS Descriptor Specification License Agreement"
      under the link mentioned above, and its Section 2 "Grant
      of License", letter (b) reads:
      
      "Patent license. Microsoft hereby grants to You a nonexclusive,
      royalty-free, nontransferable, worldwide license under Microsoft’s
      patents embodied solely within the Specification and that are owned
      or licensable by Microsoft to make, use, import, offer to sell,
      sell and distribute directly or indirectly to Your Licensees Your
      Implementation. You may sublicense this patent license to Your
      Licensees under the same terms and conditions."
      
      The said extension is maintained by Microsoft for Microsoft.
      
      Yet it is fairly common for various devices to use it, and a
      popular proprietary operating system expects devices to provide
      "OS descriptors", so Linux-based USB gadgets whishing to be able
      to talk to a variety of operating systems should be able to provide
      the "OS descriptors".
      
      This patch adds optional support for gadgets whishing to expose
      the so called "OS String" under index 0xEE of language 0.
      The contents of the string is generated based on the qw_sign
      array and b_vendor_code.
      
      Interested gadgets need to set the cdev->use_os_string flag,
      fill cdev->qw_sign with appropriate values and fill cdev->b_vendor_code
      with a value of their choice.
      
      This patch does not however implement responding to any vendor-specific
      USB requests.
      Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      19824d5e
    • B
      net: cdc_ncm/cdc_mbim: rework probing of NCM/MBIM functions · 50a0ffaf
      Bjørn Mork 提交于
      The NCM class match in the cdc_mbim driver is confusing and
      cause unexpected behaviour. The USB core guarantees that a
      USB interface is in altsetting 0 when probing starts. This
      means that devices implementing a NCM 1.0 backwards
      compatible MBIM function (a "NCM/MBIM function") always hit
      the NCM entry in the cdc_mbim driver match table. Such
      functions will never match any of the MBIM entries.
      
      This causes unexpeced behaviour for cases where the NCM and
      MBIM entries are differet, which is currently the case for
      all except Ericsson devices.
      
      Improve the probing of NCM/MBIM functions by looking up the
      device again in the cdc_mbim match table after switching to
      the MBIM identity.
      
      The shared altsetting selection is updated to better
      accommodate the new probing logic, returning the preferred
      altsetting for the control interface instead of the data
      interface. The control interface altsetting update is moved
      to the cdc_mbim driver. It is never necessary to change the
      control interface altsetting for NCM.
      
      Cc: Greg Suarez <gsuarez@smithmicro.com>
      Reported by: Yu-an Shih <yshih@nvidia.com>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      50a0ffaf
  19. 01 5月, 2014 5 次提交