aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
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
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')
-rw-r--r--drivers/scsi/lpfc/lpfc.h3
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c46
-rw-r--r--drivers/scsi/lpfc/lpfc_bsg.c9
-rw-r--r--drivers/scsi/lpfc/lpfc_compat.h3
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_hw.h26
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c53
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c8
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c29
9 files changed, 128 insertions, 51 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 3482d5a5aed2..a50aa03b8ac1 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -775,6 +775,7 @@ struct lpfc_hba {
775 uint8_t temp_sensor_support; 775 uint8_t temp_sensor_support;
776 /* Fields used for heart beat. */ 776 /* Fields used for heart beat. */
777 unsigned long last_completion_time; 777 unsigned long last_completion_time;
778 unsigned long skipped_hb;
778 struct timer_list hb_tmofunc; 779 struct timer_list hb_tmofunc;
779 uint8_t hb_outstanding; 780 uint8_t hb_outstanding;
780 enum hba_temp_state over_temp_state; 781 enum hba_temp_state over_temp_state;
@@ -817,6 +818,8 @@ struct lpfc_hba {
817 uint32_t iocb_cnt; 818 uint32_t iocb_cnt;
818 uint32_t iocb_max; 819 uint32_t iocb_max;
819 atomic_t sdev_cnt; 820 atomic_t sdev_cnt;
821 uint8_t fips_spec_rev;
822 uint8_t fips_level;
820}; 823};
821 824
822static inline struct Scsi_Host * 825static inline struct Scsi_Host *
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
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index d521569e6620..49d0cf99c24c 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -2724,15 +2724,6 @@ lpfc_bsg_issue_mbox(struct lpfc_hba *phba, struct fc_bsg_job *job,
2724 2724
2725 pmboxq->context2 = ext; 2725 pmboxq->context2 = ext;
2726 pmboxq->in_ext_byte_len = 2726 pmboxq->in_ext_byte_len =
2727 mbox_req->inExtWLen *
2728 sizeof(uint32_t);
2729 pmboxq->out_ext_byte_len =
2730 mbox_req->outExtWLen *
2731 sizeof(uint32_t);
2732 pmboxq->mbox_offset_word =
2733 mbox_req->mbOffset;
2734 pmboxq->context2 = ext;
2735 pmboxq->in_ext_byte_len =
2736 mbox_req->inExtWLen * sizeof(uint32_t); 2727 mbox_req->inExtWLen * sizeof(uint32_t);
2737 pmboxq->out_ext_byte_len = 2728 pmboxq->out_ext_byte_len =
2738 mbox_req->outExtWLen * sizeof(uint32_t); 2729 mbox_req->outExtWLen * sizeof(uint32_t);
diff --git a/drivers/scsi/lpfc/lpfc_compat.h b/drivers/scsi/lpfc/lpfc_compat.h
index a11f1ae7b98e..75e2e569dede 100644
--- a/drivers/scsi/lpfc/lpfc_compat.h
+++ b/drivers/scsi/lpfc/lpfc_compat.h
@@ -82,8 +82,7 @@ lpfc_memcpy_from_slim( void *dest, void __iomem *src, unsigned int bytes)
82static inline void 82static inline void
83lpfc_memcpy_to_slim( void __iomem *dest, void *src, unsigned int bytes) 83lpfc_memcpy_to_slim( void __iomem *dest, void *src, unsigned int bytes)
84{ 84{
85 /* actually returns 1 byte past dest */ 85 __iowrite32_copy(dest, src, bytes);
86 memcpy_toio( dest, src, bytes);
87} 86}
88 87
89static inline void 88static inline void
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 0639c994349c..efba65b368a8 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -588,7 +588,7 @@ lpfc_work_done(struct lpfc_hba *phba)
588 (status & 588 (status &
589 HA_RXMASK)); 589 HA_RXMASK));
590 } 590 }
591 if (pring->txq_cnt) 591 if ((phba->sli_rev == LPFC_SLI_REV4) && pring->txq_cnt)
592 lpfc_drain_txq(phba); 592 lpfc_drain_txq(phba);
593 /* 593 /*
594 * Turn on Ring interrupts 594 * Turn on Ring interrupts
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
index f5dbf2be3eab..897caa05e94d 100644
--- a/drivers/scsi/lpfc/lpfc_hw.h
+++ b/drivers/scsi/lpfc/lpfc_hw.h
@@ -2806,11 +2806,15 @@ typedef struct {
2806 uint32_t rsvd6; /* Reserved */ 2806 uint32_t rsvd6; /* Reserved */
2807 2807
2808#ifdef __BIG_ENDIAN_BITFIELD 2808#ifdef __BIG_ENDIAN_BITFIELD
2809 uint32_t rsvd7 : 16; /* Reserved */ 2809 uint32_t fips_rev : 3; /* FIPS Spec Revision */
2810 uint32_t fips_level : 4; /* FIPS Level */
2811 uint32_t sec_err : 9; /* security crypto error */
2810 uint32_t max_vpi : 16; /* Max number of virt N-Ports */ 2812 uint32_t max_vpi : 16; /* Max number of virt N-Ports */
2811#else /* __LITTLE_ENDIAN */ 2813#else /* __LITTLE_ENDIAN */
2812 uint32_t max_vpi : 16; /* Max number of virt N-Ports */ 2814 uint32_t max_vpi : 16; /* Max number of virt N-Ports */
2813 uint32_t rsvd7 : 16; /* Reserved */ 2815 uint32_t sec_err : 9; /* security crypto error */
2816 uint32_t fips_level : 4; /* FIPS Level */
2817 uint32_t fips_rev : 3; /* FIPS Spec Revision */
2814#endif 2818#endif
2815 2819
2816} CONFIG_PORT_VAR; 2820} CONFIG_PORT_VAR;
@@ -3441,63 +3445,63 @@ struct sli3_bg_fields {
3441static inline uint32_t 3445static inline uint32_t
3442lpfc_bgs_get_bidir_bg_prof(uint32_t bgstat) 3446lpfc_bgs_get_bidir_bg_prof(uint32_t bgstat)
3443{ 3447{
3444 return (le32_to_cpu(bgstat) & BGS_BIDIR_BG_PROF_MASK) >> 3448 return (bgstat & BGS_BIDIR_BG_PROF_MASK) >>
3445 BGS_BIDIR_BG_PROF_SHIFT; 3449 BGS_BIDIR_BG_PROF_SHIFT;
3446} 3450}
3447 3451
3448static inline uint32_t 3452static inline uint32_t
3449lpfc_bgs_get_bidir_err_cond(uint32_t bgstat) 3453lpfc_bgs_get_bidir_err_cond(uint32_t bgstat)
3450{ 3454{
3451 return (le32_to_cpu(bgstat) & BGS_BIDIR_ERR_COND_FLAGS_MASK) >> 3455 return (bgstat & BGS_BIDIR_ERR_COND_FLAGS_MASK) >>
3452 BGS_BIDIR_ERR_COND_SHIFT; 3456 BGS_BIDIR_ERR_COND_SHIFT;
3453} 3457}
3454 3458
3455static inline uint32_t 3459static inline uint32_t
3456lpfc_bgs_get_bg_prof(uint32_t bgstat) 3460lpfc_bgs_get_bg_prof(uint32_t bgstat)
3457{ 3461{
3458 return (le32_to_cpu(bgstat) & BGS_BG_PROFILE_MASK) >> 3462 return (bgstat & BGS_BG_PROFILE_MASK) >>
3459 BGS_BG_PROFILE_SHIFT; 3463 BGS_BG_PROFILE_SHIFT;
3460} 3464}
3461 3465
3462static inline uint32_t 3466static inline uint32_t
3463lpfc_bgs_get_invalid_prof(uint32_t bgstat) 3467lpfc_bgs_get_invalid_prof(uint32_t bgstat)
3464{ 3468{
3465 return (le32_to_cpu(bgstat) & BGS_INVALID_PROF_MASK) >> 3469 return (bgstat & BGS_INVALID_PROF_MASK) >>
3466 BGS_INVALID_PROF_SHIFT; 3470 BGS_INVALID_PROF_SHIFT;
3467} 3471}
3468 3472
3469static inline uint32_t 3473static inline uint32_t
3470lpfc_bgs_get_uninit_dif_block(uint32_t bgstat) 3474lpfc_bgs_get_uninit_dif_block(uint32_t bgstat)
3471{ 3475{
3472 return (le32_to_cpu(bgstat) & BGS_UNINIT_DIF_BLOCK_MASK) >> 3476 return (bgstat & BGS_UNINIT_DIF_BLOCK_MASK) >>
3473 BGS_UNINIT_DIF_BLOCK_SHIFT; 3477 BGS_UNINIT_DIF_BLOCK_SHIFT;
3474} 3478}
3475 3479
3476static inline uint32_t 3480static inline uint32_t
3477lpfc_bgs_get_hi_water_mark_present(uint32_t bgstat) 3481lpfc_bgs_get_hi_water_mark_present(uint32_t bgstat)
3478{ 3482{
3479 return (le32_to_cpu(bgstat) & BGS_HI_WATER_MARK_PRESENT_MASK) >> 3483 return (bgstat & BGS_HI_WATER_MARK_PRESENT_MASK) >>
3480 BGS_HI_WATER_MARK_PRESENT_SHIFT; 3484 BGS_HI_WATER_MARK_PRESENT_SHIFT;
3481} 3485}
3482 3486
3483static inline uint32_t 3487static inline uint32_t
3484lpfc_bgs_get_reftag_err(uint32_t bgstat) 3488lpfc_bgs_get_reftag_err(uint32_t bgstat)
3485{ 3489{
3486 return (le32_to_cpu(bgstat) & BGS_REFTAG_ERR_MASK) >> 3490 return (bgstat & BGS_REFTAG_ERR_MASK) >>
3487 BGS_REFTAG_ERR_SHIFT; 3491 BGS_REFTAG_ERR_SHIFT;
3488} 3492}
3489 3493
3490static inline uint32_t 3494static inline uint32_t
3491lpfc_bgs_get_apptag_err(uint32_t bgstat) 3495lpfc_bgs_get_apptag_err(uint32_t bgstat)
3492{ 3496{
3493 return (le32_to_cpu(bgstat) & BGS_APPTAG_ERR_MASK) >> 3497 return (bgstat & BGS_APPTAG_ERR_MASK) >>
3494 BGS_APPTAG_ERR_SHIFT; 3498 BGS_APPTAG_ERR_SHIFT;
3495} 3499}
3496 3500
3497static inline uint32_t 3501static inline uint32_t
3498lpfc_bgs_get_guard_err(uint32_t bgstat) 3502lpfc_bgs_get_guard_err(uint32_t bgstat)
3499{ 3503{
3500 return (le32_to_cpu(bgstat) & BGS_GUARD_ERR_MASK) >> 3504 return (bgstat & BGS_GUARD_ERR_MASK) >>
3501 BGS_GUARD_ERR_SHIFT; 3505 BGS_GUARD_ERR_SHIFT;
3502} 3506}
3503 3507
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 2786ee3b605d..9244aa64b3be 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -1032,27 +1032,46 @@ lpfc_hb_timeout_handler(struct lpfc_hba *phba)
1032 /* If there is no heart beat outstanding, issue a heartbeat command */ 1032 /* If there is no heart beat outstanding, issue a heartbeat command */
1033 if (phba->cfg_enable_hba_heartbeat) { 1033 if (phba->cfg_enable_hba_heartbeat) {
1034 if (!phba->hb_outstanding) { 1034 if (!phba->hb_outstanding) {
1035 pmboxq = mempool_alloc(phba->mbox_mem_pool,GFP_KERNEL); 1035 if ((!(psli->sli_flag & LPFC_SLI_MBOX_ACTIVE)) &&
1036 if (!pmboxq) { 1036 (list_empty(&psli->mboxq))) {
1037 mod_timer(&phba->hb_tmofunc, 1037 pmboxq = mempool_alloc(phba->mbox_mem_pool,
1038 jiffies + HZ * LPFC_HB_MBOX_INTERVAL); 1038 GFP_KERNEL);
1039 return; 1039 if (!pmboxq) {
1040 } 1040 mod_timer(&phba->hb_tmofunc,
1041 jiffies +
1042 HZ * LPFC_HB_MBOX_INTERVAL);
1043 return;
1044 }
1041 1045
1042 lpfc_heart_beat(phba, pmboxq); 1046 lpfc_heart_beat(phba, pmboxq);
1043 pmboxq->mbox_cmpl = lpfc_hb_mbox_cmpl; 1047 pmboxq->mbox_cmpl = lpfc_hb_mbox_cmpl;
1044 pmboxq->vport = phba->pport; 1048 pmboxq->vport = phba->pport;
1045 retval = lpfc_sli_issue_mbox(phba, pmboxq, MBX_NOWAIT); 1049 retval = lpfc_sli_issue_mbox(phba, pmboxq,
1050 MBX_NOWAIT);
1051
1052 if (retval != MBX_BUSY &&
1053 retval != MBX_SUCCESS) {
1054 mempool_free(pmboxq,
1055 phba->mbox_mem_pool);
1056 mod_timer(&phba->hb_tmofunc,
1057 jiffies +
1058 HZ * LPFC_HB_MBOX_INTERVAL);
1059 return;
1060 }
1061 phba->skipped_hb = 0;
1062 phba->hb_outstanding = 1;
1063 } else if (time_before_eq(phba->last_completion_time,
1064 phba->skipped_hb)) {
1065 lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
1066 "2857 Last completion time not "
1067 " updated in %d ms\n",
1068 jiffies_to_msecs(jiffies
1069 - phba->last_completion_time));
1070 } else
1071 phba->skipped_hb = jiffies;
1046 1072
1047 if (retval != MBX_BUSY && retval != MBX_SUCCESS) {
1048 mempool_free(pmboxq, phba->mbox_mem_pool);
1049 mod_timer(&phba->hb_tmofunc,
1050 jiffies + HZ * LPFC_HB_MBOX_INTERVAL);
1051 return;
1052 }
1053 mod_timer(&phba->hb_tmofunc, 1073 mod_timer(&phba->hb_tmofunc,
1054 jiffies + HZ * LPFC_HB_MBOX_TIMEOUT); 1074 jiffies + HZ * LPFC_HB_MBOX_TIMEOUT);
1055 phba->hb_outstanding = 1;
1056 return; 1075 return;
1057 } else { 1076 } else {
1058 /* 1077 /*
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index c818a7255962..2e51aa6b45b3 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -1325,7 +1325,7 @@ lpfc_bg_setup_bpl(struct lpfc_hba *phba, struct scsi_cmnd *sc,
1325 bf_set(pde5_type, pde5, LPFC_PDE5_DESCRIPTOR); 1325 bf_set(pde5_type, pde5, LPFC_PDE5_DESCRIPTOR);
1326 pde5->reftag = reftag; 1326 pde5->reftag = reftag;
1327 1327
1328 /* Endian convertion if necessary for PDE5 */ 1328 /* Endianness conversion if necessary for PDE5 */
1329 pde5->word0 = cpu_to_le32(pde5->word0); 1329 pde5->word0 = cpu_to_le32(pde5->word0);
1330 pde5->reftag = cpu_to_le32(pde5->reftag); 1330 pde5->reftag = cpu_to_le32(pde5->reftag);
1331 1331
@@ -1347,7 +1347,7 @@ lpfc_bg_setup_bpl(struct lpfc_hba *phba, struct scsi_cmnd *sc,
1347 bf_set(pde6_ai, pde6, 1); 1347 bf_set(pde6_ai, pde6, 1);
1348 bf_set(pde6_apptagval, pde6, apptagval); 1348 bf_set(pde6_apptagval, pde6, apptagval);
1349 1349
1350 /* Endian convertion if necessary for PDE6 */ 1350 /* Endianness conversion if necessary for PDE6 */
1351 pde6->word0 = cpu_to_le32(pde6->word0); 1351 pde6->word0 = cpu_to_le32(pde6->word0);
1352 pde6->word1 = cpu_to_le32(pde6->word1); 1352 pde6->word1 = cpu_to_le32(pde6->word1);
1353 pde6->word2 = cpu_to_le32(pde6->word2); 1353 pde6->word2 = cpu_to_le32(pde6->word2);
@@ -1459,7 +1459,7 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,
1459 bf_set(pde5_type, pde5, LPFC_PDE5_DESCRIPTOR); 1459 bf_set(pde5_type, pde5, LPFC_PDE5_DESCRIPTOR);
1460 pde5->reftag = reftag; 1460 pde5->reftag = reftag;
1461 1461
1462 /* Endian convertion if necessary for PDE5 */ 1462 /* Endianness conversion if necessary for PDE5 */
1463 pde5->word0 = cpu_to_le32(pde5->word0); 1463 pde5->word0 = cpu_to_le32(pde5->word0);
1464 pde5->reftag = cpu_to_le32(pde5->reftag); 1464 pde5->reftag = cpu_to_le32(pde5->reftag);
1465 1465
@@ -1479,7 +1479,7 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,
1479 bf_set(pde6_ai, pde6, 1); 1479 bf_set(pde6_ai, pde6, 1);
1480 bf_set(pde6_apptagval, pde6, apptagval); 1480 bf_set(pde6_apptagval, pde6, apptagval);
1481 1481
1482 /* Endian convertion if necessary for PDE6 */ 1482 /* Endianness conversion if necessary for PDE6 */
1483 pde6->word0 = cpu_to_le32(pde6->word0); 1483 pde6->word0 = cpu_to_le32(pde6->word0);
1484 pde6->word1 = cpu_to_le32(pde6->word1); 1484 pde6->word1 = cpu_to_le32(pde6->word1);
1485 pde6->word2 = cpu_to_le32(pde6->word2); 1485 pde6->word2 = cpu_to_le32(pde6->word2);
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index e758eae0d0fd..0ce9eb7ca4ee 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -1046,7 +1046,7 @@ lpfc_sli_next_iotag(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
1046 } else 1046 } else
1047 spin_unlock_irq(&phba->hbalock); 1047 spin_unlock_irq(&phba->hbalock);
1048 1048
1049 lpfc_printf_log(phba, KERN_ERR,LOG_SLI, 1049 lpfc_printf_log(phba, KERN_WARNING, LOG_SLI,
1050 "0318 Failed to allocate IOTAG.last IOTAG is %d\n", 1050 "0318 Failed to allocate IOTAG.last IOTAG is %d\n",
1051 psli->last_iotag); 1051 psli->last_iotag);
1052 1052
@@ -3914,7 +3914,8 @@ lpfc_sli_config_port(struct lpfc_hba *phba, int sli_mode)
3914 phba->sli3_options &= ~(LPFC_SLI3_NPIV_ENABLED | 3914 phba->sli3_options &= ~(LPFC_SLI3_NPIV_ENABLED |
3915 LPFC_SLI3_HBQ_ENABLED | 3915 LPFC_SLI3_HBQ_ENABLED |
3916 LPFC_SLI3_CRP_ENABLED | 3916 LPFC_SLI3_CRP_ENABLED |
3917 LPFC_SLI3_BG_ENABLED); 3917 LPFC_SLI3_BG_ENABLED |
3918 LPFC_SLI3_DSS_ENABLED);
3918 if (rc != MBX_SUCCESS) { 3919 if (rc != MBX_SUCCESS) {
3919 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, 3920 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
3920 "0442 Adapter failed to init, mbxCmd x%x " 3921 "0442 Adapter failed to init, mbxCmd x%x "
@@ -3949,8 +3950,23 @@ lpfc_sli_config_port(struct lpfc_hba *phba, int sli_mode)
3949 3950
3950 } else 3951 } else
3951 phba->max_vpi = 0; 3952 phba->max_vpi = 0;
3952 if (pmb->u.mb.un.varCfgPort.gdss) 3953 phba->fips_level = 0;
3954 phba->fips_spec_rev = 0;
3955 if (pmb->u.mb.un.varCfgPort.gdss) {
3953 phba->sli3_options |= LPFC_SLI3_DSS_ENABLED; 3956 phba->sli3_options |= LPFC_SLI3_DSS_ENABLED;
3957 phba->fips_level = pmb->u.mb.un.varCfgPort.fips_level;
3958 phba->fips_spec_rev = pmb->u.mb.un.varCfgPort.fips_rev;
3959 lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
3960 "2850 Security Crypto Active. FIPS x%d "
3961 "(Spec Rev: x%d)",
3962 phba->fips_level, phba->fips_spec_rev);
3963 }
3964 if (pmb->u.mb.un.varCfgPort.sec_err) {
3965 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
3966 "2856 Config Port Security Crypto "
3967 "Error: x%x ",
3968 pmb->u.mb.un.varCfgPort.sec_err);
3969 }
3954 if (pmb->u.mb.un.varCfgPort.gerbm) 3970 if (pmb->u.mb.un.varCfgPort.gerbm)
3955 phba->sli3_options |= LPFC_SLI3_HBQ_ENABLED; 3971 phba->sli3_options |= LPFC_SLI3_HBQ_ENABLED;
3956 if (pmb->u.mb.un.varCfgPort.gcrp) 3972 if (pmb->u.mb.un.varCfgPort.gcrp)
@@ -9040,6 +9056,7 @@ lpfc_sli4_sp_handle_cqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
9040 switch (bf_get(lpfc_cqe_code, &cqevt)) { 9056 switch (bf_get(lpfc_cqe_code, &cqevt)) {
9041 case CQE_CODE_COMPL_WQE: 9057 case CQE_CODE_COMPL_WQE:
9042 /* Process the WQ/RQ complete event */ 9058 /* Process the WQ/RQ complete event */
9059 phba->last_completion_time = jiffies;
9043 workposted = lpfc_sli4_sp_handle_els_wcqe(phba, 9060 workposted = lpfc_sli4_sp_handle_els_wcqe(phba,
9044 (struct lpfc_wcqe_complete *)&cqevt); 9061 (struct lpfc_wcqe_complete *)&cqevt);
9045 break; 9062 break;
@@ -9050,11 +9067,13 @@ lpfc_sli4_sp_handle_cqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
9050 break; 9067 break;
9051 case CQE_CODE_XRI_ABORTED: 9068 case CQE_CODE_XRI_ABORTED:
9052 /* Process the WQ XRI abort event */ 9069 /* Process the WQ XRI abort event */
9070 phba->last_completion_time = jiffies;
9053 workposted = lpfc_sli4_sp_handle_abort_xri_wcqe(phba, cq, 9071 workposted = lpfc_sli4_sp_handle_abort_xri_wcqe(phba, cq,
9054 (struct sli4_wcqe_xri_aborted *)&cqevt); 9072 (struct sli4_wcqe_xri_aborted *)&cqevt);
9055 break; 9073 break;
9056 case CQE_CODE_RECEIVE: 9074 case CQE_CODE_RECEIVE:
9057 /* Process the RQ event */ 9075 /* Process the RQ event */
9076 phba->last_completion_time = jiffies;
9058 workposted = lpfc_sli4_sp_handle_rcqe(phba, 9077 workposted = lpfc_sli4_sp_handle_rcqe(phba,
9059 (struct lpfc_rcqe *)&cqevt); 9078 (struct lpfc_rcqe *)&cqevt);
9060 break; 9079 break;
@@ -9276,7 +9295,6 @@ lpfc_sli4_fp_handle_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
9276{ 9295{
9277 struct lpfc_wcqe_release wcqe; 9296 struct lpfc_wcqe_release wcqe;
9278 bool workposted = false; 9297 bool workposted = false;
9279 unsigned long iflag;
9280 9298
9281 /* Copy the work queue CQE and convert endian order if needed */ 9299 /* Copy the work queue CQE and convert endian order if needed */
9282 lpfc_sli_pcimem_bcopy(cqe, &wcqe, sizeof(struct lpfc_cqe)); 9300 lpfc_sli_pcimem_bcopy(cqe, &wcqe, sizeof(struct lpfc_cqe));
@@ -9285,9 +9303,7 @@ lpfc_sli4_fp_handle_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
9285 switch (bf_get(lpfc_wcqe_c_code, &wcqe)) { 9303 switch (bf_get(lpfc_wcqe_c_code, &wcqe)) {
9286 case CQE_CODE_COMPL_WQE: 9304 case CQE_CODE_COMPL_WQE:
9287 /* Process the WQ complete event */ 9305 /* Process the WQ complete event */
9288 spin_lock_irqsave(&phba->hbalock, iflag);
9289 phba->last_completion_time = jiffies; 9306 phba->last_completion_time = jiffies;
9290 spin_unlock_irqrestore(&phba->hbalock, iflag);
9291 lpfc_sli4_fp_handle_fcp_wcqe(phba, 9307 lpfc_sli4_fp_handle_fcp_wcqe(phba,
9292 (struct lpfc_wcqe_complete *)&wcqe); 9308 (struct lpfc_wcqe_complete *)&wcqe);
9293 break; 9309 break;
@@ -9298,6 +9314,7 @@ lpfc_sli4_fp_handle_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
9298 break; 9314 break;
9299 case CQE_CODE_XRI_ABORTED: 9315 case CQE_CODE_XRI_ABORTED:
9300 /* Process the WQ XRI abort event */ 9316 /* Process the WQ XRI abort event */
9317 phba->last_completion_time = jiffies;
9301 workposted = lpfc_sli4_sp_handle_abort_xri_wcqe(phba, cq, 9318 workposted = lpfc_sli4_sp_handle_abort_xri_wcqe(phba, cq,
9302 (struct sli4_wcqe_xri_aborted *)&wcqe); 9319 (struct sli4_wcqe_xri_aborted *)&wcqe);
9303 break; 9320 break;