brcm2708: update 3.10 patches with raspberrypi/rpi-3.10.y of 27 Apr. 2014
[openwrt/svn-archive/archive.git] / target / linux / brcm2708 / patches-3.10 / 0084-dwc_otg-make-channel-halts-with-unknown-state-less-d.patch
1 From 6ecef9d4e6add518889432cc642a50e47ee3536b Mon Sep 17 00:00:00 2001
2 From: P33M <P33M@github.com>
3 Date: Tue, 23 Jul 2013 14:15:32 +0100
4 Subject: [PATCH 084/196] dwc_otg: make channel halts with unknown state less
5 damaging
6
7 If the IRQ received a channel halt interrupt through the FIQ
8 with no other bits set, the IRQ would not release the host
9 channel and never complete the URB.
10
11 Add catchall handling to treat as a transaction error and retry.
12 ---
13 drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 12 ++++++++++++
14 1 file changed, 12 insertions(+)
15
16 diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
17 index dbff763..488defb 100644
18 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
19 +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
20 @@ -2578,12 +2578,24 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd,
21 DWC_READ_REG32(&hcd->
22 core_if->core_global_regs->
23 gintsts));
24 + /* Failthrough: use 3-strikes rule */
25 + qtd->error_count++;
26 + dwc_otg_hcd_save_data_toggle(hc, hc_regs, qtd);
27 + update_urb_state_xfer_intr(hc, hc_regs,
28 + qtd->urb, qtd, DWC_OTG_HC_XFER_XACT_ERR);
29 + halt_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_XACT_ERR);
30 }
31
32 }
33 } else {
34 DWC_PRINTF("NYET/NAK/ACK/other in non-error case, 0x%08x\n",
35 hcint.d32);
36 + /* Failthrough: use 3-strikes rule */
37 + qtd->error_count++;
38 + dwc_otg_hcd_save_data_toggle(hc, hc_regs, qtd);
39 + update_urb_state_xfer_intr(hc, hc_regs,
40 + qtd->urb, qtd, DWC_OTG_HC_XFER_XACT_ERR);
41 + halt_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_XACT_ERR);
42 }
43 }
44
45 --
46 1.9.1
47