Date: Tue, 3 Aug 2010 19:38:58 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 181800 for review Message-ID: <201008031938.o73JcwZG039227@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@181800?ac=10 Change 181800 by hselasky@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008031938.o73JcwZG039227>