Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed1db3ad authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman
Browse files

USB: fix a bug in the scatter-gather library



This patch (as1298) fixes a bug in the new scatter-gather URB
facility.  If an URB uses a scatterlist then it should not have the
URB_NO_INTERRUPT flag set; otherwise the system won't be notified when
the transfer completes.

Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Acked-by: default avatarDavid Vrabel <david.vrabel@csr.com>
CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 253e0572
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -403,7 +403,7 @@ int usb_sg_init(struct usb_sg_request *io, struct usb_device *dev,
	if (!io->urbs)
		goto nomem;

	urb_flags = URB_NO_INTERRUPT;
	urb_flags = 0;
	if (dma)
		urb_flags |= URB_NO_TRANSFER_DMA_MAP;
	if (usb_pipein(pipe))
@@ -435,6 +435,7 @@ int usb_sg_init(struct usb_sg_request *io, struct usb_device *dev,
		io->urbs[0]->num_sgs = io->entries;
		io->entries = 1;
	} else {
		urb_flags |= URB_NO_INTERRUPT;
		for_each_sg(sg, sg, io->entries, i) {
			unsigned len;