Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/dwc2/dist Recover from channel halt errors ...
details: https://anonhg.NetBSD.org/src/rev/a841f1c4e6f7
branches: trunk
changeset: 330985:a841f1c4e6f7
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Jul 26 09:18:53 2014 +0000
description:
Recover from channel halt errors by using the 3 strikes xacterr rule.
Adapted from the RaspberryPI linux driver.
This allows the rum(4) I was sent to be somewhat usable. Need to
investigate further what is causing the problem in the first place.
Might help PR/49019 (RPI: interrupt storm when url0 is up)
diffstat:
sys/external/bsd/dwc2/dist/dwc2_hcdintr.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (39 lines):
diff -r e96391ccc4b0 -r a841f1c4e6f7 sys/external/bsd/dwc2/dist/dwc2_hcdintr.c
--- a/sys/external/bsd/dwc2/dist/dwc2_hcdintr.c Sat Jul 26 08:05:15 2014 +0000
+++ b/sys/external/bsd/dwc2/dist/dwc2_hcdintr.c Sat Jul 26 09:18:53 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2_hcdintr.c,v 1.8 2014/04/03 06:34:58 skrll Exp $ */
+/* $NetBSD: dwc2_hcdintr.c,v 1.9 2014/07/26 09:18:53 skrll Exp $ */
/*
* hcd_intr.c - DesignWare HS OTG Controller host-mode interrupt handling
@@ -40,7 +40,7 @@
* This file contains the interrupt handlers for Host mode
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2_hcdintr.c,v 1.8 2014/04/03 06:34:58 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2_hcdintr.c,v 1.9 2014/07/26 09:18:53 skrll Exp $");
#include <sys/types.h>
#include <sys/pool.h>
@@ -1891,12 +1891,20 @@
"hcint 0x%08x, intsts 0x%08x\n",
chan->hcint,
DWC2_READ_4(hsotg, GINTSTS));
+ goto error;
}
}
} else {
dev_info(hsotg->dev,
"NYET/NAK/ACK/other in non-error case, 0x%08x\n",
chan->hcint);
+error:
+ /* use the 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);
}
}
Home |
Main Index |
Thread Index |
Old Index