Commit eff7be6
committed
scsi: mpi3mr: Fix NVMe ioctl handling for non-PCIe devices
The driver incorrectly allows NVMe ioctls on SAS/SATA devices because it
accesses dev_spec.pcie_inf.dev_info without first checking dev_type. For
SAS/SATA devices, the dev_spec union contains sas_sata_inf data, but the
driver reads it as pcie_inf, misinterpreting the data and potentially
matching the NVMe type check, causing NVME_IOCTL_ID to incorrectly
return 1 (SUCCESS) instead of -EINVAL. The only place Jeff is able to
reproduce this is M60 Active controller where sedutil-cli --scan were
showing NVMe identify error for SAS disks on 9600 HBA. Add a dev_type
check to ensure only PCIe devices proceed with NVMe ioctl handling.
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>1 parent ebc45eb commit eff7be6
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5584 | 5584 | | |
5585 | 5585 | | |
5586 | 5586 | | |
| 5587 | + | |
| 5588 | + | |
| 5589 | + | |
5587 | 5590 | | |
5588 | 5591 | | |
5589 | 5592 | | |
| |||
0 commit comments