Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Preserve the toggleCarry bit in the Endpoint Des...



details:   https://anonhg.NetBSD.org/src/rev/f23c4e763497
branches:  trunk
changeset: 967065:f23c4e763497
user:      gson <gson%NetBSD.org@localhost>
date:      Fri Nov 29 14:15:41 2019 +0000

description:
Preserve the toggleCarry bit in the Endpoint Descriptor in
ohci_abort_xfer().  Fixes the OHCI part of PR kern/50278.

diffstat:

 sys/dev/usb/ohci.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r ea5dde5f3aea -r f23c4e763497 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Fri Nov 29 14:13:04 2019 +0000
+++ b/sys/dev/usb/ohci.c        Fri Nov 29 14:15:41 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.291 2019/11/29 14:13:04 gson Exp $  */
+/*     $NetBSD: ohci.c,v 1.292 2019/11/29 14:15:41 gson 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.291 2019/11/29 14:13:04 gson Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.292 2019/11/29 14:15:41 gson Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -2349,7 +2349,9 @@
        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),



Home | Main Index | Thread Index | Old Index