Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Use ux_bufsize rather than ux_length in isoc pat...
details: https://anonhg.NetBSD.org/src/rev/79f1accbcf75
branches: trunk
changeset: 932689:79f1accbcf75
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Wed May 13 19:33:48 2020 +0000
description:
Use ux_bufsize rather than ux_length in isoc path usb_syncmem calls.
ux_length is always 0 for isoc pipes, so it could not be used here.
To do: revisit this for other host controllers, uhci and ehci in particular?
diffstat:
sys/dev/usb/ohci.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 67b6a4d5740a -r 79f1accbcf75 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c Wed May 13 18:44:51 2020 +0000
+++ b/sys/dev/usb/ohci.c Wed May 13 19:33:48 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.302 2020/05/13 18:44:51 jakllsch Exp $ */
+/* $NetBSD: ohci.c,v 1.303 2020/05/13 19:33:48 jakllsch 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.302 2020/05/13 18:44:51 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.303 2020/05/13 19:33:48 jakllsch Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -3463,7 +3463,7 @@
int isread =
(UE_GET_DIR(xfer->ux_pipe->up_endpoint->ue_edesc->bEndpointAddress) == UE_DIR_IN);
- usb_syncmem(&xfer->ux_dmabuf, 0, xfer->ux_length,
+ usb_syncmem(&xfer->ux_dmabuf, 0, xfer->ux_bufsize,
isread ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
if (isoc->next == -1) {
@@ -3642,7 +3642,7 @@
DPRINTFN(10, "xfer=%#jx, actlen=%jd", (uintptr_t)xfer, xfer->ux_actlen,
0, 0);
- usb_syncmem(&xfer->ux_dmabuf, 0, xfer->ux_length,
+ usb_syncmem(&xfer->ux_dmabuf, 0, xfer->ux_bufsize,
isread ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
}
Home |
Main Index |
Thread Index |
Old Index