scsi: mpt3sas: Set valid PhysicalPort in SMPPassThrough
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Tue, 27 Oct 2020 13:08:42 +0000 (18:38 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 4 Nov 2020 23:42:24 +0000 (18:42 -0500)
commit9d0348a9d8e35142b809d0b92534312a22f6fd78
treeaa96d43c58fdf4b9670f8057ccb9f8effa55516a
parenta5e99fda017218516d3c66bec5ed346283ae722b
scsi: mpt3sas: Set valid PhysicalPort in SMPPassThrough

The driver currently sets PhysicalPort field to 0xFF for SMPPassthrough
Request message. In zoning topologies this SMPPassthrough command always
operates on devices in one zone (default zone) even when user issues SMP
command for other zone drives.

Define _transport_get_port_id_by_rphy() and
_transport_get_port_id_by_sas_phy() helper functions to get Physical Port
number from sas_rphy & sas_phy respectively for SMPPassthrough request
message so that SMP Passthrough request message is sent to intended zone
device.

Link: https://lore.kernel.org/r/20201027130847.9962-10-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.h
drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/mpt3sas/mpt3sas_transport.c