Message ID | 1564044861-1445-1-git-send-email-mathias.nyman@linux.intel.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | d39b5bad8658d6d94cb2d98a44a7e159db4f5030 |
Headers | show |
Series | xhci: Fix crash if scatter gather is used with Immediate Data Transfer (IDT). | expand |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 7a26496..f5c4144 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -2175,7 +2175,8 @@ static inline bool xhci_urb_suitable_for_idt(struct urb *urb) if (!usb_endpoint_xfer_isoc(&urb->ep->desc) && usb_urb_dir_out(urb) && usb_endpoint_maxp(&urb->ep->desc) >= TRB_IDT_MAX_SIZE && urb->transfer_buffer_length <= TRB_IDT_MAX_SIZE && - !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) + !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP) && + !urb->num_sgs) return true; return false;