don't start waiting for the new command in send_csw(). Although on the USB level this is entirely correct, and about 10% to 15% faster, usb_storage_transfer_complete() could get slightly confused by this.
The proper fix is obviously to make usb_storage_transfer_complete() not get confused, but that's a lot more work, and I prefer things to be correct to them being a bit faster right now git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24333 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cbc549def7
commit
7a73a9cd4e
1 changed files with 3 additions and 3 deletions
|
@ -496,7 +496,7 @@ void usb_storage_transfer_complete(int ep,int dir,int status,int length)
|
|||
struct command_block_wrapper* cbw = (void*)cbw_buffer;
|
||||
struct tm tm;
|
||||
|
||||
//logf("transfer result %X %d", status, length);
|
||||
logf("transfer result for ep %d/%d %X %d", ep,dir,status, length);
|
||||
switch(state) {
|
||||
case RECEIVING_BLOCKS:
|
||||
if(dir==USB_DIR_IN) {
|
||||
|
@ -580,6 +580,8 @@ void usb_storage_transfer_complete(int ep,int dir,int status,int length)
|
|||
}
|
||||
//logf("csw sent, now go back to idle");
|
||||
state = WAITING_FOR_COMMAND;
|
||||
/* Already start waiting for the next command */
|
||||
usb_drv_recv(ep_out, cbw_buffer, 1024);
|
||||
#if 0
|
||||
if(cur_cmd.cur_cmd == SCSI_WRITE_10)
|
||||
{
|
||||
|
@ -1178,8 +1180,6 @@ static void send_csw(int status)
|
|||
sizeof(struct command_status_wrapper));
|
||||
state = SENDING_CSW;
|
||||
//logf("CSW: %X",status);
|
||||
/* Already start waiting for the next command */
|
||||
usb_drv_recv(ep_out, cbw_buffer, 1024);
|
||||
|
||||
if(status == UMS_STATUS_GOOD) {
|
||||
cur_sense_data.sense_key=0;
|
||||
|
|
Loading…
Reference in a new issue