Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb In ehci_idone check for timed out or aborte...
details: https://anonhg.NetBSD.org/src/rev/562061b43918
branches: nick-nhusb
changeset: 334361:562061b43918
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Jan 03 08:30:37 2016 +0000
description:
In ehci_idone check for timed out or aborted transfer earlier and before
twiddling ex_isdone to avoid KASSERT firing.
diffstat:
sys/dev/usb/ehci.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (44 lines):
diff -r 0765d67784b0 -r 562061b43918 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c Sat Jan 02 16:14:46 2016 +0000
+++ b/sys/dev/usb/ehci.c Sun Jan 03 08:30:37 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci.c,v 1.234.2.74 2015/12/28 22:25:43 skrll Exp $ */
+/* $NetBSD: ehci.c,v 1.234.2.75 2016/01/03 08:30:37 skrll Exp $ */
/*
* Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.74 2015/12/28 22:25:43 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.75 2016/01/03 08:30:37 skrll Exp $");
#include "ohci.h"
#include "uhci.h"
@@ -1027,6 +1027,12 @@
USBHIST_LOG(ehcidebug, "ex=%p", ex, 0, 0, 0);
+ if (xfer->ux_status == USBD_CANCELLED ||
+ xfer->ux_status == USBD_TIMEOUT) {
+ USBHIST_LOG(ehcidebug, "aborted xfer=%p", xfer, 0, 0, 0);
+ return;
+ }
+
#ifdef DIAGNOSTIC
#ifdef EHCI_DEBUG
if (ex->ex_isdone) {
@@ -1039,12 +1045,6 @@
ex->ex_isdone = true;
#endif
- if (xfer->ux_status == USBD_CANCELLED ||
- xfer->ux_status == USBD_TIMEOUT) {
- USBHIST_LOG(ehcidebug, "aborted xfer=%p", xfer, 0, 0, 0);
- return;
- }
-
USBHIST_LOG(ehcidebug, "xfer=%p, pipe=%p ready", xfer, epipe, 0, 0);
/* The transfer is done, compute actual length and status. */
Home |
Main Index |
Thread Index |
Old Index