svn commit: r261466 - in stable/9/sys/dev/usb: . controller

Hans Petter Selasky hselasky at FreeBSD.org
Tue Feb 4 08:44:34 UTC 2014


Author: hselasky
Date: Tue Feb  4 08:44:33 2014
New Revision: 261466
URL: http://svnweb.freebsd.org/changeset/base/261466

Log:
  MFC r261004, r261005 and r261033:
  Adjust the DMA delay logic so that the DMA delay does not become too small.

Modified:
  stable/9/sys/dev/usb/controller/ehci.c
  stable/9/sys/dev/usb/usb_freebsd.h
  stable/9/sys/dev/usb/usb_transfer.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/usb/controller/ehci.c
==============================================================================
--- stable/9/sys/dev/usb/controller/ehci.c	Tue Feb  4 08:44:12 2014	(r261465)
+++ stable/9/sys/dev/usb/controller/ehci.c	Tue Feb  4 08:44:33 2014	(r261466)
@@ -3778,7 +3778,7 @@ ehci_get_dma_delay(struct usb_device *ud
 	 * Wait until the hardware has finished any possible use of
 	 * the transfer descriptor(s) and QH
 	 */
-	*pus = (188);			/* microseconds */
+	*pus = (1125);			/* microseconds */
 }
 
 static void

Modified: stable/9/sys/dev/usb/usb_freebsd.h
==============================================================================
--- stable/9/sys/dev/usb/usb_freebsd.h	Tue Feb  4 08:44:12 2014	(r261465)
+++ stable/9/sys/dev/usb/usb_freebsd.h	Tue Feb  4 08:44:33 2014	(r261466)
@@ -43,6 +43,9 @@
 #define	USB_HAVE_MSCTEST 1
 #define	USB_HAVE_PF 1
 
+/* define zero ticks callout value */
+#define	USB_CALLOUT_ZERO_TICKS 1
+
 #define	USB_TD_GET_PROC(td) (td)->td_proc
 #define	USB_PROC_GET_GID(td) (td)->p_pgid
 

Modified: stable/9/sys/dev/usb/usb_transfer.c
==============================================================================
--- stable/9/sys/dev/usb/usb_transfer.c	Tue Feb  4 08:44:12 2014	(r261465)
+++ stable/9/sys/dev/usb/usb_transfer.c	Tue Feb  4 08:44:33 2014	(r261466)
@@ -2657,7 +2657,7 @@ usbd_transfer_timeout_ms(struct usb_xfer
 
 	/* defer delay */
 	usb_callout_reset(&xfer->timeout_handle,
-	    USB_MS_TO_TICKS(ms), cb, xfer);
+	    USB_MS_TO_TICKS(ms) + USB_CALLOUT_ZERO_TICKS, cb, xfer);
 }
 
 /*------------------------------------------------------------------------*


More information about the svn-src-stable-9 mailing list