summaryrefslogtreecommitdiff
path: root/drivers/scsi/be2iscsi/be_mgmt.c
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohank@gmail.com>2013-04-06 03:38:28 (GMT)
committerJames Bottomley <JBottomley@Parallels.com>2013-05-02 15:10:11 (GMT)
commit22661e25cca8bb780f79756e7a7e201b478f8c14 (patch)
tree0bfd3f90706e83fd5caf49a8271fd38117176806 /drivers/scsi/be2iscsi/be_mgmt.c
parentef9e1b9bdca82d9b692da77e35595c2d4b87a4b5 (diff)
downloadlinux-fsl-qoriq-22661e25cca8bb780f79756e7a7e201b478f8c14.tar.xz
[SCSI] be2iscsi: Fix displaying the FW Version from driver.
The mgmt_hba_attributes structure declared was not proper and because of that the FW response returned for the MBX_CMD was not matching. This issue went unnoticed as mgmt_hba_attribs structure members were never used in the code path. This fix of displaying the FW version had to change the mgmt_hba_attrib structure also. The latest driver will also work with the older FW as the issue was in the driver declaration. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_mgmt.c')
-rw-r--r--drivers/scsi/be2iscsi/be_mgmt.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index 55cc990..02bad04 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -368,6 +368,8 @@ int mgmt_check_supported_fw(struct be_ctrl_info *ctrl,
beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
"BM_%d : phba->fw_config.iscsi_features = %d\n",
phba->fw_config.iscsi_features);
+ memcpy(phba->fw_ver_str, resp->params.hba_attribs.
+ firmware_version_string, BEISCSI_VER_STRLEN);
} else
beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
"BG_%d : Failed in mgmt_check_supported_fw\n");
@@ -1260,6 +1262,25 @@ beiscsi_drvr_ver_disp(struct device *dev, struct device_attribute *attr,
}
/**
+ * beiscsi_fw_ver_disp()- Display Firmware Version
+ * @dev: ptr to device not used.
+ * @attr: device attribute, not used.
+ * @buf: contains formatted text Firmware version
+ *
+ * return
+ * size of the formatted string
+ **/
+ssize_t
+beiscsi_fw_ver_disp(struct device *dev, struct device_attribute *attr,
+ char *buf)
+{
+ struct Scsi_Host *shost = class_to_shost(dev);
+ struct beiscsi_hba *phba = iscsi_host_priv(shost);
+
+ return snprintf(buf, PAGE_SIZE, "%s\n", phba->fw_ver_str);
+}
+
+/**
* beiscsi_adap_family_disp()- Display adapter family.
* @dev: ptr to device to get priv structure
* @attr: device attribute, not used.