pc-bios/s390-ccw: Do not bail out early if not finding a SCSI disk

In case the user did not specify a boot device, we want to continue
looking for other devices if there are no valid SCSI disks on a virtio-
scsi controller. As a first step, do not panic in this case and let
the control flow carry the error to the upper functions instead.

Message-Id: <20200806105349.632-6-thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
Thomas Huth 2020-07-28 14:30:14 +02:00
parent d2cf4af1f4
commit 605751b5a5
5 changed files with 37 additions and 16 deletions

View file

@ -218,7 +218,7 @@ static void find_boot_device(void)
IPL_assert(found, "Boot device not found\n");
}
static void virtio_setup(void)
static int virtio_setup(void)
{
VDev *vdev = virtio_get_device();
QemuIplParameters *early_qipl = (QemuIplParameters *)QIPL_ADDRESS;
@ -233,9 +233,14 @@ static void virtio_setup(void)
sclp_print("Network boot device detected\n");
vdev->netboot_start_addr = qipl.netboot_start_addr;
} else {
virtio_blk_setup_device(blk_schid);
int ret = virtio_blk_setup_device(blk_schid);
if (ret) {
return ret;
}
IPL_assert(virtio_ipl_disk_is_valid(), "No valid IPL device detected");
}
return 0;
}
static void ipl_boot_device(void)
@ -246,8 +251,9 @@ static void ipl_boot_device(void)
dasd_ipl(blk_schid, cutype); /* no return */
break;
case CU_TYPE_VIRTIO:
virtio_setup();
zipl_load(); /* no return */
if (virtio_setup() == 0) {
zipl_load(); /* no return */
}
break;
default:
print_int("Attempting to boot from unexpected device type", cutype);