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 Tweak the usb_syncmem from the previous.



details:   https://anonhg.NetBSD.org/src/rev/35b880f54563
branches:  nick-nhusb
changeset: 334405:35b880f54563
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Feb 18 17:38:37 2016 +0000

description:
Tweak the usb_syncmem from the previous.

diffstat:

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

diffs (29 lines):

diff -r f8185702a2ca -r 35b880f54563 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Thu Feb 18 17:34:30 2016 +0000
+++ b/sys/dev/usb/ohci.c        Thu Feb 18 17:38:37 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.254.2.44 2016/02/18 17:34:30 skrll Exp $    */
+/*     $NetBSD: ohci.c,v 1.254.2.45 2016/02/18 17:38:37 skrll 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.254.2.44 2016/02/18 17:34:30 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.45 2016/02/18 17:38:37 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -1554,7 +1554,9 @@
 
                        /* clear halt and TD chain */
                        sed->ed.ed_headp = HTOO32(p->physaddr);
-                       usb_syncmem(&sed->dma, sed->offs, sizeof(sed->ed),
+                       usb_syncmem(&sed->dma,
+                           sed->offs + offsetof(ohci_ed_t, ed_ed_headp),
+                           sizeof(sed->ed.ed_headp),
                            BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
 
                        OWRITE4(sc, OHCI_COMMAND_STATUS, OHCI_CLF);



Home | Main Index | Thread Index | Old Index