Module Name: src
Committed By: jakllsch
Date: Fri Sep 18 14:55:28 UTC 2020
Modified Files:
src/sys/dev/pci: vioscsi.c
Log Message:
Probe all LUNs on vioscsi(4) until scsi(4) can do REPORT LUNS.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/vioscsi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/vioscsi.c
diff -u src/sys/dev/pci/vioscsi.c:1.22 src/sys/dev/pci/vioscsi.c:1.23
--- src/sys/dev/pci/vioscsi.c:1.22 Sun Jul 12 06:40:11 2020
+++ src/sys/dev/pci/vioscsi.c Fri Sep 18 14:55:28 2020
@@ -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 @@ vioscsi_attach(device_t parent, device_t
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;