Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb clip xfer->actlen also in the !DIAGNOSTIC case
details: https://anonhg.NetBSD.org/src/rev/5a61c05370d3
branches: trunk
changeset: 336068:5a61c05370d3
user: aymeric <aymeric%NetBSD.org@localhost>
date: Mon Feb 09 20:12:47 2015 +0000
description:
clip xfer->actlen also in the !DIAGNOSTIC case
diffstat:
sys/dev/usb/usbdi.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r a41e48be1948 -r 5a61c05370d3 sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c Mon Feb 09 19:39:48 2015 +0000
+++ b/sys/dev/usb/usbdi.c Mon Feb 09 20:12:47 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi.c,v 1.162 2014/09/12 16:40:38 skrll Exp $ */
+/* $NetBSD: usbdi.c,v 1.163 2015/02/09 20:12:47 aymeric Exp $ */
/*
* Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162 2014/09/12 16:40:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.163 2015/02/09 20:12:47 aymeric Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -849,13 +849,13 @@
if (!(xfer->flags & USBD_NO_COPY) && xfer->actlen != 0 &&
usbd_xfer_isread(xfer)) {
+ if (xfer->actlen > xfer->length) {
#ifdef DIAGNOSTIC
- if (xfer->actlen > xfer->length) {
printf("%s: actlen (%d) > len (%d)\n", __func__,
xfer->actlen, xfer->length);
+#endif
xfer->actlen = xfer->length;
}
-#endif
memcpy(xfer->buffer, KERNADDR(dmap, 0), xfer->actlen);
}
Home |
Main Index |
Thread Index |
Old Index