summaryrefslogtreecommitdiff
path: root/drivers/usb/storage/freecom.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2007-09-09 21:47:26 +0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-12 03:22:36 +0300
commit41c2497b188a641c542328d08a45cf3214d453bd (patch)
tree31ca9b40b714bbe43e5c814090bf280834c43eb2 /drivers/usb/storage/freecom.c
parentdd829d2302c6b0f88542ca367229d676cb9ca212 (diff)
downloadlinux-41c2497b188a641c542328d08a45cf3214d453bd.tar.xz
[SCSI] usb: freecom & sddr09 - convert to accessors and !use_sg cleanup
- Use scsi data accessors and remove of !use_sg code path - This patch is dependent on cleanup patch to usb transport.c/h Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Acked-by: Matthew Dharm <mdharm-scsi@one-eyed-alien.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/usb/storage/freecom.c')
-rw-r--r--drivers/usb/storage/freecom.c14
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,
/* Now transfer all of our blocks. */
US_DEBUGP("Start of read\n");
- result = usb_stor_bulk_transfer_sg(us, ipipe, srb->request_buffer,
- count, srb->use_sg, &srb->resid);
+ result = usb_stor_bulk_srb(us, ipipe, srb);
US_DEBUGP("freecom_readdata done!\n");
if (result > USB_STOR_XFER_SHORT)
@@ -166,8 +165,7 @@ freecom_writedata (struct scsi_cmnd *srb, struct us_data *us,
/* Now transfer all of our blocks. */
US_DEBUGP("Start of write\n");
- result = usb_stor_bulk_transfer_sg(us, opipe, srb->request_buffer,
- count, srb->use_sg, &srb->resid);
+ result = usb_stor_bulk_srb(us, opipe, srb);
US_DEBUGP("freecom_writedata done!\n");
if (result > USB_STOR_XFER_SHORT)
@@ -281,7 +279,7 @@ int freecom_transport(struct scsi_cmnd *srb, struct us_data *us)
* and such will hang. */
US_DEBUGP("Device indicates that it has %d bytes available\n",
le16_to_cpu (fst->Count));
- US_DEBUGP("SCSI requested %d\n", srb->request_bufflen);
+ US_DEBUGP("SCSI requested %d\n", scsi_bufflen(srb));
/* Find the length we desire to read. */
switch (srb->cmnd[0]) {
@@ -292,12 +290,12 @@ int freecom_transport(struct scsi_cmnd *srb, struct us_data *us)
length = le16_to_cpu(fst->Count);
break;
default:
- length = srb->request_bufflen;
+ length = scsi_bufflen(srb);
}
/* verify that this amount is legal */
- if (length > srb->request_bufflen) {
- length = srb->request_bufflen;
+ if (length > scsi_bufflen(srb)) {
+ length = scsi_bufflen(srb);
US_DEBUGP("Truncating request to match buffer length: %d\n", length);
}