scsi: lpfc: Remove prototype FIPS/DSS options from SLI-3
authorJames Smart <jsmart2021@gmail.com>
Sun, 22 Mar 2020 18:13:03 +0000 (11:13 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 29 Mar 2020 22:10:58 +0000 (18:10 -0400)
During code review, identified dss feature that was a prototype only and
was never productized in SLI3. They shouldn't be there and prevents reuse
of the command areas.

Remove any code in the driver to deal with dss, including code to deal with
fips, which is associated with the dss feature.

Link: https://lore.kernel.org/r/20200322181304.37655-12-jsmart2021@gmail.com
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc.h
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_hw.h
drivers/scsi/lpfc/lpfc_mbox.c
drivers/scsi/lpfc/lpfc_sli.c

index 747eda6..8e2a356 100644 (file)
@@ -207,8 +207,7 @@ typedef struct lpfc_vpd {
        } rev;
        struct {
 #ifdef __BIG_ENDIAN_BITFIELD
-               uint32_t rsvd3  :19;  /* Reserved                             */
-               uint32_t cdss   : 1;  /* Configure Data Security SLI          */
+               uint32_t rsvd3  :20;  /* Reserved                             */
                uint32_t rsvd2  : 3;  /* Reserved                             */
                uint32_t cbg    : 1;  /* Configure BlockGuard                 */
                uint32_t cmv    : 1;  /* Configure Max VPIs                   */
@@ -230,8 +229,7 @@ typedef struct lpfc_vpd {
                uint32_t cmv    : 1;  /* Configure Max VPIs                   */
                uint32_t cbg    : 1;  /* Configure BlockGuard                 */
                uint32_t rsvd2  : 3;  /* Reserved                             */
-               uint32_t cdss   : 1;  /* Configure Data Security SLI          */
-               uint32_t rsvd3  :19;  /* Reserved                             */
+               uint32_t rsvd3  :20;  /* Reserved                             */
 #endif
        } sli3Feat;
 } lpfc_vpd_t;
@@ -887,7 +885,6 @@ struct lpfc_hba {
 #define LPFC_INITIALIZE_LINK              0    /* do normal init_link mbox */
 #define LPFC_DELAY_INIT_LINK              1    /* layered driver hold off */
 #define LPFC_DELAY_INIT_LINK_INDEFINITELY 2    /* wait, manual intervention */
-       uint32_t cfg_enable_dss;
        uint32_t cfg_fdmi_on;
 #define LPFC_FDMI_NO_SUPPORT   0       /* FDMI not supported */
 #define LPFC_FDMI_SUPPORT      1       /* FDMI supported? */
@@ -1156,8 +1153,6 @@ struct lpfc_hba {
        uint32_t iocb_cnt;
        uint32_t iocb_max;
        atomic_t sdev_cnt;
-       uint8_t fips_spec_rev;
-       uint8_t fips_level;
        spinlock_t devicelock;  /* lock for luns list */
        mempool_t *device_data_mem_pool;
        struct list_head luns;
index 4317c9c..3260e76 100644 (file)
@@ -2231,66 +2231,6 @@ lpfc_poll_store(struct device *dev, struct device_attribute *attr,
 }
 
 /**
- * lpfc_fips_level_show - Return the current FIPS level for the HBA
- * @dev: class unused variable.
- * @attr: device attribute, not used.
- * @buf: on return contains the module description text.
- *
- * Returns: size of formatted string.
- **/
-static ssize_t
-lpfc_fips_level_show(struct device *dev,  struct device_attribute *attr,
-                    char *buf)
-{
-       struct Scsi_Host  *shost = class_to_shost(dev);
-       struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
-       struct lpfc_hba   *phba = vport->phba;
-
-       return scnprintf(buf, PAGE_SIZE, "%d\n", phba->fips_level);
-}
-
-/**
- * lpfc_fips_rev_show - Return the FIPS Spec revision for the HBA
- * @dev: class unused variable.
- * @attr: device attribute, not used.
- * @buf: on return contains the module description text.
- *
- * Returns: size of formatted string.
- **/
-static ssize_t
-lpfc_fips_rev_show(struct device *dev,  struct device_attribute *attr,
-                  char *buf)
-{
-       struct Scsi_Host  *shost = class_to_shost(dev);
-       struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
-       struct lpfc_hba   *phba = vport->phba;
-
-       return scnprintf(buf, PAGE_SIZE, "%d\n", phba->fips_spec_rev);
-}
-
-/**
- * lpfc_dss_show - Return the current state of dss and the configured state
- * @dev: class converted to a Scsi_host structure.
- * @attr: device attribute, not used.
- * @buf: on return contains the formatted text.
- *
- * Returns: size of formatted string.
- **/
-static ssize_t
-lpfc_dss_show(struct device *dev, struct device_attribute *attr,
-             char *buf)
-{
-       struct Scsi_Host *shost = class_to_shost(dev);
-       struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
-       struct lpfc_hba   *phba = vport->phba;
-
-       return scnprintf(buf, PAGE_SIZE, "%s - %sOperational\n",
-                       (phba->cfg_enable_dss) ? "Enabled" : "Disabled",
-                       (phba->sli3_options & LPFC_SLI3_DSS_ENABLED) ?
-                               "" : "Not ");
-}
-
-/**
  * lpfc_sriov_hw_max_virtfn_show - Return maximum number of virtual functions
  * @dev: class converted to a Scsi_host structure.
  * @attr: device attribute, not used.
@@ -2705,9 +2645,6 @@ static DEVICE_ATTR(max_xri, S_IRUGO, lpfc_max_xri_show, NULL);
 static DEVICE_ATTR(used_xri, S_IRUGO, lpfc_used_xri_show, NULL);
 static DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL);
 static DEVICE_ATTR_RO(lpfc_temp_sensor);
-static DEVICE_ATTR_RO(lpfc_fips_level);
-static DEVICE_ATTR_RO(lpfc_fips_rev);
-static DEVICE_ATTR_RO(lpfc_dss);
 static DEVICE_ATTR_RO(lpfc_sriov_hw_max_virtfn);
 static DEVICE_ATTR(protocol, S_IRUGO, lpfc_sli4_protocol_show, NULL);
 static DEVICE_ATTR(lpfc_xlane_supported, S_IRUGO, lpfc_oas_supported_show,
@@ -6251,9 +6188,6 @@ struct device_attribute *lpfc_hba_attrs[] = {
        &dev_attr_pt,
        &dev_attr_txq_hw,
        &dev_attr_txcmplq_hw,
-       &dev_attr_lpfc_fips_level,
-       &dev_attr_lpfc_fips_rev,
-       &dev_attr_lpfc_dss,
        &dev_attr_lpfc_sriov_hw_max_virtfn,
        &dev_attr_protocol,
        &dev_attr_lpfc_xlane_supported,
@@ -6289,8 +6223,6 @@ struct device_attribute *lpfc_vport_attrs[] = {
        &dev_attr_lpfc_max_scsicmpl_time,
        &dev_attr_lpfc_stat_data_ctrl,
        &dev_attr_lpfc_static_vport,
-       &dev_attr_lpfc_fips_level,
-       &dev_attr_lpfc_fips_rev,
        NULL,
 };
 
@@ -7399,7 +7331,6 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
        lpfc_suppress_link_up_init(phba, lpfc_suppress_link_up);
        lpfc_delay_discovery_init(phba, lpfc_delay_discovery);
        lpfc_sli_mode_init(phba, lpfc_sli_mode);
-       phba->cfg_enable_dss = 1;
        lpfc_enable_mds_diags_init(phba, lpfc_enable_mds_diags);
        lpfc_ras_fwlog_buffsize_init(phba, lpfc_ras_fwlog_buffsize);
        lpfc_ras_fwlog_level_init(phba, lpfc_ras_fwlog_level);
index ae51c0d..c20034b 100644 (file)
@@ -3262,8 +3262,7 @@ typedef struct {
 #endif
 
 #ifdef __BIG_ENDIAN_BITFIELD
-       uint32_t rsvd1     : 19;  /* Reserved                             */
-       uint32_t cdss      :  1;  /* Configure Data Security SLI          */
+       uint32_t rsvd1     : 20;  /* Reserved                             */
        uint32_t casabt    :  1;  /* Configure async abts status notice   */
        uint32_t rsvd2     :  2;  /* Reserved                             */
        uint32_t cbg       :  1;  /* Configure BlockGuard                 */
@@ -3287,12 +3286,10 @@ typedef struct {
        uint32_t cbg       :  1;  /* Configure BlockGuard                 */
        uint32_t rsvd2     :  2;  /* Reserved                             */
        uint32_t casabt    :  1;  /* Configure async abts status notice   */
-       uint32_t cdss      :  1;  /* Configure Data Security SLI          */
-       uint32_t rsvd1     : 19;  /* Reserved                             */
+       uint32_t rsvd1     : 20;  /* Reserved                             */
 #endif
 #ifdef __BIG_ENDIAN_BITFIELD
-       uint32_t rsvd3     : 19;  /* Reserved                             */
-       uint32_t gdss      :  1;  /* Configure Data Security SLI          */
+       uint32_t rsvd3     : 20;  /* Reserved                             */
        uint32_t gasabt    :  1;  /* Grant async abts status notice       */
        uint32_t rsvd4     :  2;  /* Reserved                             */
        uint32_t gbg       :  1;  /* Grant BlockGuard                     */
@@ -3316,8 +3313,7 @@ typedef struct {
        uint32_t gbg       :  1;  /* Grant BlockGuard                     */
        uint32_t rsvd4     :  2;  /* Reserved                             */
        uint32_t gasabt    :  1;  /* Grant async abts status notice       */
-       uint32_t gdss      :  1;  /* Configure Data Security SLI          */
-       uint32_t rsvd3     : 19;  /* Reserved                             */
+       uint32_t rsvd3     : 20;  /* Reserved                             */
 #endif
 
 #ifdef __BIG_ENDIAN_BITFIELD
@@ -3339,15 +3335,11 @@ typedef struct {
        uint32_t rsvd6;           /* Reserved                             */
 
 #ifdef __BIG_ENDIAN_BITFIELD
-       uint32_t fips_rev   : 3;   /* FIPS Spec Revision                   */
-       uint32_t fips_level : 4;   /* FIPS Level                           */
-       uint32_t sec_err    : 9;   /* security crypto error                */
+       uint32_t rsvd7      : 16;
        uint32_t max_vpi    : 16;  /* Max number of virt N-Ports           */
 #else  /*  __LITTLE_ENDIAN */
        uint32_t max_vpi    : 16;  /* Max number of virt N-Ports           */
-       uint32_t sec_err    : 9;   /* security crypto error                */
-       uint32_t fips_level : 4;   /* FIPS Level                           */
-       uint32_t fips_rev   : 3;   /* FIPS Spec Revision                   */
+       uint32_t rsvd7      : 16;
 #endif
 
 } CONFIG_PORT_VAR;
index d1773c0..e35b52b 100644 (file)
@@ -1299,8 +1299,6 @@ lpfc_config_port(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
        if (phba->sli_rev == LPFC_SLI_REV3 && phba->vpd.sli3Feat.cerbm) {
                if (phba->cfg_enable_bg)
                        mb->un.varCfgPort.cbg = 1; /* configure BlockGuard */
-               if (phba->cfg_enable_dss)
-                       mb->un.varCfgPort.cdss = 1; /* Configure Security */
                mb->un.varCfgPort.cerbm = 1; /* Request HBQs */
                mb->un.varCfgPort.ccrp = 1; /* Command Ring Polling */
                mb->un.varCfgPort.max_hbq = lpfc_sli_hbq_count();
index 52ccaeb..b6fb665 100644 (file)
@@ -5032,23 +5032,6 @@ lpfc_sli_config_port(struct lpfc_hba *phba, int sli_mode)
 
                } else
                        phba->max_vpi = 0;
-               phba->fips_level = 0;
-               phba->fips_spec_rev = 0;
-               if (pmb->u.mb.un.varCfgPort.gdss) {
-                       phba->sli3_options |= LPFC_SLI3_DSS_ENABLED;
-                       phba->fips_level = pmb->u.mb.un.varCfgPort.fips_level;
-                       phba->fips_spec_rev = pmb->u.mb.un.varCfgPort.fips_rev;
-                       lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
-                                       "2850 Security Crypto Active. FIPS x%d "
-                                       "(Spec Rev: x%d)",
-                                       phba->fips_level, phba->fips_spec_rev);
-               }
-               if (pmb->u.mb.un.varCfgPort.sec_err) {
-                       lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
-                                       "2856 Config Port Security Crypto "
-                                       "Error: x%x ",
-                                       pmb->u.mb.un.varCfgPort.sec_err);
-               }
                if (pmb->u.mb.un.varCfgPort.gerbm)
                        phba->sli3_options |= LPFC_SLI3_HBQ_ENABLED;
                if (pmb->u.mb.un.varCfgPort.gcrp)