Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/dev/scsipi Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/dcabb41f80ea
branches:  netbsd-9
changeset: 964001:dcabb41f80ea
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jul 13 14:09:10 2020 +0000

description:
Pull up following revision(s) (requested by kim in ticket #1000):

        sys/dev/scsipi/scsiconf.c: revision 1.288

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 067910b9953f -r dcabb41f80ea sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Mon Jul 13 13:55:41 2020 +0000
+++ b/sys/dev/scsipi/scsiconf.c Mon Jul 13 14:09:10 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsiconf.c,v 1.284.4.1 2020/05/04 13:50:07 martin Exp $        */
+/*     $NetBSD: scsiconf.c,v 1.284.4.2 2020/07/13 14:09:10 martin 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.284.4.1 2020/05/04 13:50:07 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.284.4.2 2020/07/13 14:09:10 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -887,6 +887,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