Commit 7a70f3f9 authored by Matthew Dharm's avatar Matthew Dharm Committed by Linus Torvalds

[PATCH] usb-storage: convert to common transfer functions

This patch fixes the bulk transport data stage to use the correct pipe for
data exchange, based on the transfer direction.
parent e391d5f6
...@@ -1257,8 +1257,10 @@ int usb_stor_Bulk_transport(Scsi_Cmnd *srb, struct us_data *us) ...@@ -1257,8 +1257,10 @@ int usb_stor_Bulk_transport(Scsi_Cmnd *srb, struct us_data *us)
/* DATA STAGE */ /* DATA STAGE */
/* send/receive data payload, if there is any */ /* send/receive data payload, if there is any */
if (transfer_length) { if (transfer_length) {
result = usb_stor_bulk_transfer_srb(us, us->send_bulk_pipe, unsigned int pipe = srb->sc_data_direction == SCSI_DATA_READ ?
srb, transfer_length); us->recv_bulk_pipe : us->send_bulk_pipe;
result = usb_stor_bulk_transfer_srb(us, pipe, srb,
transfer_length);
US_DEBUGP("Bulk data transfer result 0x%x\n", result); US_DEBUGP("Bulk data transfer result 0x%x\n", result);
/* if it was aborted, we need to indicate that */ /* if it was aborted, we need to indicate that */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment