Module Name: src Committed By: skrll Date: Sun Dec 4 16:59:49 UTC 2016
Modified Files: src/sys/external/bsd/dwc2: dwc2.c Log Message: Add a missing usb_syncmem(... BUS_DMASYNC_PRE{READ,WRITE}) for the transfer buffer To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/external/bsd/dwc2/dwc2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/external/bsd/dwc2/dwc2.c diff -u src/sys/external/bsd/dwc2/dwc2.c:1.44 src/sys/external/bsd/dwc2/dwc2.c:1.45 --- src/sys/external/bsd/dwc2/dwc2.c:1.44 Sun Aug 14 14:42:22 2016 +++ src/sys/external/bsd/dwc2/dwc2.c Sun Dec 4 16:59:49 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc2.c,v 1.44 2016/08/14 14:42:22 skrll Exp $ */ +/* $NetBSD: dwc2.c,v 1.45 2016/12/04 16:59:49 skrll Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.44 2016/08/14 14:42:22 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.45 2016/12/04 16:59:49 skrll Exp $"); #include "opt_usb.h" @@ -1012,6 +1012,10 @@ dwc2_device_start(struct usbd_xfer *xfer dwc2_urb->usbdma = &xfer->ux_dmabuf; dwc2_urb->buf = KERNADDR(dwc2_urb->usbdma, 0); dwc2_urb->dma = DMAADDR(dwc2_urb->usbdma, 0); + + usb_syncmem(&xfer->ux_dmabuf, 0, len, + dir == UE_DIR_IN ? + BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); } dwc2_urb->length = len; dwc2_urb->flags = flags;