Commit 81a58955 authored by Paul Zimmerman's avatar Paul Zimmerman Committed by Greg Kroah-Hartman

staging: dwc2: fix thinko in dwc2_hc_set_even_odd_frame()

I screwed up the sense of this if() statement while porting our
vendor driver to create the dwc2 driver. This caused frame overrun
errors on periodic transfers when there were other transfers
active in the same (micro)frame.

With this fix, the dwc2 driver now works on the Raspberry Pi
platform even with the USB Ethernet controller enabled, where
before that would cause all USB devices to stop working.

Thanks to Ray Jui and Jerry Lin at Broadcom for tracking this down.
Reported-by: default avatarRay Jui <rjui@broadcom.com>
Signed-off-by: default avatarPaul Zimmerman <paulz@synopsys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9d2ea4de
...@@ -1148,7 +1148,7 @@ static void dwc2_hc_set_even_odd_frame(struct dwc2_hsotg *hsotg, ...@@ -1148,7 +1148,7 @@ static void dwc2_hc_set_even_odd_frame(struct dwc2_hsotg *hsotg,
if (chan->ep_type == USB_ENDPOINT_XFER_INT || if (chan->ep_type == USB_ENDPOINT_XFER_INT ||
chan->ep_type == USB_ENDPOINT_XFER_ISOC) { chan->ep_type == USB_ENDPOINT_XFER_ISOC) {
/* 1 if _next_ frame is odd, 0 if it's even */ /* 1 if _next_ frame is odd, 0 if it's even */
if (dwc2_hcd_get_frame_number(hsotg) & 0x1) if (!(dwc2_hcd_get_frame_number(hsotg) & 0x1))
*hcchar |= HCCHAR_ODDFRM; *hcchar |= HCCHAR_ODDFRM;
} }
} }
......
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