[PATCH] Fix MUSB DMA for inbound ISO endpoints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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.

-- Hunyue
----------------------------------------------------------------------------------------------------------
Description:
    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@xxxxxxxxxx>

diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index ec32edc..2ad2ed9 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;
-
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux