]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Fix MUSB DMA for inbound ISO endpoints
authorHunyue Yau <hyau@mvista.com>
Sat, 8 Dec 2007 03:29:13 +0000 (19:29 -0800)
committerTony Lindgren <tony@atomide.com>
Mon, 17 Dec 2007 01:04:11 +0000 (17:04 -0800)
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 <hyau@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/usb/musb/musb_host.c

index ec32edcf9cba2716d1583c9cc042ca4a223398c4..2ad2ed95404aa23c039ef5fde6979a54ddebd357 100644 (file)
@@ -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;