[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>
This commit is contained in:
committed by
James Bottomley
parent
dd829d2302
commit
41c2497b18
@@ -1623,7 +1623,7 @@ int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us)
|
||||
return USB_STOR_TRANSPORT_ERROR;
|
||||
}
|
||||
|
||||
if (srb->request_bufflen == 0)
|
||||
if (scsi_bufflen(srb) == 0)
|
||||
return USB_STOR_TRANSPORT_GOOD;
|
||||
|
||||
if (srb->sc_data_direction == DMA_TO_DEVICE ||
|
||||
@@ -1634,12 +1634,9 @@ int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us)
|
||||
US_DEBUGP("SDDR09: %s %d bytes\n",
|
||||
(srb->sc_data_direction == DMA_TO_DEVICE) ?
|
||||
"sending" : "receiving",
|
||||
srb->request_bufflen);
|
||||
scsi_bufflen(srb));
|
||||
|
||||
result = usb_stor_bulk_transfer_sg(us, pipe,
|
||||
srb->request_buffer,
|
||||
srb->request_bufflen,
|
||||
srb->use_sg, &srb->resid);
|
||||
result = usb_stor_bulk_srb(us, pipe, srb);
|
||||
|
||||
return (result == USB_STOR_XFER_GOOD ?
|
||||
USB_STOR_TRANSPORT_GOOD : USB_STOR_TRANSPORT_ERROR);
|
||||
|
Reference in New Issue
Block a user