Skip to content

Commit 08210ab

Browse files
committed
Merge pull request #340 from P33M/rpi-3.6.y
dwc_otg: make channel halts with unknown state less damaging
2 parents b6a2703 + b805851 commit 08210ab

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,12 +2578,24 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd,
25782578
DWC_READ_REG32(&hcd->
25792579
core_if->core_global_regs->
25802580
gintsts));
2581+
/* Failthrough: use 3-strikes rule */
2582+
qtd->error_count++;
2583+
dwc_otg_hcd_save_data_toggle(hc, hc_regs, qtd);
2584+
update_urb_state_xfer_intr(hc, hc_regs,
2585+
qtd->urb, qtd, DWC_OTG_HC_XFER_XACT_ERR);
2586+
halt_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_XACT_ERR);
25812587
}
25822588

25832589
}
25842590
} else {
25852591
DWC_PRINTF("NYET/NAK/ACK/other in non-error case, 0x%08x\n",
25862592
hcint.d32);
2593+
/* Failthrough: use 3-strikes rule */
2594+
qtd->error_count++;
2595+
dwc_otg_hcd_save_data_toggle(hc, hc_regs, qtd);
2596+
update_urb_state_xfer_intr(hc, hc_regs,
2597+
qtd->urb, qtd, DWC_OTG_HC_XFER_XACT_ERR);
2598+
halt_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_XACT_ERR);
25872599
}
25882600
}
25892601

0 commit comments

Comments
 (0)