diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-21 13:16:41 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-21 13:16:41 -0400 |
| commit | cf24242189b935826a88feedb64761cbf483e42c (patch) | |
| tree | 5de0f1d93fbffc029399e688aa3748b0bb5409fb /drivers/usb/chipidea/udc.c | |
| parent | c884d8ac7ffccc094e9674a3eb3be90d3b296c0a (diff) | |
| parent | d28bdaff5e260852621d45edd3af017cc5d16925 (diff) | |
Merge tag 'usb-5.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here are four small USB fixes for 5.2-rc6.
They include two xhci bugfixes, a chipidea fix, and a small dwc2 fix.
Nothing major, just nice things to get resolved for reported issues.
All have been in linux-next with no reported issues"
* tag 'usb-5.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
xhci: detect USB 3.2 capable host controllers correctly
usb: xhci: Don't try to recover an endpoint if port is in error state.
usb: dwc2: Use generic PHY width in params setup
usb: chipidea: udc: workaround for endpoint conflict issue
Diffstat (limited to 'drivers/usb/chipidea/udc.c')
| -rw-r--r-- | drivers/usb/chipidea/udc.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 829e947cabf5..6a5ee8e6da10 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
| @@ -1622,6 +1622,25 @@ static int ci_udc_pullup(struct usb_gadget *_gadget, int is_on) | |||
| 1622 | static int ci_udc_start(struct usb_gadget *gadget, | 1622 | static int ci_udc_start(struct usb_gadget *gadget, |
| 1623 | struct usb_gadget_driver *driver); | 1623 | struct usb_gadget_driver *driver); |
| 1624 | static int ci_udc_stop(struct usb_gadget *gadget); | 1624 | static int ci_udc_stop(struct usb_gadget *gadget); |
| 1625 | |||
| 1626 | /* Match ISOC IN from the highest endpoint */ | ||
| 1627 | static struct usb_ep *ci_udc_match_ep(struct usb_gadget *gadget, | ||
| 1628 | struct usb_endpoint_descriptor *desc, | ||
| 1629 | struct usb_ss_ep_comp_descriptor *comp_desc) | ||
| 1630 | { | ||
| 1631 | struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); | ||
| 1632 | struct usb_ep *ep; | ||
| 1633 | |||
| 1634 | if (usb_endpoint_xfer_isoc(desc) && usb_endpoint_dir_in(desc)) { | ||
| 1635 | list_for_each_entry_reverse(ep, &ci->gadget.ep_list, ep_list) { | ||
| 1636 | if (ep->caps.dir_in && !ep->claimed) | ||
| 1637 | return ep; | ||
| 1638 | } | ||
| 1639 | } | ||
| 1640 | |||
| 1641 | return NULL; | ||
| 1642 | } | ||
| 1643 | |||
| 1625 | /** | 1644 | /** |
| 1626 | * Device operations part of the API to the USB controller hardware, | 1645 | * Device operations part of the API to the USB controller hardware, |
| 1627 | * which don't involve endpoints (or i/o) | 1646 | * which don't involve endpoints (or i/o) |
| @@ -1635,6 +1654,7 @@ static const struct usb_gadget_ops usb_gadget_ops = { | |||
| 1635 | .vbus_draw = ci_udc_vbus_draw, | 1654 | .vbus_draw = ci_udc_vbus_draw, |
| 1636 | .udc_start = ci_udc_start, | 1655 | .udc_start = ci_udc_start, |
| 1637 | .udc_stop = ci_udc_stop, | 1656 | .udc_stop = ci_udc_stop, |
| 1657 | .match_ep = ci_udc_match_ep, | ||
| 1638 | }; | 1658 | }; |
| 1639 | 1659 | ||
| 1640 | static int init_eps(struct ci_hdrc *ci) | 1660 | static int init_eps(struct ci_hdrc *ci) |
