Module Name:    src
Committed By:   bouyer
Date:           Fri May 20 19:31:47 UTC 2011

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

Log Message:
Pull up following revision(s) (requested by drochner in ticket #1620):
        sys/dev/usb/ehci.c: revision 1.174
in alloc_sqtd_chain(), deal with the case where a data packet ends
exactly at a page boundary, and the FORCE_SHORT_XFER was set by the
client (which causes that an empty descriptor is needed to terminate
the transfer), from Gordon McNutt per PR kern/44883
(fixed a bit differently than the proposed patch for aesthetical
reasons -- avoids the page pointer to come into unexpexted area earlier)


To generate a diff of this commit:
cvs rdiff -u -r1.154.4.2 -r1.154.4.3 src/sys/dev/usb/ehci.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/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.154.4.2 src/sys/dev/usb/ehci.c:1.154.4.3
--- src/sys/dev/usb/ehci.c:1.154.4.2	Sat Jun 12 01:05:44 2010
+++ src/sys/dev/usb/ehci.c	Fri May 20 19:31:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.154.4.2 2010/06/12 01:05:44 riz Exp $ */
+/*	$NetBSD: ehci.c,v 1.154.4.3 2011/05/20 19:31:46 bouyer Exp $ */
 
 /*
  * Copyright (c) 2004-2008 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.154.4.2 2010/06/12 01:05:44 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.154.4.3 2011/05/20 19:31:46 bouyer Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -2706,7 +2706,8 @@
 		usb_syncmem(&cur->dma, cur->offs, sizeof(cur->qtd),
 		    BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
 		DPRINTFN(10,("ehci_alloc_sqtd_chain: extend chain\n"));
-		dataphys += curlen;
+		if (len)
+			dataphys += curlen;
 		cur = next;
 	}
 	cur->qtd.qtd_status |= htole32(EHCI_QTD_IOC);

Reply via email to