Skip to contentSkip to conversation

mpi3mr:Fix duplicate device entries when scan through sysfs

PATCH RESEND Applied Sreekanth Reddy 2 participants 2 messages Oct 14, 2021 – Oct 19, 2021

Subsystems (2)
lore
Share & tools
lore

Sreekanth Reddy

author maintainer
#0 lore raw

PATCH RESEND 1/1 mpi3mr:Fix duplicate device entries when scan through sysfs

When the user scans the devices through 'scan' sysfs using below command then the user will observe duplicate device entries in lsscsi command output.
echo "- - -" > /sys/class/scsi_host/host0/scan

Fix is to set the shost's max_channel to zero.

Fixes 824a156633df ("scsi: mpi3mr: Base driver code")
---
 drivers/scsi/mpi3mr/mpi3mr_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mpi3mr/mpi3mr_os.c +1 -1
index 2197988333fe..3cae8803383b 100644
@@ -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)
Signature · 1 line
2.27.0
#1 lore raw
Quoted 8 lines · Sreekanth Reddy

When the user scans the devices through 'scan' sysfs using below command then the user will observe duplicate device entries in lsscsi command output.
echo "- - -" > /sys/class/scsi_host/host0/scan

Fix is to set the shost's max_channel to zero.

[...]

Applied to 5.15/scsi-fixes, thanks!

[1/1] mpi3mr:Fix duplicate device entries when scan through sysfs

      https://git.kernel.org/mkp/scsi/c/97e6ea6d7806
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering