1. 21 6月, 2016 2 次提交
  2. 31 5月, 2016 1 次提交
  3. 19 4月, 2016 1 次提交
  4. 04 3月, 2016 4 次提交
  5. 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
  6. 17 12月, 2015 3 次提交
  7. 27 9月, 2015 2 次提交
  8. 06 8月, 2015 3 次提交
  9. 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
  10. 31 7月, 2015 3 次提交
  11. 29 7月, 2015 3 次提交
  12. 20 3月, 2015 2 次提交
  13. 11 3月, 2015 1 次提交
  14. 30 1月, 2015 1 次提交
  15. 04 11月, 2014 2 次提交
  16. 25 9月, 2014 1 次提交
  17. 12 9月, 2014 1 次提交
  18. 09 9月, 2014 1 次提交
  19. 22 8月, 2014 1 次提交
  20. 18 12月, 2013 1 次提交
    • R
      usb: gadget: add "maxpacket_limit" field to struct usb_ep · e117e742
      Robert Baldyga 提交于
      This patch adds "maxpacket_limit" to struct usb_ep. This field contains
      maximum value of maxpacket supported by driver, and is set in driver probe.
      This value should be used by autoconfig() function, because value of field
      "maxpacket" is set to value from endpoint descriptor when endpoint becomes
      enabled. So when autoconfig() function will be called again for this endpoint,
      "maxpacket" value will contain wMaxPacketSize from descriptior instead of
      maximum packet size for this endpoint.
      
      For this reason this patch adds new field "maxpacket_limit" which contains
      value of maximum packet size (which defines maximum endpoint capabilities).
      This value is used in ep_matches() function used by autoconfig().
      
      Value of "maxpacket_limit" should be set in UDC driver probe function, using
      usb_ep_set_maxpacket_limit() function, defined in gadget.h. This function
      set choosen value to both "maxpacket_limit" and "maxpacket" fields.
      
      This patch modifies UDC drivers by adding support for maxpacket_limit.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e117e742
  21. 10 12月, 2013 2 次提交
  22. 29 7月, 2013 1 次提交