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>
This commit is contained in:
parent
c5cf9212a3
commit
fe2072cc17
|
@ -1398,7 +1398,15 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
|
||||||
&& !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) {
|
&& !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) {
|
||||||
if (hcd->self.uses_dma) {
|
if (hcd->self.uses_dma) {
|
||||||
if (urb->num_sgs) {
|
if (urb->num_sgs) {
|
||||||
int n = dma_map_sg(
|
int n;
|
||||||
|
|
||||||
|
/* We don't support sg for isoc transfers ! */
|
||||||
|
if (usb_endpoint_xfer_isoc(&urb->ep->desc)) {
|
||||||
|
WARN_ON(1);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
n = dma_map_sg(
|
||||||
hcd->self.controller,
|
hcd->self.controller,
|
||||||
urb->sg,
|
urb->sg,
|
||||||
urb->num_sgs,
|
urb->num_sgs,
|
||||||
|
|
Loading…
Reference in a new issue