]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
scsi: mpi3mr: Fix duplicate device entries when scanning through sysfs
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Thu, 14 Oct 2021 05:54:25 +0000 (11:24 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 17 Oct 2021 02:16:37 +0000 (22:16 -0400)
When scanning devices through the 'scan' attribute in sysfs, the user will
observe duplicate device entries in lsscsi command output.

Set the shost's max_channel to zero to avoid this.

Link: https://lore.kernel.org/r/20211014055425.30719-1-sreekanth.reddy@broadcom.com
Fixes: 824a156633df ("scsi: mpi3mr: Base driver code")
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpi3mr/mpi3mr_os.c

index 2197988333fe5c170bfb2ae7cf7488c0f01e8633..3cae8803383b6cbb9970dc8e541646fb1f6f0bf9 100644 (file)
@@ -3736,7 +3736,7 @@ mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        shost->max_lun = -1;
        shost->unique_id = mrioc->id;
 
-       shost->max_channel = 1;
+       shost->max_channel = 0;
        shost->max_id = 0xFFFFFFFF;
 
        if (prot_mask >= 0)