Module Name: src
Committed By: jakllsch
Date: Thu Jan 27 18:38:07 UTC 2022
Modified Files:
src/sys/dev/pci: vioscsi.c
Log Message:
We no need for PQUIRK_FORCELUNS now that we try REPORT LUNS.
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 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.28 src/sys/dev/pci/vioscsi.c:1.29
--- src/sys/dev/pci/vioscsi.c:1.28 Fri Nov 12 07:18:53 2021
+++ src/sys/dev/pci/vioscsi.c Thu Jan 27 18:38:07 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: vioscsi.c,v 1.28 2021/11/12 07:18:53 skrll Exp $ */
+/* $NetBSD: vioscsi.c,v 1.29 2022/01/27 18:38:07 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.28 2021/11/12 07:18:53 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.29 2022/01/27 18:38:07 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -192,25 +192,10 @@ vioscsi_attach(device_t parent, device_t
chan->chan_adapter = adapt;
chan->chan_bustype = &scsi_bustype;
chan->chan_channel = 0;
- chan->chan_ntargets = MIN(max_target, 16); /* cap reasonably */
- chan->chan_nluns = MIN(max_lun, 1024); /* cap reasonably */
- chan->chan_id = max_target;
+ chan->chan_ntargets = MIN(1 + max_target, 256); /* cap reasonably */
+ chan->chan_nluns = MIN(1 + max_lun, 16384); /* cap reasonably */
+ chan->chan_id = max_target + 1;
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).
- *
- * Also if explicitly selecting the 'Virtio SCSI Single'
- * controller (which is not the default SCSI controller) on
- * Proxmox hosts, each disk will be on its own scsi bus at
- * target 0 but unexpectedly on a LUN matching the drive number
- * on the system (i.e. drive 0 will be bus 0, target 0, lun
- * 0; drive 1 will be bus 1, target 0, lun 1, drive 2 will be
- * bus 2, target 0, lun 2 -- which is where the gaps start
- * happening). https://bugzilla.proxmox.com/show_bug.cgi?id=2985
- */
- chan->chan_defquirks = PQUIRK_FORCELUNS;
config_found(self, &sc->sc_channel, scsiprint, CFARGS_NONE);
return;