diff options
author | Jayamohan Kallickal <jayamohank@gmail.com> | 2013-09-28 18:35:53 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-10-25 04:58:08 -0400 |
commit | d3fea9af00fc69f60a792f5e0ea1e51fabd7c633 (patch) | |
tree | dd399288230f2d2f122cb0fc43c3e808f1e564ac /drivers/scsi/be2iscsi | |
parent | 6103c1f7c750b701cca4662b1c0dc66c2dc49dad (diff) |
[SCSI] be2iscsi: Display Port Identifier for each iSCSI function
Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi')
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.c | 2 | ||||
-rw-r--r-- | drivers/scsi/be2iscsi/be_mgmt.c | 19 | ||||
-rw-r--r-- | drivers/scsi/be2iscsi/be_mgmt.h | 3 |
3 files changed, 24 insertions, 0 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 005ea62c3369..de948d36fb15 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c | |||
@@ -154,6 +154,7 @@ BEISCSI_RW_ATTR(log_enable, 0x00, | |||
154 | DEVICE_ATTR(beiscsi_drvr_ver, S_IRUGO, beiscsi_drvr_ver_disp, NULL); | 154 | DEVICE_ATTR(beiscsi_drvr_ver, S_IRUGO, beiscsi_drvr_ver_disp, NULL); |
155 | DEVICE_ATTR(beiscsi_adapter_family, S_IRUGO, beiscsi_adap_family_disp, NULL); | 155 | DEVICE_ATTR(beiscsi_adapter_family, S_IRUGO, beiscsi_adap_family_disp, NULL); |
156 | DEVICE_ATTR(beiscsi_fw_ver, S_IRUGO, beiscsi_fw_ver_disp, NULL); | 156 | DEVICE_ATTR(beiscsi_fw_ver, S_IRUGO, beiscsi_fw_ver_disp, NULL); |
157 | DEVICE_ATTR(beiscsi_phys_port, S_IRUGO, beiscsi_phys_port_disp, NULL); | ||
157 | DEVICE_ATTR(beiscsi_active_session_count, S_IRUGO, | 158 | DEVICE_ATTR(beiscsi_active_session_count, S_IRUGO, |
158 | beiscsi_active_session_disp, NULL); | 159 | beiscsi_active_session_disp, NULL); |
159 | DEVICE_ATTR(beiscsi_free_session_count, S_IRUGO, | 160 | DEVICE_ATTR(beiscsi_free_session_count, S_IRUGO, |
@@ -165,6 +166,7 @@ struct device_attribute *beiscsi_attrs[] = { | |||
165 | &dev_attr_beiscsi_fw_ver, | 166 | &dev_attr_beiscsi_fw_ver, |
166 | &dev_attr_beiscsi_active_session_count, | 167 | &dev_attr_beiscsi_active_session_count, |
167 | &dev_attr_beiscsi_free_session_count, | 168 | &dev_attr_beiscsi_free_session_count, |
169 | &dev_attr_beiscsi_phys_port, | ||
168 | NULL, | 170 | NULL, |
169 | }; | 171 | }; |
170 | 172 | ||
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index 896e21f6047f..7b0b13f69b69 100644 --- a/drivers/scsi/be2iscsi/be_mgmt.c +++ b/drivers/scsi/be2iscsi/be_mgmt.c | |||
@@ -1445,6 +1445,25 @@ beiscsi_adap_family_disp(struct device *dev, struct device_attribute *attr, | |||
1445 | } | 1445 | } |
1446 | } | 1446 | } |
1447 | 1447 | ||
1448 | /** | ||
1449 | * beiscsi_phys_port()- Display Physical Port Identifier | ||
1450 | * @dev: ptr to device not used. | ||
1451 | * @attr: device attribute, not used. | ||
1452 | * @buf: contains formatted text port identifier | ||
1453 | * | ||
1454 | * return | ||
1455 | * size of the formatted string | ||
1456 | **/ | ||
1457 | ssize_t | ||
1458 | beiscsi_phys_port_disp(struct device *dev, struct device_attribute *attr, | ||
1459 | char *buf) | ||
1460 | { | ||
1461 | struct Scsi_Host *shost = class_to_shost(dev); | ||
1462 | struct beiscsi_hba *phba = iscsi_host_priv(shost); | ||
1463 | |||
1464 | return snprintf(buf, PAGE_SIZE, "Port Identifier : %d\n", | ||
1465 | phba->fw_config.phys_port); | ||
1466 | } | ||
1448 | 1467 | ||
1449 | void beiscsi_offload_cxn_v0(struct beiscsi_offload_params *params, | 1468 | void beiscsi_offload_cxn_v0(struct beiscsi_offload_params *params, |
1450 | struct wrb_handle *pwrb_handle, | 1469 | struct wrb_handle *pwrb_handle, |
diff --git a/drivers/scsi/be2iscsi/be_mgmt.h b/drivers/scsi/be2iscsi/be_mgmt.h index 9107ecf84ab2..645e144622c9 100644 --- a/drivers/scsi/be2iscsi/be_mgmt.h +++ b/drivers/scsi/be2iscsi/be_mgmt.h | |||
@@ -325,6 +325,9 @@ ssize_t beiscsi_adap_family_disp(struct device *dev, | |||
325 | ssize_t beiscsi_free_session_disp(struct device *dev, | 325 | ssize_t beiscsi_free_session_disp(struct device *dev, |
326 | struct device_attribute *attr, char *buf); | 326 | struct device_attribute *attr, char *buf); |
327 | 327 | ||
328 | ssize_t beiscsi_phys_port_disp(struct device *dev, | ||
329 | struct device_attribute *attr, char *buf); | ||
330 | |||
328 | void beiscsi_offload_cxn_v0(struct beiscsi_offload_params *params, | 331 | void beiscsi_offload_cxn_v0(struct beiscsi_offload_params *params, |
329 | struct wrb_handle *pwrb_handle, | 332 | struct wrb_handle *pwrb_handle, |
330 | struct be_mem_descriptor *mem_descr); | 333 | struct be_mem_descriptor *mem_descr); |