summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorYong-Feng Du <Yongfeng.Du@Sun.COM>2010-04-23 08:27:31 +0800
committerYong-Feng Du <Yongfeng.Du@Sun.COM>2010-04-23 08:27:31 +0800
commit72d45d7c47585a500156b2a8b58166492ca73287 (patch)
tree665734cb6ce459d54587aaf892a7d5007c7ef945 /usr/src
parentc5ee59282e4c7a78396a16122a3696fbcf9befd0 (diff)
downloadillumos-joyent-72d45d7c47585a500156b2a8b58166492ca73287.tar.gz
6923197 mpt_sas driver should create the phy number property to help locate the disk
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas.c b/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas.c
index ea6383a50a..3d7f47c3bd 100644
--- a/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas.c
+++ b/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas.c
@@ -14208,6 +14208,17 @@ mptsas_create_virt_lun(dev_info_t *pdip, struct scsi_inquiry *inq, char *guid,
goto virt_create_done;
}
}
+ /*
+ * Create the phy-num property
+ */
+ if (mdi_prop_update_int(*pip, "phy-num",
+ ptgt->m_phynum) != DDI_SUCCESS) {
+ mptsas_log(mpt, CE_WARN, "mptsas driver unable to "
+ "create phy-num property for target %d lun %d",
+ target, lun);
+ mdi_rtn = MDI_FAILURE;
+ goto virt_create_done;
+ }
NDBG20(("new path:%s onlining,", MDI_PI(*pip)->pi_addr));
mdi_rtn = mdi_pi_online(*pip, 0);
if (mdi_rtn == MDI_SUCCESS) {
@@ -14540,7 +14551,20 @@ mptsas_create_phys_lun(dev_info_t *pdip, struct scsi_inquiry *inq,
goto phys_create_done;
}
}
-
+ /*
+ * Create the phy-num property for non-raid disk
+ */
+ if (ptgt->m_phymask != 0) {
+ if (ndi_prop_update_int(DDI_DEV_T_NONE,
+ *lun_dip, "phy-num", ptgt->m_phynum) !=
+ DDI_PROP_SUCCESS) {
+ mptsas_log(mpt, CE_WARN, "mptsas driver "
+ "failed to create phy-num property for "
+ "target %d", target);
+ ndi_rtn = NDI_FAILURE;
+ goto phys_create_done;
+ }
+ }
phys_create_done:
/*
* If props were setup ok, online the lun