]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
scsi: mpt3sas: Get sas_device objects using device's rphy
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Tue, 27 Oct 2020 13:08:40 +0000 (18:38 +0530)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 18 Jan 2021 16:26:12 +0000 (17:26 +0100)
commit62884aefdef0f09bc2b19f62d5725c3351ce223b
tree76e25364988e5a0f7060d6a29fac60ccefb57944
parent10b5439991e0a00395d3b2544370a648453e9306
scsi: mpt3sas: Get sas_device objects using device's rphy

BugLink: https://bugs.launchpad.net/bugs/1899802
In the following scsi_host_template and sas_function_template callback
functions the driver does not have PhysicalPort number information to
retrieve the sas_device object using SAS Address & PhysicalPort number. In
these callback functions the device's rphy object is used to retrieve
sas_device object for the device.

.target_alloc,
.get_enclosure_identifier
.get_bay_identifier

When a rphy (of type sas_rphy) object is allocated then its address is
saved in corresponding sas_device object's rphy field. In
__mpt3sas_get_sdev_by_rphy(), the driver loops over all the sas_device
objects from sas_device_list list to retrieve the sas_device objects whose
rphy matches the provided rphy.

Link: https://lore.kernel.org/r/20201027130847.9962-8-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 6df6be9168f50369ba843f2a12fe8537effbaff1)
Signed-off-by: Michael Reed <Michael.Reed@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
drivers/scsi/mpt3sas/mpt3sas_base.h
drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/mpt3sas/mpt3sas_transport.c