Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Probe all LUNs on vioscsi(4) until scsi(4) can d...



details:   https://anonhg.NetBSD.org/src/rev/b25d2331e9b8
branches:  trunk
changeset: 955093:b25d2331e9b8
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Fri Sep 18 14:55:28 2020 +0000

description:
Probe all LUNs on vioscsi(4) until scsi(4) can do REPORT LUNS.

diffstat:

 sys/dev/pci/vioscsi.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 1678dac6d65c -r b25d2331e9b8 sys/dev/pci/vioscsi.c
--- a/sys/dev/pci/vioscsi.c     Fri Sep 18 14:19:34 2020 +0000
+++ b/sys/dev/pci/vioscsi.c     Fri Sep 18 14:55:28 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vioscsi.c,v 1.22 2020/07/12 06:40:11 kim Exp $ */
+/*     $NetBSD: vioscsi.c,v 1.23 2020/09/18 14:55:28 jakllsch Exp $    */
 /*     $OpenBSD: vioscsi.c,v 1.3 2015/03/14 03:38:49 jsg Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.22 2020/07/12 06:40:11 kim Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.23 2020/09/18 14:55:28 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -196,6 +196,13 @@
        chan->chan_nluns = MIN(max_lun, 1024);          /* cap reasonably */
        chan->chan_id = max_target;
        chan->chan_flags = SCSIPI_CHAN_NOSETTLE;
+       /*
+        * XXX Remove this when scsipi is REPORT LUNS-aware.
+        * scsipi(4) insists that LUNs must be contiguous starting from 0.
+        * This is not true on Linode (circa 2020) and Proxmox 6 hosts
+        * with more than one disk exported to guest.
+        */
+       chan->chan_defquirks = PQUIRK_FORCELUNS;
 
        config_found(self, &sc->sc_channel, scsiprint);
        return;



Home | Main Index | Thread Index | Old Index