From nobody Tue Apr 16 06:26:25 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org ARC-Seal: i=1; a=rsa-sha256; t=1595854115; cv=none; d=zohomail.com; s=zohoarc; b=YmqIw1vH2VQrEnQLxUsq+Z2GnkLEASfwhlElK3fDQzBv38GodURz7vM6VGKciGpIZoSuB5sWtobFuScasJVguOmZeDln3gNtZOOFPS2DX7yHGH6hsM2quTLLuzQi9n3ztw/KLcVsVSDtnJmBQlWm5JFohI6ahUUIhBjLbWiti/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595854115; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Subject:To; bh=MGPrWmsyJY2JDmPuG1gTuvTsgdljyAoINFQkHWgeGW4=; b=DnyAAPOQ5y5rI0/00aSn7I3pdoZXZxjuXaKPDIKOb7TQ8ruZ5moNiThMR584nvZHHP7VBu1Xeogx4Cm8eLMTLsYzFetfdHqtw2i/w4XbffLz9Ldugu4IpTuENbo+8DsIVb3lojySAfxddZ6AjL5B2+snO/hOqG6PPtgyk6Iylm8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1595854115373797.0194508570502; Mon, 27 Jul 2020 05:48:35 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id A583210C0023; Mon, 27 Jul 2020 12:48:30 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id B19E210C001D for ; Mon, 27 Jul 2020 12:48:13 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 436B543384 for ; Mon, 27 Jul 2020 14:48:13 +0200 (CEST) From: Stefan Reiter To: seabios@seabios.org Date: Mon, 27 Jul 2020 14:47:54 +0200 Message-Id: <20200727124754.18743-1-s.reiter@proxmox.com> MIME-Version: 1.0 X-Spam-Level: ** Message-ID-Hash: 2BSJNODWSCKWIARIKJOZ2YTMUPZMJEKB X-Message-ID-Hash: 2BSJNODWSCKWIARIKJOZ2YTMUPZMJEKB X-MailFrom: s.reiter@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.3.2b1 Precedence: list Subject: [SeaBIOS] [PATCH] virtio-scsi: fix boot prio detection by using correct lun List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: -- Content-Type: text/plain; charset="utf-8" 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 seperate parameter. This causes systems where LUNs other than 0 are set as bootable, but 0 is not, to not boot. Signed-off-by: Stefan Reiter Reviewed-by: Paul Menzel --- src/hw/virtio-scsi.c | 6 +++--- 1 file 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 =3D -1; =20 if (tmpl_vlun->pci) - prio =3D bootprio_find_scsi_device(tmpl_vlun->pci, tmpl_vlun->targ= et, tmpl_vlun->lun); + prio =3D bootprio_find_scsi_device(tmpl_vlun->pci, tmpl_vlun->targ= et, lun); if (tmpl_vlun->mmio) - prio =3D bootprio_find_scsi_mmio_device(tmpl_vlun->mmio, tmpl_vlun= ->target, tmpl_vlun->lun); + prio =3D bootprio_find_scsi_mmio_device(tmpl_vlun->mmio, tmpl_vlun= ->target, lun); =20 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; } =20 --=20 2.20.1 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org