Module Name:    src
Committed By:   martin
Date:           Wed Feb 11 15:39:33 UTC 2015

Modified Files:
        src/sys/dev/usb [netbsd-5]: usbdi.c

Log Message:
Pull up following revision(s) (requested by aymeric in ticket #1948):
        sys/dev/usb/usbdi.c: revision 1.163
clip xfer->actlen also in the !DIAGNOSTIC case


To generate a diff of this commit:
cvs rdiff -u -r1.124.4.2 -r1.124.4.3 src/sys/dev/usb/usbdi.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/dev/usb/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.124.4.2 src/sys/dev/usb/usbdi.c:1.124.4.3
--- src/sys/dev/usb/usbdi.c:1.124.4.2	Wed Jan 27 20:56:45 2010
+++ src/sys/dev/usb/usbdi.c	Wed Feb 11 15:39:33 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi.c,v 1.124.4.2 2010/01/27 20:56:45 sborrill Exp $	*/
+/*	$NetBSD: usbdi.c,v 1.124.4.3 2015/02/11 15:39:33 martin Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.124.4.2 2010/01/27 20:56:45 sborrill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.124.4.3 2015/02/11 15:39:33 martin Exp $");
 
 #include "opt_compat_netbsd.h"
 
@@ -773,13 +773,13 @@ usb_transfer_complete(usbd_xfer_handle x
 
 	if (!(xfer->flags & USBD_NO_COPY) && xfer->actlen != 0 &&
 	    usbd_xfer_isread(xfer)) {
-#ifdef DIAGNOSTIC
 		if (xfer->actlen > xfer->length) {
+#ifdef DIAGNOSTIC
 			printf("usb_transfer_complete: actlen > len %d > %d\n",
 			       xfer->actlen, xfer->length);
+#endif
 			xfer->actlen = xfer->length;
 		}
-#endif
 		memcpy(xfer->buffer, KERNADDR(dmap, 0), xfer->actlen);
 	}
 

Reply via email to