[OpenBIOS] [PATCH] ESP : TEST_UNIT_READY SCSI command length
Olivier DANET
odanet at caramail.com
Mon Jan 14 22:26:28 CET 2013
[PATCH] ESP : TEST_UNIT_READY SCSI command length
"TEST UNIT READY" is a 6 bytes SCSI command (00h/LUN/reserved/reserved/reserved/Control) and
it is preceded by a IDENTIFY (0x80) message_out byte. the ESP transfer size is therefore 7 bytes.
diff a/openbios-devel/drivers/esp.c b/openbios-devel/drivers/esp.c
--- a/openbios-devel/drivers/esp.c
+++ b/openbios-devel/drivers/esp.c
@@ -197,11 +197,11 @@ static unsigned int
test_unit_ready(esp_private_t *esp, sd_private_t *sd)
{
/* Setup command = Test Unit Ready */
- memset(esp->buffer, 0, 6);
+ memset(esp->buffer, 0, 7);
esp->buffer[0] = 0x80;
esp->buffer[1] = TEST_UNIT_READY;
- if (do_command(esp, sd, 6, 0)) {
+ if (do_command(esp, sd, 7, 0)) {
DPRINTF("test_unit_ready id %d failed\n", sd->id);
return 0;
}
Signed-off-by: Olivier DANET <odanet at caramail.com>
More information about the OpenBIOS
mailing list