USB: remove uses of URB_NO_SETUP_DMA_MAP
This patch (as1350) removes all usages of coherent buffers for USB control-request setup-packet buffers. There's no good reason to reserve coherent memory for these things; control requests are hardly ever used in large quantity (the major exception is firmware transfers, and they aren't time-critical). Furthermore, only seven drivers used it. We might as well always use streaming DMA mappings for setup-packet buffers, and remove some extra complexity from usbcore. The DMA-mapping portion of hcd.c is currently in flux. A separate patch will be submitted to remove support for URB_NO_SETUP_DMA_MAP after everything else settles down. The removal should go smoothly, as by then nobody will be using it. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
749da5f82f
commit
0ede76fcec
@@ -147,11 +147,9 @@ static int usb_stor_msg_common(struct us_data *us, int timeout)
|
||||
* hasn't been mapped for DMA. Yes, this is clunky, but it's
|
||||
* easier than always having the caller tell us whether the
|
||||
* transfer buffer has already been mapped. */
|
||||
us->current_urb->transfer_flags = URB_NO_SETUP_DMA_MAP;
|
||||
if (us->current_urb->transfer_buffer == us->iobuf)
|
||||
us->current_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
|
||||
us->current_urb->transfer_dma = us->iobuf_dma;
|
||||
us->current_urb->setup_dma = us->cr_dma;
|
||||
|
||||
/* submit the URB */
|
||||
status = usb_submit_urb(us->current_urb, GFP_NOIO);
|
||||
|
Reference in New Issue
Block a user