From: Nick Hudson <skrll@xxxxxxxxxx> I'm seeing problems with a d-link dwcl-g122 wifi dongle that someone sent me. There are reports of other wifi dongles with the same/similar problem. The devices appear to be NAKing to the point of confusing the dwc2 driver completely. The attached patch helps with my d-link dwl-g122 - it's adapted from the Raspberry Pi dwc_otg driver, which is a modified version of the Synopsys vendor driver. The error recovery is still valid after the patch, I think. < Dom Cobley has given a blanket signed-off-by for all changes the Raspberry Pi folks make to the Synopsys vendor driver - pz > Signed-off-by: Dom Cobley <popcornmix@xxxxxxxxx> Signed-off-by: Nick Hudson <skrll@xxxxxxxxxx> Signed-off-by: Paul Zimmerman <paulz@xxxxxxxxxxxx> --- Greg, can you take this for usb-next please? Thanks. -Paul drivers/usb/dwc2/hcd_intr.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/dwc2/hcd_intr.c b/drivers/usb/dwc2/hcd_intr.c index 47b9eb5..f06249c 100644 --- a/drivers/usb/dwc2/hcd_intr.c +++ b/drivers/usb/dwc2/hcd_intr.c @@ -1890,12 +1890,20 @@ static void dwc2_hc_chhltd_intr_dma(struct dwc2_hsotg *hsotg, "hcint 0x%08x, intsts 0x%08x\n", chan->hcint, readl(hsotg->regs + GINTSTS)); + goto error; } } } else { dev_info(hsotg->dev, "NYET/NAK/ACK/other in non-error case, 0x%08x\n", chan->hcint); +error: + /* Failthrough: use 3-strikes rule */ + qtd->error_count++; + dwc2_update_urb_state_abn(hsotg, chan, chnum, qtd->urb, + qtd, DWC2_HC_XFER_XACT_ERR); + dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd); + dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_XACT_ERR); } } -- 2.1.0.24.g4109c28 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html