X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/7f9f97c792dee6875fbca9806422bdd7d6c5a657..c58c53dba90fdc19d38f5e5d6957f2ede2a740f3:/Projects/Incomplete/StandaloneProgrammer/DiskHost.c diff --git a/Projects/Incomplete/StandaloneProgrammer/DiskHost.c b/Projects/Incomplete/StandaloneProgrammer/DiskHost.c index ef69df2c6..e50fc30af 100644 --- a/Projects/Incomplete/StandaloneProgrammer/DiskHost.c +++ b/Projects/Incomplete/StandaloneProgrammer/DiskHost.c @@ -79,8 +79,6 @@ void DiskHost_USBTask(void) return; } - USB_HostState = HOST_STATE_Configured; - uint8_t MaxLUNIndex; if (MS_Host_GetMaxLUN(&DiskHost_MS_Interface, &MaxLUNIndex)) { @@ -96,6 +94,10 @@ void DiskHost_USBTask(void) return; } + USB_HostState = HOST_STATE_Configured; + + /* Note: For the RequestSense call to work, the host state machine must be in the + * Configured state, or the call will be aborted */ SCSI_Request_Sense_Response_t SenseData; if (MS_Host_RequestSense(&DiskHost_MS_Interface, 0, &SenseData) != 0) {