At least some USB drives with a write protect switch (e.g. Netac U335) could report "MEDIUM NOT PRESENT" for a while if a write protect is enabled. Do not stop the initialization attempts after getting this, and the initialization will be successful - likely on a 2nd attempt.
Signed-off-by: Mike Banon <mikebdp2 at gmail.com> --- Note: see a seabios.log at the attachments for a relevant part of SeaBIOS boot log with this patch applied and Netac U335 drive ("USB MSC Drive Netac OnlyDisk 1100") with a write protect switch enabled plugged into AMD Lenovo G505S coreboot'ed laptop. --- diff --git a/src/hw/blockcmd.c b/src/hw/blockcmd.c index 1f15081..109a8e4 100644 --- a/src/hw/blockcmd.c +++ b/src/hw/blockcmd.c @@ -168,7 +168,6 @@ scsi_is_ready(struct disk_op_s *op) // Sense succeeded. if (sense.asc == 0x3a) { /* MEDIUM NOT PRESENT */ dprintf(1, "Device reports MEDIUM NOT PRESENT\n"); - return -1; } if (sense.asc == 0x04 && sense.ascq == 0x01 && !in_progress) {
diff --git a/src/hw/blockcmd.c b/src/hw/blockcmd.c index 1f15081..109a8e4 100644 --- a/src/hw/blockcmd.c +++ b/src/hw/blockcmd.c @@ -168,7 +168,6 @@ scsi_is_ready(struct disk_op_s *op) // Sense succeeded. if (sense.asc == 0x3a) { /* MEDIUM NOT PRESENT */ dprintf(1, "Device reports MEDIUM NOT PRESENT\n"); - return -1; } if (sense.asc == 0x04 && sense.ascq == 0x01 && !in_progress) {
|afc6d000| ohci_free_pipes 0xafc714f0 \afc6b000/ End thread \afc6c000/ End thread \afc6d000/ End thread |afc63000| ehci_send_pipe qh=0x000ed580 dir=128 data=0xafc63e28 size=13 |afc63000| USB MSC vendor='Netac' product='OnlyDisk' rev='1100' type=0 removable=1 |afc63000| scsi_is_ready (drive=0x000f5580) |afc63000| ehci_send_pipe qh=0x000ed500 dir=0 data=0xafc63df9 size=31 |afc63000| ehci_send_pipe qh=0x000ed580 dir=128 data=0xafc63dec size=13 |afc63000| ehci_send_pipe qh=0x000ed500 dir=0 data=0xafc63df9 size=31 |afc63000| ehci_send_pipe qh=0x000ed580 dir=128 data=0xafc63e7e size=18 |afc63000| ehci_send_pipe qh=0x000ed580 dir=128 data=0xafc63dec size=13 |afc63000| Device reports MEDIUM NOT PRESENT |afc63000| ehci_send_pipe qh=0x000ed500 dir=0 data=0xafc63df9 size=31 |afc63000| ehci_send_pipe qh=0x000ed580 dir=128 data=0xafc63dec size=13 |afc63000| ehci_send_pipe qh=0x000ed500 dir=0 data=0xafc63df9 size=31 |afc63000| ehci_send_pipe qh=0x000ed580 dir=128 data=0xafc63e7e size=18 |afc63000| ehci_send_pipe qh=0x000ed580 dir=128 data=0xafc63dec size=13 |afc63000| ehci_send_pipe qh=0x000ed500 dir=0 data=0xafc63df9 size=31 |afc63000| ehci_send_pipe qh=0x000ed580 dir=128 data=0xafc63dec size=13 |afc63000| ehci_send_pipe qh=0x000ed500 dir=0 data=0xafc63e35 size=31 |afc63000| ehci_send_pipe qh=0x000ed580 dir=128 data=0xafc63eb6 size=8 |afc63000| ehci_send_pipe qh=0x000ed580 dir=128 data=0xafc63e28 size=13 |afc63000| USB MSC blksize=512 sectors=31244288 |afc63000| Registering bootable: USB MSC Drive Netac OnlyDisk 1100 (type:2 prio:103 data:f5580) \afc63000/ End thread |afc6e000| ehci_free_pipes 0xafc71600 \afc6e000/ End thread All threads complete. Scan for option roms
_______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-le...@seabios.org