aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/mpt3sas/mpt3sas_base.c
diff options
context:
space:
mode:
authorSuganath Prabu <suganath-prabu.subramani@broadcom.com>2019-08-03 09:59:50 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2019-08-07 22:46:19 -0400
commit5bb309dbbbf2157786004201eb70dafd283b54b5 (patch)
treea50b84d24175631b5648cc7567eebc00bb98645b /drivers/scsi/mpt3sas/mpt3sas_base.c
parent635ee6c73034ea4488a8e26bb0d0291d83146863 (diff)
scsi: mpt3sas: Enumerate SES of a managed PCIe switch
SES device of managed PCIe switch will be enumerated same as NVMe drives. The device info type for this SES device is MPI26_PCIE_DEVINFO_SCSI (0x4), whereas the device info type for NVMe drives is MPI26_PCIE_DEVINFO_NVME (0x3). Based on this device info type driver determines whether the device is NVMe drive or a SES device of a managed PCIe switch. This SES device doesn't have the PCIe device page 2 information like NVMe drives, so driver won't read PCIe device page 2 information for SES device. This SES device uses only IEEE SGL's, So driver build's IEEE SGL's whenever it receives any SCSI commands for this SES device. Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpt3sas/mpt3sas_base.c')
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_base.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index f72933cc6622..44d19cb6b069 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -2260,6 +2260,11 @@ base_is_prp_possible(struct MPT3SAS_ADAPTER *ioc,
bool build_prp = true;
data_length = scsi_bufflen(scmd);
+ if (pcie_device &&
+ (mpt3sas_scsih_is_pcie_scsi_device(pcie_device->device_info))) {
+ build_prp = false;
+ return build_prp;
+ }
/* If Datalenth is <= 16K and number of SGE’s entries are <= 2
* we built IEEE SGL