aboutsummaryrefslogtreecommitdiff
path: root/src/hw
diff options
context:
space:
mode:
authorStefan Reiter <s.reiter@proxmox.com>2020-07-27 15:14:15 +0200
committerKevin O'Connor <kevin@koconnor.net>2020-07-28 11:35:59 -0400
commitf3ca59c6f3da0f30110ca216b072f8b602313734 (patch)
tree823496445217f96ba531bb11fe7577b6e6f4ccc5 /src/hw
parent699a4e5d6919cc8eae5342443025ceb6909dc276 (diff)
downloadseabios-hppa-f3ca59c6f3da0f30110ca216b072f8b602313734.zip
seabios-hppa-f3ca59c6f3da0f30110ca216b072f8b602313734.tar.gz
seabios-hppa-f3ca59c6f3da0f30110ca216b072f8b602313734.tar.bz2
virtio-scsi: fix boot prio detection by using correct lun
Commits d6bdb85eb0 virtio-scsi: skip initializing non-bootable devices f82e82a5ab2 virtio-mmio: add support for scsi devices. both use the lun value from tmpl_drv, which is always 0, instead of the correct one passed as a separate parameter. This causes systems where LUNs other than 0 are set as bootable, but 0 is not, to not boot. Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Diffstat (limited to 'src/hw')
-rw-r--r--src/hw/virtio-scsi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hw/virtio-scsi.c b/src/hw/virtio-scsi.c
index 59f1c65..369c981 100644
--- a/src/hw/virtio-scsi.c
+++ b/src/hw/virtio-scsi.c
@@ -126,14 +126,14 @@ virtio_scsi_add_lun(u32 lun, struct drive_s *tmpl_drv)
int prio = -1;
if (tmpl_vlun->pci)
- prio = bootprio_find_scsi_device(tmpl_vlun->pci, tmpl_vlun->target, tmpl_vlun->lun);
+ prio = bootprio_find_scsi_device(tmpl_vlun->pci, tmpl_vlun->target, lun);
if (tmpl_vlun->mmio)
- prio = bootprio_find_scsi_mmio_device(tmpl_vlun->mmio, tmpl_vlun->target, tmpl_vlun->lun);
+ prio = bootprio_find_scsi_mmio_device(tmpl_vlun->mmio, tmpl_vlun->target, lun);
if (skip_nonbootable && prio < 0) {
dprintf(1, "skipping init of a non-bootable virtio-scsi dev at %s,"
" target %d, lun %d\n",
- tmpl_vlun->name, tmpl_vlun->target, tmpl_vlun->lun);
+ tmpl_vlun->name, tmpl_vlun->target, lun);
return -1;
}