1. 29 7月, 2015 3 次提交
  2. 10 7月, 2015 1 次提交
    • E
      cdc_ncm: Add support for moving NDP to end of NCM frame · 4a0e3e98
      Enrico Mioso 提交于
      NCM specs are not actually mandating a specific position in the frame for
      the NDP (Network Datagram Pointer). However, some Huawei devices will
      ignore our aggregates if it is not placed after the datagrams it points
      to. Add support for doing just this, in a per-device configurable way.
      While at it, update NCM subdrivers, disabling this functionality in all of
      them, except in huawei_cdc_ncm where it is enabled instead.
      We aren't making any distinction between different Huawei NCM devices,
      based on what the vendor driver does. Standard NCM devices are left
      unaffected: if they are compliant, they should be always usable, still
      stay on the safe side.
      
      This change has been tested and working with a Huawei E3131 device (which
      works regardless of NDP position), a Huawei E3531 (also working both
      ways) and an E3372 (which mandates NDP to be after indexed datagrams).
      
      V1->V2:
      - corrected wrong NDP acronym definition
      - fixed possible NULL pointer dereference
      - patch cleanup
      V2->V3:
      - Properly account for the NDP size when writing new packets to SKB
      Signed-off-by: NEnrico Mioso <mrkiko.rs@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a0e3e98
  3. 31 5月, 2015 1 次提交
  4. 28 5月, 2015 1 次提交
    • A
      usb: phy: add static inline wrapper for devm_usb_get_phy_by_node · 307c858b
      Arnd Bergmann 提交于
      The newly introduced devm_usb_get_phy_by_node function only has
      an extern declaration, but no alternative for the case that
      CONFIG_USB_PHY is disabled, which leads to a build error when
      it is used anyway:
      
      drivers/power/twl4030_charger.c: In function 'twl4030_bci_probe':
      drivers/power/twl4030_charger.c:648:23: error: implicit declaration of function 'devm_usb_get_phy_by_node' [-Werror=implicit-function-declaration]
          bci->transceiver = devm_usb_get_phy_by_node(
      
      This adds the wrapper in the same way that we have one for
      all other usb-phy API functions.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: e842b84c ("usb: phy: Add interface to get phy give of device_node.")
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      307c858b
  5. 26 5月, 2015 4 次提交
  6. 14 5月, 2015 1 次提交
    • H
      usb: add bus type for USB ULPI · 289fcff4
      Heikki Krogerus 提交于
      UTMI+ Low Pin Interface (ULPI) is a commonly used PHY
      interface for USB 2.0. The ULPI specification describes a
      standard set of registers which the vendors can extend for
      their specific needs. ULPI PHYs provide often functions
      such as charger detection and ADP sensing and probing.
      
      There are two major issues that the bus type is meant to
      tackle:
      
      Firstly, ULPI registers are accessed from the controller.
      The bus provides convenient method for the controller
      drivers to share that access with the actual PHY drivers.
      
      Secondly, there are already platforms that assume ULPI PHYs
      are runtime detected, such as many Intel Baytrail based
      platforms. They do not provide any kind of hardware
      description for the ULPI PHYs like separate ACPI device
      object that could be used to enumerate a device from.
      Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Acked-by: NDavid Cohen <david.a.cohen@linux.intel.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      289fcff4
  7. 29 4月, 2015 2 次提交
  8. 30 3月, 2015 2 次提交
  9. 26 3月, 2015 1 次提交
  10. 20 3月, 2015 2 次提交
  11. 19 3月, 2015 1 次提交
  12. 18 3月, 2015 2 次提交
  13. 14 3月, 2015 1 次提交
  14. 13 3月, 2015 1 次提交
    • Y
      usb: renesas_usbhs: add support for USB-DMAC · ab330cf3
      Yoshihiro Shimoda 提交于
      Some Renesas SoCs have the USB-DMAC. It is able to terminate transfers
      when a short packet is received, even if less bytes than the transfer
      counter size have been received. Also, it is able to send a short
      packet even if the packet size is not multiples of 8bytes.
      
      Since the previous code has used the interruption of USBHS controller
      when receiving packets even if this driver has used a dmac, a lot of
      interruptions has happened. This patch will reduce such interruptions.
      
      This patch allows to use the USB-DMAC on R-Car H2 and M2.
      Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      ab330cf3
  15. 11 3月, 2015 2 次提交
    • M
      usb: gadget: Fix typo fond in Documentation/Docbook/gadget.xml · 06ed0de5
      Masanari Iida 提交于
      This patch fix some spelling typo found in gadget.xml.
      It is because this file is generated from comments in sources,
      I had to fix comments in the source, instead of xml file itself.
      Signed-off-by: NMasanari Iida <standby24x7@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      06ed0de5
    • A
      usb: gadget: composite: add req_match method to usb_function · f563d230
      Andrzej Pietrasiewicz 提交于
      Non-standard requests can encode the actual interface number in a
      non-standard way. For example composite_setup() assumes
      that it is w_index && 0xFF, but the printer function encodes the interface
      number in a context-dependet way (either w_index or w_index >> 8).
      This can lead to such requests being directed to wrong functions.
      
      This patch adds req_match() method to usb_function. Its purpose is to
      verify that a given request can be handled by a given function.
      If any function within a configuration provides the method and it returns
      true, then it is assumed that the right function is found.
      
      If a function uses req_match(), it should try as hard as possible to
      determine if the request is meant for it.
      
      If no functions in a configuration provide req_match or none of them
      returns true, then fall back to the usual approach.
      Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f563d230
  16. 01 3月, 2015 1 次提交
  17. 27 2月, 2015 1 次提交
  18. 01 2月, 2015 1 次提交
  19. 30 1月, 2015 1 次提交
  20. 25 1月, 2015 1 次提交
  21. 13 1月, 2015 2 次提交
  22. 10 1月, 2015 2 次提交
    • W
      USB: ehci-platform: Support ehci reset after resume quirk · 314b41b1
      Wu Liang feng 提交于
      The Rockchip rk3288 EHCI controller doesn't properly detect
      the case when a device is removed during suspend. Specifically,
      when usb resume from suspend, the EHCI controller maintaining
      the USB state (FLAG_CF is 1, Current Connect Status is 1),
      but a USB device (like a USB camera on rk3288) may have been
      disconnected actually.
      
      Let's add a quirk to force ehci to go into the
      usb_root_hub_lost_power() path and reset after resume.
      This should generally reset the whole controller and all
      ports and initialize everything cleanly again, and bring
      the devices back up.
      
      As part of this, rename the "hibernation" paramter of
      ehci_resume() to force_reset since hibernation is simply
      another case where we can't trust the autodetected status
      and need to force a reset of devices.
      Signed-off-by: NWu Liang feng <wulf@rock-chips.com>
      Reviewed-by: NJulius Werner <jwerner@google.com>
      Reviewed-by: NDoug Anderson <dianders@google.com>
      Reviewed-by: NTomasz Figa <tfiga@google.com>
      Reviewed-by: NPawel Osciak <posciak@google.com>
      Reviewed-by: NSonny Rao <sonnyrao@google.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NDoug Anderson <dianders@google.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      314b41b1
    • S
      usb: core: buffer: smallest buffer should start at ARCH_DMA_MINALIGN · 5efd2ea8
      Sebastian Andrzej Siewior 提交于
      the following error pops up during "testusb -a -t 10"
      | musb-hdrc musb-hdrc.1.auto: dma_pool_free buffer-128,	f134e000/be842000 (bad dma)
      hcd_buffer_create() creates a few buffers, the smallest has 32 bytes of
      size. ARCH_KMALLOC_MINALIGN is set to 64 bytes. This combo results in
      hcd_buffer_alloc() returning memory which is 32 bytes aligned and it
      might by identified by buffer_offset() as another buffer. This means the
      buffer which is on a 32 byte boundary will not get freed, instead it
      tries to free another buffer with the error message.
      
      This patch fixes the issue by creating the smallest DMA buffer with the
      size of ARCH_KMALLOC_MINALIGN (or 32 in case ARCH_KMALLOC_MINALIGN is
      smaller). This might be 32, 64 or even 128 bytes. The next three pools
      will have the size 128, 512 and 2048.
      In case the smallest pool is 128 bytes then we have only three pools
      instead of four (and zero the first entry in the array).
      The last pool size is always 2048 bytes which is the assumed PAGE_SIZE /
      2 of 4096. I doubt it makes sense to continue using PAGE_SIZE / 2 where
      we would end up with 8KiB buffer in case we have 16KiB pages.
      Instead I think it makes sense to have a common size(s) and extend them
      if there is need to.
      There is a BUILD_BUG_ON() now in case someone has a minalign of more than
      128 bytes.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5efd2ea8
  23. 04 12月, 2014 1 次提交
  24. 27 11月, 2014 1 次提交
  25. 21 11月, 2014 1 次提交
    • K
      usb: phy: introduce usb_phy_set_event interface · df9f7b31
      Kiran Raparthy 提交于
      PHY drivers require a generic interface to handle per-PHY events.
      
      usb_phy_set_event interface sets event to phy event.
      PHY drivers call this interface for each phy event.
      
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-usb@vger.kernel.org
      Cc: Android Kernel Team <kernel-team@android.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Arve Hj�nnev�g <arve@android.com>
      Cc: Benoit Goby <benoit@android.com>
      [Original patch in Android from Todd]
      Cc: Todd Poynor <toddpoynor@google.com>
      Signed-off-by: NKiran Raparthy <kiran.kumar@linaro.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      df9f7b31
  26. 12 11月, 2014 1 次提交
  27. 08 11月, 2014 2 次提交