Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Initialize xfer->ux_status in uhci_root_intr_start.
details: https://anonhg.NetBSD.org/src/rev/c73414d9403e
branches: trunk
changeset: 848935:c73414d9403e
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Feb 14 16:47:11 2020 +0000
description:
Initialize xfer->ux_status in uhci_root_intr_start.
Otherwise, it will be USBD_NOT_STARTED, so usbd_ar_pipe will skip
calling upm_abort.
Candidate fix for PR kern/54963, same problem as reported at:
https://mail-index.NetBSD.org/current-users/2020/02/13/msg037740.html
diffstat:
sys/dev/usb/uhci.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 337e0af5263b -r c73414d9403e sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c Fri Feb 14 16:02:41 2020 +0000
+++ b/sys/dev/usb/uhci.c Fri Feb 14 16:47:11 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci.c,v 1.290 2020/02/12 16:02:01 riastradh Exp $ */
+/* $NetBSD: uhci.c,v 1.291 2020/02/14 16:47:11 riastradh Exp $ */
/*
* Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.290 2020/02/12 16:02:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.291 2020/02/14 16:47:11 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -3850,6 +3850,7 @@
return;
KASSERT(sc->sc_intr_xfer == xfer);
+ KASSERT(xfer->ux_status == USBD_IN_PROGRESS);
xfer->ux_status = USBD_CANCELLED;
#ifdef DIAGNOSTIC
UHCI_XFER2UXFER(xfer)->ux_isdone = true;
@@ -3907,7 +3908,8 @@
if (!polling)
mutex_exit(&sc->sc_lock);
- return USBD_IN_PROGRESS;
+ xfer->ux_status = USBD_IN_PROGRESS;
+ return xfer->ux_status;
}
/* Close the root interrupt pipe. */
Home |
Main Index |
Thread Index |
Old Index