aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be_mgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/be2iscsi/be_mgmt.c')
-rw-r--r--drivers/scsi/be2iscsi/be_mgmt.c43
1 files changed, 42 insertions, 1 deletions
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index 55cc9902263d..245a9595a93a 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -1,5 +1,5 @@
1/** 1/**
2 * Copyright (C) 2005 - 2012 Emulex 2 * Copyright (C) 2005 - 2013 Emulex
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * This program is free software; you can redistribute it and/or 5 * This program is free software; you can redistribute it and/or
@@ -368,6 +368,8 @@ int mgmt_check_supported_fw(struct be_ctrl_info *ctrl,
368 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT, 368 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
369 "BM_%d : phba->fw_config.iscsi_features = %d\n", 369 "BM_%d : phba->fw_config.iscsi_features = %d\n",
370 phba->fw_config.iscsi_features); 370 phba->fw_config.iscsi_features);
371 memcpy(phba->fw_ver_str, resp->params.hba_attribs.
372 firmware_version_string, BEISCSI_VER_STRLEN);
371 } else 373 } else
372 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, 374 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
373 "BG_%d : Failed in mgmt_check_supported_fw\n"); 375 "BG_%d : Failed in mgmt_check_supported_fw\n");
@@ -1260,6 +1262,45 @@ beiscsi_drvr_ver_disp(struct device *dev, struct device_attribute *attr,
1260} 1262}
1261 1263
1262/** 1264/**
1265 * beiscsi_fw_ver_disp()- Display Firmware Version
1266 * @dev: ptr to device not used.
1267 * @attr: device attribute, not used.
1268 * @buf: contains formatted text Firmware version
1269 *
1270 * return
1271 * size of the formatted string
1272 **/
1273ssize_t
1274beiscsi_fw_ver_disp(struct device *dev, struct device_attribute *attr,
1275 char *buf)
1276{
1277 struct Scsi_Host *shost = class_to_shost(dev);
1278 struct beiscsi_hba *phba = iscsi_host_priv(shost);
1279
1280 return snprintf(buf, PAGE_SIZE, "%s\n", phba->fw_ver_str);
1281}
1282
1283/**
1284 * beiscsi_active_cid_disp()- Display Sessions Active
1285 * @dev: ptr to device not used.
1286 * @attr: device attribute, not used.
1287 * @buf: contains formatted text Session Count
1288 *
1289 * return
1290 * size of the formatted string
1291 **/
1292ssize_t
1293beiscsi_active_cid_disp(struct device *dev, struct device_attribute *attr,
1294 char *buf)
1295{
1296 struct Scsi_Host *shost = class_to_shost(dev);
1297 struct beiscsi_hba *phba = iscsi_host_priv(shost);
1298
1299 return snprintf(buf, PAGE_SIZE, "%d\n",
1300 (phba->params.cxns_per_ctrl - phba->avlbl_cids));
1301}
1302
1303/**
1263 * beiscsi_adap_family_disp()- Display adapter family. 1304 * beiscsi_adap_family_disp()- Display adapter family.
1264 * @dev: ptr to device to get priv structure 1305 * @dev: ptr to device to get priv structure
1265 * @attr: device attribute, not used. 1306 * @attr: device attribute, not used.