From nobody Fri Apr 26 12:54:32 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=1595855679; cv=none; d=zohomail.com; s=zohoarc; b=N5F2EexgAqyAs67HucoH9Czg2oYuaf7Be2+96LiG4eMxqdBUCHeEWgS+6Kl+t5KnKfhO7lGZjvSVhlK/kvfsPVbG76cYmZkryE7fT50xIiISVWr50ThW78PDFF5hcjdeWrW9vyBsVCCaXPvaXRTN95FMJRgyHjM7KBlVWSF6ykE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595855679; 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=kJHTH5rRJPw95klMKsH6DO66ob9uz2smYh5Xe9AnBfM=; b=RFvZuHjSvlbM+vVXhxYn1s44uMAE08oA0AaPBMO3udYqCOLO80SauEWjZg/0hSEeesDOoxhDXbQURTGQf4lUyG5eyGVzXnr6+Z75VmVTL+kGgVo5jZM0pmnH6GkAR9Yf8C0PE34ZSNYe+60RnhdAJJMSwr04T86QA3ari6CeM/8= 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 15958556798391001.9176486636535; Mon, 27 Jul 2020 06:14:39 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 0D11E10C0028; Mon, 27 Jul 2020 13:14:36 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id A376610C001D for ; Mon, 27 Jul 2020 13:14:24 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 319A843212 for ; Mon, 27 Jul 2020 15:14:24 +0200 (CEST) From: Stefan Reiter To: seabios@seabios.org Date: Mon, 27 Jul 2020 15:14:15 +0200 Message-Id: <20200727131415.9916-1-s.reiter@proxmox.com> MIME-Version: 1.0 X-Spam-Level: ** Message-ID-Hash: KGCQ365YQPKFIY3XBDZ2KYZ32VWXGDCB X-Message-ID-Hash: KGCQ365YQPKFIY3XBDZ2KYZ32VWXGDCB 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 v2] 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 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 Signed-off-by: Stefan Reiter --- v2: * sep*a*rate :) * collect Paul's R-b 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