From: Hunyue Yau Date: Sat, 8 Dec 2007 03:29:13 +0000 (-0800) Subject: Fix MUSB DMA for inbound ISO endpoints X-Git-Tag: v2.6.24-omap1~95 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=047c6b0c38aea98e8a7dc79954846a7295a0cf43;p=linux-2.6-omap-h63xx.git Fix MUSB DMA for inbound ISO endpoints The DMA receive path in the MUSB driver does not update the fields in the URB for ISO end points (the PIO path does, however). This patch updates the fields in the URB for the DMA path. Drivers using ISO endpoints will not see any valid data without those fields since the USB core initializes them to be zero/error. Tested with on the 2430SDP with a USB bluetooth dongle and SCO audio recording and playback. This implements the ISO URB handling for the DMA rx case by providing the appropriate length and status in the struct usb_iso_packet_descriptor field of the URB. Previously, this was only done in the PIO case. Signed-off-by: Hunyue Yau Signed-off-by: Tony Lindgren --- diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index ec32edcf9cb..2ad2ed95404 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -1625,6 +1625,19 @@ void musb_host_rx(struct musb *musb, u8 epnum) } } + if (dma && usb_pipeisoc(pipe)) { + struct usb_iso_packet_descriptor *d; + int iso_stat = status; + + d = urb->iso_frame_desc + qh->iso_idx; + d->actual_length += xfer_len; + if (iso_err) { + iso_stat = -EILSEQ; + urb->error_count++; + } + d->status = iso_stat; + } + finish: urb->actual_length += xfer_len; qh->offset += xfer_len;