Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/8fb8dd0e3a82
branches:  netbsd-8
changeset: 935935:8fb8dd0e3a82
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jul 13 14:10:25 2020 +0000

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

        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 688406e123af -r 8fb8dd0e3a82 sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Mon Jul 13 13:58:31 2020 +0000
+++ b/sys/dev/scsipi/scsiconf.c Mon Jul 13 14:10:25 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsiconf.c,v 1.279.6.1 2017/06/21 18:18:55 snj Exp $   */
+/*     $NetBSD: scsiconf.c,v 1.279.6.2 2020/07/13 14:10:25 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.279.6.1 2017/06/21 18:18:55 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.279.6.2 2020/07/13 14:10:25 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -869,6 +869,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