1. 18 12月, 2013 3 次提交
    • J
      usb: gadget: atmel_usba: Use devm_*() functions · 40a8fb2a
      Jingoo Han 提交于
      Use devm_*() functions to make cleanup paths simpler.
      Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      40a8fb2a
    • A
      usb: gadget: nokia: fix error recovery path for optional functions · 45ab4609
      Andrzej Pietrasiewicz 提交于
      In the nokia gadget some USB functions (obex 1 and 2, phonet) are optional.
      
      If at the start of nokia_bind_config e.g. fi_phonet is an error pointer,
      which can happen because we don't fail the bind process if
      usb_get_function_instance() fails for fi_phonet, then f_phonet is NULL, and
      
      phonet_stat = usb_add_function(c, f_phonet);
      
      is never called and phonet_stat remains 0.
      
      If, in these circumstances, we hit the err_conf label then !phonet_stat
      evaluates to true and we try usb_remove_function() with its second
      parameter being f_phonet which is NULL and it causes NULL pointer
      dereference.
      
      This patch changes the initial values of (obex1|obex2|phonet)_stat to a
      nonzero value so that if the err_conf label is hit while the respective
      functions have not been acquired the usb_remove_function() is not called
      for those functions.
      Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      45ab4609
    • 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
  2. 13 12月, 2013 23 次提交
  3. 10 12月, 2013 5 次提交
  4. 07 12月, 2013 6 次提交
  5. 27 11月, 2013 3 次提交