Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb With the hope it fixes PR #52911, be extra paran...



details:   https://anonhg.NetBSD.org/src/rev/65b82a912800
branches:  trunk
changeset: 322713:65b82a912800
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Mon May 14 00:26:02 2018 +0000

description:
With the hope it fixes PR #52911, be extra paranoid about assuring the
Device Context DMA memory is sync'd immediately before reading from it.

diffstat:

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

diffs (26 lines):

diff -r 7a6f9a043714 -r 65b82a912800 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Sun May 13 23:14:47 2018 +0000
+++ b/sys/dev/usb/xhci.c        Mon May 14 00:26:02 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci.c,v 1.91 2018/05/02 09:55:22 jmcneill Exp $       */
+/*     $NetBSD: xhci.c,v 1.92 2018/05/14 00:26:02 jakllsch Exp $       */
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.91 2018/05/02 09:55:22 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.92 2018/05/14 00:26:02 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -2367,6 +2367,7 @@
                /* Allow device time to set new address */
                usbd_delay_ms(dev, USB_SET_ADDRESS_SETTLE);
 
+               usb_syncmem(&xs->xs_dc_dma, 0, sc->sc_pgsz, BUS_DMASYNC_POSTREAD);
                cp = xhci_slot_get_dcv(sc, xs, XHCI_DCI_SLOT);
                HEXDUMP("slot context", cp, sc->sc_ctxsz);
                uint8_t addr = XHCI_SCTX_3_DEV_ADDR_GET(le32toh(cp[3]));



Home | Main Index | Thread Index | Old Index