[SCSI] mpt2sas: Set the phy identifier of the end device to the phy number of the...
authornagalakshmi.nandigama@lsi.com <nagalakshmi.nandigama@lsi.com>
Tue, 20 Mar 2012 06:38:40 +0000 (12:08 +0530)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 23 Apr 2012 18:27:38 +0000 (19:27 +0100)
The phy_identifier inside the routine _transport_set_identify()
is set to sas_device_page_zero->PhyNum. This returns the
phy number of the parent device this device is linked to.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/mpt2sas/mpt2sas_transport.c

index 865deb9a5e5a92fd3bef2459839b7d74f23f4485..c6cf20f60720bfc6dd2a59b96fe951ae6139c48a 100644 (file)
@@ -169,6 +169,9 @@ _transport_set_identify(struct MPT2SAS_ADAPTER *ioc, u16 handle,
        /* sas_address */
        identify->sas_address = le64_to_cpu(sas_device_pg0.SASAddress);
 
+       /* phy number of the parent device this device is linked to */
+       identify->phy_identifier = sas_device_pg0.PhyNum;
+
        /* device_type */
        switch (device_info & MPI2_SAS_DEVICE_INFO_MASK_DEVICE_TYPE) {
        case MPI2_SAS_DEVICE_INFO_NO_DEVICE: