Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/scsipi Continue scanning a SCSI bus when a LUN is re...
details: https://anonhg.NetBSD.org/src/rev/a7749a35e59e
branches: trunk
changeset: 935864:a7749a35e59e
user: kim <kim%NetBSD.org@localhost>
date: Sat Jul 11 14:31:46 2020 +0000
description:
Continue scanning a SCSI bus when a LUN is reported not present
This fixes disk attachment under Qemu when there is no disk on LUN 0 on
a SCSI bus but there is a disk on LUN 1. The inquiry for LUN 0 returns
SID_QUAL_LU_NOTPRESENT & T_NODEVICE. Quirks are only checked if neither
one of those are set, so cannot use a quirk entry.
Use case 1: Proxmox 6 configures each disk on its own bus when using
the "Virtio SCSI single" SCSI controller. However, while the "scsi0"
disk is on LUN 0, the "scsi1" disk is on LUN 1.
Use case 2: A Linode boot profile with multiple disks results in
the first disk ("sda") on LUN 1, while the second disk ("sdb") is
on LUN 0, each on their own bus.
diffstat:
sys/dev/scsipi/scsiconf.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 65ae72d00140 -r a7749a35e59e sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Sat Jul 11 13:07:01 2020 +0000
+++ b/sys/dev/scsipi/scsiconf.c Sat Jul 11 14:31:46 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.c,v 1.287 2020/05/02 06:45:53 jdc Exp $ */
+/* $NetBSD: scsiconf.c,v 1.288 2020/07/11 14:31:46 kim Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.287 2020/05/02 06:45:53 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.288 2020/07/11 14:31:46 kim Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -883,6 +883,8 @@
break;
case SID_QUAL_LU_NOTPRESENT:
+ docontinue = 1;
+ /* FALLTHROUGH */
case SID_QUAL_reserved:
case SID_QUAL_LU_NOT_SUPP:
goto bad;
Home |
Main Index |
Thread Index |
Old Index