summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2019-12-14 12:35:58 +0000
committermartin <martin@NetBSD.org>2019-12-14 12:35:58 +0000
commit032bf0c862265d54e8dbaf3645f50932ebb25e92 (patch)
tree912b668310c0c32fc3a48a0bf8589fd34a77442f /sys/dev/usb
parent1ca8ad27654f0b941bb9f3e05ccd482acd21d992 (diff)
Pull up following revision(s) (requested by gson in ticket #554):
sys/dev/usb/ohci.c: revision 1.292 Preserve the toggleCarry bit in the Endpoint Descriptor in ohci_abort_xfer(). Fixes the OHCI part of PR kern/50278.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ohci.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index a19218141f3..79df1ade046 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.289.4.2 2019/12/14 12:30:57 martin Exp $ */
+/* $NetBSD: ohci.c,v 1.289.4.3 2019/12/14 12:35:58 martin Exp $ */
/*
* Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.289.4.2 2019/12/14 12:30:57 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.289.4.3 2019/12/14 12:35:58 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -2349,7 +2349,9 @@ ohci_abort_xfer(struct usbd_xfer *xfer, usbd_status status)
if (hit) {
DPRINTFN(1, "set hd=0x%08jx, tl=0x%08jx", (int)p->physaddr,
(int)O32TOH(sed->ed.ed_tailp), 0, 0);
- sed->ed.ed_headp = HTOO32(p->physaddr); /* unlink TDs */
+ /* unlink TDs, preserving toggle carry */
+ sed->ed.ed_headp = HTOO32(p->physaddr |
+ (O32TOH(sed->ed.ed_headp) & OHCI_TOGGLECARRY));
usb_syncmem(&sed->dma,
sed->offs + offsetof(ohci_ed_t, ed_headp),
sizeof(sed->ed.ed_headp),