Module Name:    src
Committed By:   jmcneill
Date:           Thu Jan 10 21:25:54 UTC 2013

Modified Files:
        src/sys/dev/usb: dwc_otg.c

Log Message:
defer updating td actlen until we get acknowledgement that the tx was 
successful, fixes umass writes (and probably a lot of other things)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/usb/dwc_otg.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/dwc_otg.c
diff -u src/sys/dev/usb/dwc_otg.c:1.2 src/sys/dev/usb/dwc_otg.c:1.3
--- src/sys/dev/usb/dwc_otg.c:1.2	Thu Jan 10 20:31:04 2013
+++ src/sys/dev/usb/dwc_otg.c	Thu Jan 10 21:25:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc_otg.c,v 1.2 2013/01/10 20:31:04 jmcneill Exp $	*/
+/*	$NetBSD: dwc_otg.c,v 1.3 2013/01/10 21:25:53 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc_otg.c,v 1.2 2013/01/10 20:31:04 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_otg.c,v 1.3 2013/01/10 21:25:53 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -3013,6 +3013,7 @@ dwc_otg_host_data_tx(struct dwc_otg_td *
 			if (!dwc_otg_host_channel_wait(td))
 				break;
 
+			td->actlen += td->tx_bytes;
 			td->offset += td->tx_bytes;
 			td->remainder -= td->tx_bytes;
 			td->toggle ^= 1;
@@ -3159,7 +3160,6 @@ send_pkt_sync:
 
 	/* store number of bytes transmitted */
 	td->tx_bytes = count;
-	td->actlen += count;
 	goto busy;
 
 send_cpkt:

Reply via email to