Commit 057f22b7 authored by Felipe Balbi's avatar Felipe Balbi Committed by Ben Hutchings

usb: dwc3: gadget: set PCM1 field of isochronous-first TRBs

commit 6b9018d4 upstream.

In case of High-Speed, High-Bandwidth endpoints, we
need to tell DWC3 that we have more than one packet
per interval. We do that by setting PCM1 field of
Isochronous-First TRB.
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent ba5c7ca3
......@@ -863,6 +863,8 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
{
struct dwc3 *dwc = dep->dwc;
struct dwc3_trb *trb;
struct usb_gadget *gadget = &dwc->gadget;
enum usb_device_speed speed = gadget->speed;
dev_vdbg(dwc->dev, "%s: req %p dma %08llx length %d%s%s\n",
dep->name, req, (unsigned long long) dma,
......@@ -895,10 +897,16 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
break;
case USB_ENDPOINT_XFER_ISOC:
if (!node)
if (!node) {
trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS_FIRST;
else
if (speed == USB_SPEED_HIGH) {
struct usb_ep *ep = &dep->endpoint;
trb->size |= DWC3_TRB_SIZE_PCM1(ep->mult - 1);
}
} else {
trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS;
}
break;
case USB_ENDPOINT_XFER_BULK:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment