diff options
Diffstat (limited to 'drivers/usb/storage/freecom.c')
-rw-r--r-- | drivers/usb/storage/freecom.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c index 88aa59ab7563..f5a4e8d6a3b1 100644 --- a/drivers/usb/storage/freecom.c +++ b/drivers/usb/storage/freecom.c | |||
@@ -132,8 +132,7 @@ freecom_readdata (struct scsi_cmnd *srb, struct us_data *us, | |||
132 | 132 | ||
133 | /* Now transfer all of our blocks. */ | 133 | /* Now transfer all of our blocks. */ |
134 | US_DEBUGP("Start of read\n"); | 134 | US_DEBUGP("Start of read\n"); |
135 | result = usb_stor_bulk_transfer_sg(us, ipipe, srb->request_buffer, | 135 | result = usb_stor_bulk_srb(us, ipipe, srb); |
136 | count, srb->use_sg, &srb->resid); | ||
137 | US_DEBUGP("freecom_readdata done!\n"); | 136 | US_DEBUGP("freecom_readdata done!\n"); |
138 | 137 | ||
139 | if (result > USB_STOR_XFER_SHORT) | 138 | if (result > USB_STOR_XFER_SHORT) |
@@ -166,8 +165,7 @@ freecom_writedata (struct scsi_cmnd *srb, struct us_data *us, | |||
166 | 165 | ||
167 | /* Now transfer all of our blocks. */ | 166 | /* Now transfer all of our blocks. */ |
168 | US_DEBUGP("Start of write\n"); | 167 | US_DEBUGP("Start of write\n"); |
169 | result = usb_stor_bulk_transfer_sg(us, opipe, srb->request_buffer, | 168 | result = usb_stor_bulk_srb(us, opipe, srb); |
170 | count, srb->use_sg, &srb->resid); | ||
171 | 169 | ||
172 | US_DEBUGP("freecom_writedata done!\n"); | 170 | US_DEBUGP("freecom_writedata done!\n"); |
173 | if (result > USB_STOR_XFER_SHORT) | 171 | if (result > USB_STOR_XFER_SHORT) |
@@ -281,7 +279,7 @@ int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
281 | * and such will hang. */ | 279 | * and such will hang. */ |
282 | US_DEBUGP("Device indicates that it has %d bytes available\n", | 280 | US_DEBUGP("Device indicates that it has %d bytes available\n", |
283 | le16_to_cpu (fst->Count)); | 281 | le16_to_cpu (fst->Count)); |
284 | US_DEBUGP("SCSI requested %d\n", srb->request_bufflen); | 282 | US_DEBUGP("SCSI requested %d\n", scsi_bufflen(srb)); |
285 | 283 | ||
286 | /* Find the length we desire to read. */ | 284 | /* Find the length we desire to read. */ |
287 | switch (srb->cmnd[0]) { | 285 | switch (srb->cmnd[0]) { |
@@ -292,12 +290,12 @@ int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
292 | length = le16_to_cpu(fst->Count); | 290 | length = le16_to_cpu(fst->Count); |
293 | break; | 291 | break; |
294 | default: | 292 | default: |
295 | length = srb->request_bufflen; | 293 | length = scsi_bufflen(srb); |
296 | } | 294 | } |
297 | 295 | ||
298 | /* verify that this amount is legal */ | 296 | /* verify that this amount is legal */ |
299 | if (length > srb->request_bufflen) { | 297 | if (length > scsi_bufflen(srb)) { |
300 | length = srb->request_bufflen; | 298 | length = scsi_bufflen(srb); |
301 | US_DEBUGP("Truncating request to match buffer length: %d\n", length); | 299 | US_DEBUGP("Truncating request to match buffer length: %d\n", length); |
302 | } | 300 | } |
303 | 301 | ||