1. 13 6月, 2017 1 次提交
    • F
      usb: gadget: core: introduce ->udc_set_speed() method · 67fdfda4
      Felipe Balbi 提交于
      Sometimes, the gadget driver we want to run has max_speed lower than
      what the UDC supports. In such situations, UDC might want to make sure
      we don't try to connect on speeds not supported by the gadget
      driver (e.g. super-speed capable dwc3 with high-speed capable g_midi)
      because that will just fail.
      
      In order to make sure this situation never happens, we introduce a new
      optional ->udc_set_speed() method which can be implemented by
      interested UDC drivers.
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      67fdfda4
  2. 02 6月, 2017 1 次提交
  3. 12 4月, 2017 1 次提交
  4. 18 11月, 2016 1 次提交
  5. 31 8月, 2016 1 次提交
    • Y
      usb: gadget: add a new quirk to avoid skb_reserve in u_ether.c · 60e7396f
      Yoshihiro Shimoda 提交于
      Some platforms (e.g. USB-DMAC on R-Car SoCs) has memory alignment
      restriction. If memory alignment is not match, the usb peripheral
      driver decides not to use the DMA controller. Then, the performance
      is not good.
      
      In the case of u_ether.c, since it calls skb_reserve() in rx_submit(),
      it is possible to cause memory alignment mismatch.
      
      So, this patch adds a new quirk "quirk_avoids_skb_reserve" to avoid
      skb_reserve() calling in u_ether.c to improve performance.
      
      A peripheral driver will set this flag and network gadget drivers
      (e.g. f_ncm.c) will reference the flag via gadget_avoids_skb_reserve().
      Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      60e7396f
  6. 25 8月, 2016 1 次提交
  7. 21 6月, 2016 2 次提交
  8. 31 5月, 2016 1 次提交
  9. 19 4月, 2016 1 次提交
  10. 04 3月, 2016 4 次提交
  11. 23 12月, 2015 1 次提交
    • D
      usb: gadget: forbid queuing request to a disabled ep · 8a0859b6
      Du, Changbin 提交于
      Queue a request to disabled ep  doesn't make sense, and induce caller
      make mistakes.
      
      Here is a example for the android mtp gadget function driver. A mem
      corruption can happen on below senario.
      1) On disconnect, mtp driver disable its EPs,
      2) During send_file_work and receive_file_work, mtp queues a request
         to ep. (The mtp driver need improve its synchronization logic!)
      3) mtp_function_unbind is invoked and all mtp requests are freed.
      4) when udc process the request queued on step 2, will cause kernel
         NULL pointer dereference exception.
      Signed-off-by: NDu, Changbin <changbin.du@intel.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      8a0859b6
  12. 17 12月, 2015 3 次提交
  13. 27 9月, 2015 2 次提交
  14. 06 8月, 2015 3 次提交
  15. 05 8月, 2015 3 次提交
    • R
      usb: gadget: add endpoint capabilities helper macros · 80e6e384
      Robert Baldyga 提交于
      Add macros useful while initializing array of endpoint capabilities
      structures. These macros makes structure initialization more compact
      to decrease number of code lines and increase readability of code.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      80e6e384
    • R
      usb: gadget: add endpoint capabilities flags · 734b5a2a
      Robert Baldyga 提交于
      Introduce struct usb_ep_caps which contains information about capabilities
      of usb endpoints - supported transfer types and directions. This structure
      should be filled by UDC driver for each of its endpoints, and will be
      used in epautoconf in new ep matching mechanism which will replace ugly
      guessing of endpoint capabilities basing on its name.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      734b5a2a
    • R
      usb: gadget: encapsulate endpoint claiming mechanism · cc476b42
      Robert Baldyga 提交于
      So far it was necessary for usb functions to set ep->driver_data in
      endpoint obtained from autoconfig to non-null value, to indicate that
      endpoint is claimed by function (in autoconfig it was checked if endpoint
      has set this field to non-null value, and if it has, it was assumed that
      it is claimed). It could cause bugs because if some function doesn't
      set this field autoconfig could return the same endpoint more than one
      time.
      
      To help to avoid such bugs this patch adds claimed flag to struct usb_ep,
      and  encapsulates endpoint claiming mechanism inside usb_ep_autoconfig_ss()
      and usb_ep_autoconfig_reset(), so now usb functions don't need to perform
      any additional actions to mark endpoint obtained from autoconfig as claimed.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      cc476b42
  16. 31 7月, 2015 3 次提交
  17. 29 7月, 2015 3 次提交
  18. 20 3月, 2015 2 次提交
  19. 11 3月, 2015 1 次提交
  20. 30 1月, 2015 1 次提交
  21. 04 11月, 2014 2 次提交
  22. 25 9月, 2014 1 次提交
  23. 12 9月, 2014 1 次提交