diff options
Diffstat (limited to 'firmware/usbstack/usb_storage.c')
-rw-r--r-- | firmware/usbstack/usb_storage.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c index f8e3aba839..144603348b 100644 --- a/firmware/usbstack/usb_storage.c +++ b/firmware/usbstack/usb_storage.c | |||
@@ -496,7 +496,7 @@ void usb_storage_transfer_complete(int ep,int dir,int status,int length) | |||
496 | struct command_block_wrapper* cbw = (void*)cbw_buffer; | 496 | struct command_block_wrapper* cbw = (void*)cbw_buffer; |
497 | struct tm tm; | 497 | struct tm tm; |
498 | 498 | ||
499 | //logf("transfer result %X %d", status, length); | 499 | logf("transfer result for ep %d/%d %X %d", ep,dir,status, length); |
500 | switch(state) { | 500 | switch(state) { |
501 | case RECEIVING_BLOCKS: | 501 | case RECEIVING_BLOCKS: |
502 | if(dir==USB_DIR_IN) { | 502 | if(dir==USB_DIR_IN) { |
@@ -580,6 +580,8 @@ void usb_storage_transfer_complete(int ep,int dir,int status,int length) | |||
580 | } | 580 | } |
581 | //logf("csw sent, now go back to idle"); | 581 | //logf("csw sent, now go back to idle"); |
582 | state = WAITING_FOR_COMMAND; | 582 | state = WAITING_FOR_COMMAND; |
583 | /* Already start waiting for the next command */ | ||
584 | usb_drv_recv(ep_out, cbw_buffer, 1024); | ||
583 | #if 0 | 585 | #if 0 |
584 | if(cur_cmd.cur_cmd == SCSI_WRITE_10) | 586 | if(cur_cmd.cur_cmd == SCSI_WRITE_10) |
585 | { | 587 | { |
@@ -1178,8 +1180,6 @@ static void send_csw(int status) | |||
1178 | sizeof(struct command_status_wrapper)); | 1180 | sizeof(struct command_status_wrapper)); |
1179 | state = SENDING_CSW; | 1181 | state = SENDING_CSW; |
1180 | //logf("CSW: %X",status); | 1182 | //logf("CSW: %X",status); |
1181 | /* Already start waiting for the next command */ | ||
1182 | usb_drv_recv(ep_out, cbw_buffer, 1024); | ||
1183 | 1183 | ||
1184 | if(status == UMS_STATUS_GOOD) { | 1184 | if(status == UMS_STATUS_GOOD) { |
1185 | cur_sense_data.sense_key=0; | 1185 | cur_sense_data.sense_key=0; |