openwrtv4/target/linux/brcm2708/patches-3.10/0084-dwc_otg-make-channel-halts-with-unknown-state-less-d.patch
Florian Fainelli 6918ea2484 brcm2708: update 3.10 patches with raspberrypi/rpi-3.10.y of 27 Apr. 2014
Update the 3.10 rasperry patches by rebasing raspberry/rpi-3.10-y
against linux-stable/v3.10.49.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 42678
2014-09-27 19:10:51 +00:00

47 lines
1.6 KiB
Diff

From 6ecef9d4e6add518889432cc642a50e47ee3536b Mon Sep 17 00:00:00 2001
From: P33M <P33M@github.com>
Date: Tue, 23 Jul 2013 14:15:32 +0100
Subject: [PATCH 084/196] dwc_otg: make channel halts with unknown state less
damaging
If the IRQ received a channel halt interrupt through the FIQ
with no other bits set, the IRQ would not release the host
channel and never complete the URB.
Add catchall handling to treat as a transaction error and retry.
---
drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
index dbff763..488defb 100644
--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
@@ -2578,12 +2578,24 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd,
DWC_READ_REG32(&hcd->
core_if->core_global_regs->
gintsts));
+ /* Failthrough: use 3-strikes rule */
+ qtd->error_count++;
+ dwc_otg_hcd_save_data_toggle(hc, hc_regs, qtd);
+ update_urb_state_xfer_intr(hc, hc_regs,
+ qtd->urb, qtd, DWC_OTG_HC_XFER_XACT_ERR);
+ halt_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_XACT_ERR);
}
}
} else {
DWC_PRINTF("NYET/NAK/ACK/other in non-error case, 0x%08x\n",
hcint.d32);
+ /* Failthrough: use 3-strikes rule */
+ qtd->error_count++;
+ dwc_otg_hcd_save_data_toggle(hc, hc_regs, qtd);
+ update_urb_state_xfer_intr(hc, hc_regs,
+ qtd->urb, qtd, DWC_OTG_HC_XFER_XACT_ERR);
+ halt_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_XACT_ERR);
}
}
--
1.9.1