summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_freebsd.h
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2014-01-22 07:48:39 +0000
committerhselasky <hselasky@FreeBSD.org>2014-01-22 07:48:39 +0000
commit6fdccb82d0f189576d4724542976184be35b1fe4 (patch)
tree6204c009ad033c9fe041cd9706a850da9e24e218 /sys/dev/usb/usb_freebsd.h
parent4dfe3b9982102789352a57a7ea5e31a23f3d823d (diff)
downloadFreeBSD-src-6fdccb82d0f189576d4724542976184be35b1fe4.zip
FreeBSD-src-6fdccb82d0f189576d4724542976184be35b1fe4.tar.gz
Ensure that the DMA delay does not get rounded down to zero ticks when
a timeout value of a single tick is given. With FreeBSD-10 and newer the current system time is used as a starting point, and the minimum callout time of a single tick will be guaranteed. This patch mostly affect the DMA delay timeouts, which are typically in the range from 0.125 to 2ms. MFC after: 1 week
Diffstat (limited to 'sys/dev/usb/usb_freebsd.h')
-rw-r--r--sys/dev/usb/usb_freebsd.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/usb/usb_freebsd.h b/sys/dev/usb/usb_freebsd.h
index 0ae4533..8c806e7 100644
--- a/sys/dev/usb/usb_freebsd.h
+++ b/sys/dev/usb/usb_freebsd.h
@@ -50,6 +50,13 @@
#define USB_HAVE_FIXED_CONFIG 0
#define USB_HAVE_FIXED_PORT 0
+/* define zero ticks callout value */
+#if (__FreeBSD_version >= 1000029)
+#define USB_CALLOUT_ZERO_TICKS 0
+#else
+#define USB_CALLOUT_ZERO_TICKS 1
+#endif
+
#define USB_TD_GET_PROC(td) (td)->td_proc
#define USB_PROC_GET_GID(td) (td)->p_pgid
OpenPOWER on IntegriCloud