PERFORCE change 181800 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Aug 3 19:39:00 UTC 2010
http://p4web.freebsd.org/@@181800?ac=10
Change 181800 by hselasky at hselasky_laptop001 on 2010/08/03 19:38:48
USB core:
- call "start_dma_delay" method on all errors, if it is non-NULL.
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/usb_controller.h#23 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#181 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/usb_controller.h#23 (text+ko) ====
@@ -136,7 +136,7 @@
/* Optional */
- void (*dma_delay)(struct usb_xfer *);
+ void (*start_dma_delay)(struct usb_xfer *);
void *info;
};
==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#181 (text+ko) ====
@@ -2578,9 +2578,10 @@
* If we have a non-hardware induced error we
* need to do the DMA delay!
*/
- if (((xfer->error == USB_ERR_CANCELLED) ||
- (xfer->error == USB_ERR_TIMEOUT)) &&
- (!xfer->flags_int.did_dma_delay)) {
+ if ((xfer->error != 0) && (!xfer->flags_int.did_dma_delay) &&
+ ((xfer->error == USB_ERR_CANCELLED) ||
+ (xfer->error == USB_ERR_TIMEOUT) ||
+ (xfer->endpoint->methods->start_dma_delay != NULL))) {
usb_timeout_t temp;
@@ -2603,8 +2604,8 @@
* memory. For the other hardware platforms we
* use a static delay.
*/
- if (xfer->endpoint->methods->dma_delay != NULL) {
- (xfer->endpoint->methods->dma_delay) (xfer);
+ if (xfer->endpoint->methods->start_dma_delay != NULL) {
+ (xfer->endpoint->methods->start_dma_delay) (xfer);
} else {
usbd_transfer_timeout_ms(xfer,
(void *)&usb_dma_delay_done_cb, temp);
More information about the p4-projects
mailing list