aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.18/0045-dwc_otg-Fix-various-issues-with-root-port-and-transa.patch
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-02-11 10:17:55 +0000
committerJohn Crispin <blogic@openwrt.org>2015-02-11 10:17:55 +0000
commitc291f76d24a4190551a42b7b77a2cfeb3f4d36f9 (patch)
tree8f9211217d7e2cbaa78d10b596d81e646b3b9aad /target/linux/brcm2708/patches-3.18/0045-dwc_otg-Fix-various-issues-with-root-port-and-transa.patch
parent0e26998162921c65cbfe2814e500c81ca7b50dad (diff)
downloadmaster-187ad058-c291f76d24a4190551a42b7b77a2cfeb3f4d36f9.tar.gz
master-187ad058-c291f76d24a4190551a42b7b77a2cfeb3f4d36f9.tar.bz2
master-187ad058-c291f76d24a4190551a42b7b77a2cfeb3f4d36f9.zip
brcm2708: update to v3.18
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44392 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm2708/patches-3.18/0045-dwc_otg-Fix-various-issues-with-root-port-and-transa.patch')
-rwxr-xr-xtarget/linux/brcm2708/patches-3.18/0045-dwc_otg-Fix-various-issues-with-root-port-and-transa.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.18/0045-dwc_otg-Fix-various-issues-with-root-port-and-transa.patch b/target/linux/brcm2708/patches-3.18/0045-dwc_otg-Fix-various-issues-with-root-port-and-transa.patch
new file mode 100755
index 0000000000..ae8e3adf9d
--- /dev/null
+++ b/target/linux/brcm2708/patches-3.18/0045-dwc_otg-Fix-various-issues-with-root-port-and-transa.patch
@@ -0,0 +1,75 @@
+From 8eb79690a70cce34e9a1c35cf165716f78301d2e Mon Sep 17 00:00:00 2001
+From: P33M <P33M@github.com>
+Date: Fri, 20 Jun 2014 16:03:12 +0100
+Subject: [PATCH 045/114] dwc_otg: Fix various issues with root port and
+ transaction errors
+
+Process the host port interrupts correctly (and don't trample them).
+Root port hotplug now functional again.
+
+Fix a few thinkos with the transaction error passthrough for fiq_fsm.
+---
+ drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c | 7 +++----
+ drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c | 6 +++++-
+ drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 2 +-
+ 3 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c
+index 065807f..96c76e3 100644
+--- a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c
++++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c
+@@ -1348,10 +1348,9 @@ static inline uint32_t dwc_otg_read_common_intr(dwc_otg_core_if_t * core_if, gin
+ local_fiq_disable();
+ /* Pull in the interrupts that the FIQ has masked */
+ gintmsk.d32 |= ~(hcd->fiq_state->gintmsk_saved.d32);
++ gintmsk.d32 |= gintmsk_common.d32;
+ /* for the upstairs function to reenable - have to read it here in case FIQ triggers again */
+- reenable_gintmsk->d32 |= gintmsk.d32;
+- reenable_gintmsk->d32 |= ~(hcd->fiq_state->gintmsk_saved.d32);
+- reenable_gintmsk->d32 &= gintmsk_common.d32;
++ reenable_gintmsk->d32 = gintmsk.d32;
+ local_fiq_enable();
+ }
+
+@@ -1535,7 +1534,7 @@ int32_t dwc_otg_handle_common_intr(void *dev)
+ // fiq_print(FIQDBG_INT, otg_dev->hcd->fiq_state, "CILOUT %1d", retval);
+ // fiq_print(FIQDBG_INT, otg_dev->hcd->fiq_state, "%08x", gintsts.d32);
+ // fiq_print(FIQDBG_INT, otg_dev->hcd->fiq_state, "%08x", gintmsk_reenable.d32);
+- if (retval) {
++ if (retval && fiq_enable) {
+ DWC_WRITE_REG32(&core_if->core_global_regs->gintmsk, gintmsk_reenable.d32);
+ }
+
+diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c
+index 1be6e71..284f902 100644
+--- a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c
++++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c
+@@ -696,7 +696,11 @@ static int notrace noinline fiq_fsm_do_hcintr(struct fiq_state *state, int num_c
+ fiq_print(FIQDBG_ERR, state, "ERRST %02d", n);
+ if (hcint_probe.b.nak || hcint_probe.b.ack || hcint_probe.b.datatglerr) {
+ fiq_print(FIQDBG_ERR, state, "RESET %02d", n);
+- st->nr_errors = 0;
++ /* In some random cases we can get a NAK interrupt coincident with a Xacterr
++ * interrupt, after the device has disappeared.
++ */
++ if (!hcint.b.xacterr)
++ st->nr_errors = 0;
+ hcintmsk.b.nak = 0;
+ hcintmsk.b.ack = 0;
+ hcintmsk.b.datatglerr = 0;
+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 4195ff2..a5566bc 100644
+--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
+@@ -2619,7 +2619,7 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num)
+ case FIQ_PASSTHROUGH_ERRORSTATE:
+ /* Hook into the error count */
+ fiq_print(FIQDBG_ERR, dwc_otg_hcd->fiq_state, "HCDERR%02d", num);
+- if (dwc_otg_hcd->fiq_state->channel[num].nr_errors) {
++ if (!dwc_otg_hcd->fiq_state->channel[num].nr_errors) {
+ qtd->error_count = 0;
+ fiq_print(FIQDBG_ERR, dwc_otg_hcd->fiq_state, "RESET ");
+ }
+--
+1.8.3.2
+