aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 39b0760c438d..a7c6b7390554 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -864,7 +864,6 @@ lpfc_get_hba_info(struct lpfc_hba *phba,
864 uint32_t *mrpi, uint32_t *arpi, 864 uint32_t *mrpi, uint32_t *arpi,
865 uint32_t *mvpi, uint32_t *avpi) 865 uint32_t *mvpi, uint32_t *avpi)
866{ 866{
867 struct lpfc_sli *psli = &phba->sli;
868 struct lpfc_mbx_read_config *rd_config; 867 struct lpfc_mbx_read_config *rd_config;
869 LPFC_MBOXQ_t *pmboxq; 868 LPFC_MBOXQ_t *pmboxq;
870 MAILBOX_t *pmb; 869 MAILBOX_t *pmb;
@@ -893,8 +892,7 @@ lpfc_get_hba_info(struct lpfc_hba *phba,
893 pmb->mbxOwner = OWN_HOST; 892 pmb->mbxOwner = OWN_HOST;
894 pmboxq->context1 = NULL; 893 pmboxq->context1 = NULL;
895 894
896 if ((phba->pport->fc_flag & FC_OFFLINE_MODE) || 895 if (phba->pport->fc_flag & FC_OFFLINE_MODE)
897 (!(psli->sli_flag & LPFC_SLI_ACTIVE)))
898 rc = MBX_NOT_FINISHED; 896 rc = MBX_NOT_FINISHED;
899 else 897 else
900 rc = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2); 898 rc = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2);
@@ -2943,9 +2941,6 @@ lpfc_aer_support_store(struct device *dev, struct device_attribute *attr,
2943 struct lpfc_hba *phba = vport->phba; 2941 struct lpfc_hba *phba = vport->phba;
2944 int val = 0, rc = -EINVAL; 2942 int val = 0, rc = -EINVAL;
2945 2943
2946 /* AER not supported on OC devices yet */
2947 if (phba->pci_dev_grp == LPFC_PCI_DEV_OC)
2948 return -EPERM;
2949 if (!isdigit(buf[0])) 2944 if (!isdigit(buf[0]))
2950 return -EINVAL; 2945 return -EINVAL;
2951 if (sscanf(buf, "%i", &val) != 1) 2946 if (sscanf(buf, "%i", &val) != 1)
@@ -3018,12 +3013,6 @@ lpfc_param_show(aer_support)
3018static int 3013static int
3019lpfc_aer_support_init(struct lpfc_hba *phba, int val) 3014lpfc_aer_support_init(struct lpfc_hba *phba, int val)
3020{ 3015{
3021 /* AER not supported on OC devices yet */
3022 if (phba->pci_dev_grp == LPFC_PCI_DEV_OC) {
3023 phba->cfg_aer_support = 0;
3024 return -EPERM;
3025 }
3026
3027 if (val == 0 || val == 1) { 3016 if (val == 0 || val == 1) {
3028 phba->cfg_aer_support = val; 3017 phba->cfg_aer_support = val;
3029 return 0; 3018 return 0;
@@ -3068,9 +3057,6 @@ lpfc_aer_cleanup_state(struct device *dev, struct device_attribute *attr,
3068 struct lpfc_hba *phba = vport->phba; 3057 struct lpfc_hba *phba = vport->phba;
3069 int val, rc = -1; 3058 int val, rc = -1;
3070 3059
3071 /* AER not supported on OC devices yet */
3072 if (phba->pci_dev_grp == LPFC_PCI_DEV_OC)
3073 return -EPERM;
3074 if (!isdigit(buf[0])) 3060 if (!isdigit(buf[0]))
3075 return -EINVAL; 3061 return -EINVAL;
3076 if (sscanf(buf, "%i", &val) != 1) 3062 if (sscanf(buf, "%i", &val) != 1)
@@ -4099,8 +4085,7 @@ lpfc_get_stats(struct Scsi_Host *shost)
4099 pmboxq->context1 = NULL; 4085 pmboxq->context1 = NULL;
4100 pmboxq->vport = vport; 4086 pmboxq->vport = vport;
4101 4087
4102 if ((vport->fc_flag & FC_OFFLINE_MODE) || 4088 if (vport->fc_flag & FC_OFFLINE_MODE)
4103 (!(psli->sli_flag & LPFC_SLI_ACTIVE)))
4104 rc = lpfc_sli_issue_mbox(phba, pmboxq, MBX_POLL); 4089 rc = lpfc_sli_issue_mbox(phba, pmboxq, MBX_POLL);
4105 else 4090 else
4106 rc = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2); 4091 rc = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2);
@@ -4124,8 +4109,7 @@ lpfc_get_stats(struct Scsi_Host *shost)
4124 pmboxq->context1 = NULL; 4109 pmboxq->context1 = NULL;
4125 pmboxq->vport = vport; 4110 pmboxq->vport = vport;
4126 4111
4127 if ((vport->fc_flag & FC_OFFLINE_MODE) || 4112 if (vport->fc_flag & FC_OFFLINE_MODE)
4128 (!(psli->sli_flag & LPFC_SLI_ACTIVE)))
4129 rc = lpfc_sli_issue_mbox(phba, pmboxq, MBX_POLL); 4113 rc = lpfc_sli_issue_mbox(phba, pmboxq, MBX_POLL);
4130 else 4114 else
4131 rc = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2); 4115 rc = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2);