Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci We no need for PQUIRK_FORCELUNS now that we try ...



details:   https://anonhg.NetBSD.org/src/rev/1f2e33d15599
branches:  trunk
changeset: 359854:1f2e33d15599
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Thu Jan 27 18:38:07 2022 +0000

description:
We no need for PQUIRK_FORCELUNS now that we try REPORT LUNS.

diffstat:

 sys/dev/pci/vioscsi.c |  25 +++++--------------------
 1 files changed, 5 insertions(+), 20 deletions(-)

diffs (47 lines):

diff -r 24ee1129f568 -r 1f2e33d15599 sys/dev/pci/vioscsi.c
--- a/sys/dev/pci/vioscsi.c     Thu Jan 27 18:37:02 2022 +0000
+++ b/sys/dev/pci/vioscsi.c     Thu Jan 27 18:38:07 2022 +0000
@@ -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 @@
        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;



Home | Main Index | Thread Index | Old Index