PERFORCE change 113559 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Jan 26 13:50:39 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=113559
Change 113559 by hselasky at hselasky_mini_itx on 2007/01/26 13:50:34
Store the completion time in milliseconds for
isochronous transfer. This information can be
useful to echo-cancellers and the alike.
Correct a comment.
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/ehci.c#22 edit
.. //depot/projects/usb/src/sys/dev/usb/ohci.c#18 edit
.. //depot/projects/usb/src/sys/dev/usb/uhci.c#19 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_subr.h#31 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/ehci.c#22 (text+ko) ====
@@ -2470,6 +2470,8 @@
DPRINTFN(2,("start next=%d\n", xfer->pipe->isoc_next));
}
+ xfer->isoc_complete_time = (xfer->pipe->isoc_next + xfer->nframes) % USBD_ISOC_TIME_MAX;
+
nframes = xfer->nframes;
if(nframes == 0)
@@ -2703,6 +2705,8 @@
DPRINTFN(2,("start next=%d\n", xfer->pipe->isoc_next));
}
+ xfer->isoc_complete_time = (xfer->pipe->isoc_next + xfer->nframes) % USBD_ISOC_TIME_MAX;
+
nframes = xfer->nframes;
if(nframes == 0)
==== //depot/projects/usb/src/sys/dev/usb/ohci.c#18 (text+ko) ====
@@ -1905,6 +1905,8 @@
DPRINTFN(2,("start next=%d\n", xfer->pipe->isoc_next));
}
+ xfer->isoc_complete_time = (xfer->pipe->isoc_next + xfer->nframes) % USBD_ISOC_TIME_MAX;
+
nframes = xfer->nframes;
if(nframes == 0)
==== //depot/projects/usb/src/sys/dev/usb/uhci.c#19 (text+ko) ====
@@ -2010,6 +2010,8 @@
DPRINTFN(2,("start next=%d\n", xfer->pipe->isoc_next));
}
+ xfer->isoc_complete_time = (xfer->pipe->isoc_next + xfer->nframes) % USBD_ISOC_TIME_MAX;
+
nframes = xfer->nframes;
if(nframes == 0)
==== //depot/projects/usb/src/sys/dev/usb/usb_subr.h#31 (text+ko) ====
@@ -362,6 +362,9 @@
uint16_t max_frame_size;
uint16_t qh_pos;
+#define USBD_ISOC_TIME_MAX 128 /* ms */
+
+ uint8_t isoc_complete_time; /* in ms */
uint8_t address;
uint8_t endpoint;
uint8_t interval; /* milliseconds */
@@ -791,7 +794,7 @@
#define USB_CDEV_FLAG_FWD_SHORT 0x00040000 /* can be set to forward short transfers */
#define USB_CDEV_FLAG_READ_ONLY 0x00080000 /* device is read only */
-#define USB_CDEV_FLAG_WRITE_ONLY 0x00100000 /* device is read only */
+#define USB_CDEV_FLAG_WRITE_ONLY 0x00100000 /* device is write only */
#define USB_CDEV_FLAG_WAKEUP_RD_IMMED 0x00200000 /* wakeup read thread immediately */
#define USB_CDEV_FLAG_WAKEUP_WR_IMMED 0x00400000 /* wakeup write thread immediately */
More information about the p4-projects
mailing list