diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-29 17:49:12 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-29 17:49:12 -0400 |
commit | b0c4e148bd591629749d02a8fbc8d81c26d548cf (patch) | |
tree | 3e2142635f3dc2ceeae870ead2dceab7b9c6def1 /drivers/usb/storage/transport.c | |
parent | 5615ca7906aefbdc3318604c89db5931d0a25910 (diff) | |
parent | be15cd72d256e5eb3261a781b8507fac83ab33f6 (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/usb/storage/transport.c')
-rw-r--r-- | drivers/usb/storage/transport.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index c1ba5301ebfc..7ca896a342e3 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c | |||
@@ -636,11 +636,11 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
636 | 636 | ||
637 | /* use the new buffer we have */ | 637 | /* use the new buffer we have */ |
638 | old_request_buffer = srb->request_buffer; | 638 | old_request_buffer = srb->request_buffer; |
639 | srb->request_buffer = srb->sense_buffer; | 639 | srb->request_buffer = us->sensebuf; |
640 | 640 | ||
641 | /* set the buffer length for transfer */ | 641 | /* set the buffer length for transfer */ |
642 | old_request_bufflen = srb->request_bufflen; | 642 | old_request_bufflen = srb->request_bufflen; |
643 | srb->request_bufflen = 18; | 643 | srb->request_bufflen = US_SENSE_SIZE; |
644 | 644 | ||
645 | /* set up for no scatter-gather use */ | 645 | /* set up for no scatter-gather use */ |
646 | old_sg = srb->use_sg; | 646 | old_sg = srb->use_sg; |
@@ -652,6 +652,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
652 | temp_result = us->transport(us->srb, us); | 652 | temp_result = us->transport(us->srb, us); |
653 | 653 | ||
654 | /* let's clean up right away */ | 654 | /* let's clean up right away */ |
655 | memcpy(srb->sense_buffer, us->sensebuf, US_SENSE_SIZE); | ||
655 | srb->resid = old_resid; | 656 | srb->resid = old_resid; |
656 | srb->request_buffer = old_request_buffer; | 657 | srb->request_buffer = old_request_buffer; |
657 | srb->request_bufflen = old_request_bufflen; | 658 | srb->request_bufflen = old_request_bufflen; |
@@ -923,6 +924,7 @@ int usb_stor_Bulk_max_lun(struct us_data *us) | |||
923 | int result; | 924 | int result; |
924 | 925 | ||
925 | /* issue the command */ | 926 | /* issue the command */ |
927 | us->iobuf[0] = 0; | ||
926 | result = usb_stor_control_msg(us, us->recv_ctrl_pipe, | 928 | result = usb_stor_control_msg(us, us->recv_ctrl_pipe, |
927 | US_BULK_GET_MAX_LUN, | 929 | US_BULK_GET_MAX_LUN, |
928 | USB_DIR_IN | USB_TYPE_CLASS | | 930 | USB_DIR_IN | USB_TYPE_CLASS | |