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) {