diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-07-09 09:57:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-09 12:46:50 -0400 |
commit | fe2072cc1768b0f979195acf19b8ccd381e541c3 (patch) | |
tree | e859371690893eb021d904b58f9ec8c7e8239e43 /drivers | |
parent | c5cf9212a368d88fe1e25797699b167f6daa64a5 (diff) |
usb/hcd: Ensure scatter-gather is not used for isoc transfers
We don't support sg for isoc transfers, enforce this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/core/hcd.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 190b1ec7bdcb..bc84106ac057 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -1398,7 +1398,15 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, | |||
1398 | && !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) { | 1398 | && !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) { |
1399 | if (hcd->self.uses_dma) { | 1399 | if (hcd->self.uses_dma) { |
1400 | if (urb->num_sgs) { | 1400 | if (urb->num_sgs) { |
1401 | int n = dma_map_sg( | 1401 | int n; |
1402 | |||
1403 | /* We don't support sg for isoc transfers ! */ | ||
1404 | if (usb_endpoint_xfer_isoc(&urb->ep->desc)) { | ||
1405 | WARN_ON(1); | ||
1406 | return -EINVAL; | ||
1407 | } | ||
1408 | |||
1409 | n = dma_map_sg( | ||
1402 | hcd->self.controller, | 1410 | hcd->self.controller, |
1403 | urb->sg, | 1411 | urb->sg, |
1404 | urb->num_sgs, | 1412 | urb->num_sgs, |