aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_attr.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2010-08-04 16:11:18 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-08-06 13:09:24 -0400
commitbc73905abf7701920fe687564ecd3c6b316b9a2e (patch)
tree7657fb517f7a604d8e330adbd93eacf6097aafff /drivers/scsi/lpfc/lpfc_attr.c
parent823d219f23b958292279cfdc8583dc4f1f91c2d5 (diff)
[SCSI] lpfc 8.3.16: SLI Additions, updates, and code cleanup
- Remove unneeded Endian swap for Block Guard IOCB response - Add a check for mailbox active before issuing the heartbeat command - Correct heartbeat last_completion updates to avoid unneeded heartbeats - Add Security crypto support to CONFIG_PORT mailbox command - Add fips level and fips spec revision sysfs parameters - Remove duplicate setting of ext_byte_len fields in lpfc_bsg_issue_mbox - Switch call to memcpy_toio to __write32_copy to prevent unaligned 64 bit copy - Change log message 0318 from an error to a warning as it is not an error - Patch an incorrect call to lpfc_drain_txq on SLI-3 functions Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c46
1 files changed, 45 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 868874c28f99..fac26e4445f9 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -1239,6 +1239,44 @@ lpfc_poll_store(struct device *dev, struct device_attribute *attr,
1239} 1239}
1240 1240
1241/** 1241/**
1242 * lpfc_fips_level_show - Return the current FIPS level for the HBA
1243 * @dev: class unused variable.
1244 * @attr: device attribute, not used.
1245 * @buf: on return contains the module description text.
1246 *
1247 * Returns: size of formatted string.
1248 **/
1249static ssize_t
1250lpfc_fips_level_show(struct device *dev, struct device_attribute *attr,
1251 char *buf)
1252{
1253 struct Scsi_Host *shost = class_to_shost(dev);
1254 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
1255 struct lpfc_hba *phba = vport->phba;
1256
1257 return snprintf(buf, PAGE_SIZE, "%d\n", phba->fips_level);
1258}
1259
1260/**
1261 * lpfc_fips_rev_show - Return the FIPS Spec revision for the HBA
1262 * @dev: class unused variable.
1263 * @attr: device attribute, not used.
1264 * @buf: on return contains the module description text.
1265 *
1266 * Returns: size of formatted string.
1267 **/
1268static ssize_t
1269lpfc_fips_rev_show(struct device *dev, struct device_attribute *attr,
1270 char *buf)
1271{
1272 struct Scsi_Host *shost = class_to_shost(dev);
1273 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
1274 struct lpfc_hba *phba = vport->phba;
1275
1276 return snprintf(buf, PAGE_SIZE, "%d\n", phba->fips_spec_rev);
1277}
1278
1279/**
1242 * lpfc_param_show - Return a cfg attribute value in decimal 1280 * lpfc_param_show - Return a cfg attribute value in decimal
1243 * 1281 *
1244 * Description: 1282 * Description:
@@ -1676,6 +1714,8 @@ static DEVICE_ATTR(max_xri, S_IRUGO, lpfc_max_xri_show, NULL);
1676static DEVICE_ATTR(used_xri, S_IRUGO, lpfc_used_xri_show, NULL); 1714static DEVICE_ATTR(used_xri, S_IRUGO, lpfc_used_xri_show, NULL);
1677static DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL); 1715static DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL);
1678static DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show, NULL); 1716static DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show, NULL);
1717static DEVICE_ATTR(lpfc_fips_level, S_IRUGO, lpfc_fips_level_show, NULL);
1718static DEVICE_ATTR(lpfc_fips_rev, S_IRUGO, lpfc_fips_rev_show, NULL);
1679 1719
1680 1720
1681static char *lpfc_soft_wwn_key = "C99G71SL8032A"; 1721static char *lpfc_soft_wwn_key = "C99G71SL8032A";
@@ -3280,7 +3320,7 @@ LPFC_ATTR_R(enable_bg, 0, 0, 1, "Enable BlockGuard Support");
3280# - Default will result in registering capabilities for all profiles. 3320# - Default will result in registering capabilities for all profiles.
3281# 3321#
3282*/ 3322*/
3283unsigned int lpfc_prot_mask = SHOST_DIX_TYPE0_PROTECTION; 3323unsigned int lpfc_prot_mask = SHOST_DIF_TYPE1_PROTECTION;
3284 3324
3285module_param(lpfc_prot_mask, uint, 0); 3325module_param(lpfc_prot_mask, uint, 0);
3286MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask"); 3326MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask");
@@ -3385,6 +3425,8 @@ struct device_attribute *lpfc_hba_attrs[] = {
3385 &dev_attr_iocb_hw, 3425 &dev_attr_iocb_hw,
3386 &dev_attr_txq_hw, 3426 &dev_attr_txq_hw,
3387 &dev_attr_txcmplq_hw, 3427 &dev_attr_txcmplq_hw,
3428 &dev_attr_lpfc_fips_level,
3429 &dev_attr_lpfc_fips_rev,
3388 NULL, 3430 NULL,
3389}; 3431};
3390 3432
@@ -3411,6 +3453,8 @@ struct device_attribute *lpfc_vport_attrs[] = {
3411 &dev_attr_lpfc_max_scsicmpl_time, 3453 &dev_attr_lpfc_max_scsicmpl_time,
3412 &dev_attr_lpfc_stat_data_ctrl, 3454 &dev_attr_lpfc_stat_data_ctrl,
3413 &dev_attr_lpfc_static_vport, 3455 &dev_attr_lpfc_static_vport,
3456 &dev_attr_lpfc_fips_level,
3457 &dev_attr_lpfc_fips_rev,
3414 NULL, 3458 NULL,
3415}; 3459};
3416 3460