aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2018-05-25 00:09:00 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2018-05-28 22:40:33 -0400
commitc221768bd49a7423be57c00a56985c0e9c4122cd (patch)
tree95b132c07e187ecd69665ececbdd7ec12a08772c
parent7438273fa23bea6d1e647e66c451570b86e2758b (diff)
scsi: lpfc: Fix 16gb hbas failing cq create.
The lancer G5 chip family fails the CQ create with 16k page size. The hardware incorrectly reports it supports large page sizes when it is actually limited to 4k pages. A prior patch resolved this for the A0 chip revision only. This patch excludes all revisions of the G5 asic from using large page sizes. As knowing the actual chip revision is unnecessary, the now unused definitions are removed Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/lpfc/lpfc_hw4.h11
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c9
-rw-r--r--drivers/scsi/lpfc/lpfc_sli4.h1
3 files changed, 1 insertions, 20 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 807901af9bbe..f43f0bacb77a 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -104,17 +104,6 @@ struct lpfc_sli_intf {
104#define LPFC_SLI_INTF_IF_TYPE_VIRT 1 104#define LPFC_SLI_INTF_IF_TYPE_VIRT 1
105}; 105};
106 106
107struct lpfc_sli_asic_rev {
108 u32 word0;
109#define LPFC_SLI_ASIC_VER_A 0x0
110#define LPFC_SLI_ASIC_VER_B 0x1
111#define LPFC_SLI_ASIC_VER_C 0x2
112#define LPFC_SLI_ASIC_VER_D 0x3
113#define lpfc_sli_asic_ver_SHIFT 4
114#define lpfc_sli_asic_ver_MASK 0x0000000F
115#define lpfc_sli_asic_ver_WORD word0
116};
117
118#define LPFC_SLI4_MBX_EMBED true 107#define LPFC_SLI4_MBX_EMBED true
119#define LPFC_SLI4_MBX_NEMBED false 108#define LPFC_SLI4_MBX_NEMBED false
120 109
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 83bc8d849a0d..48a5f067cec6 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -9545,11 +9545,6 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba)
9545 return error; 9545 return error;
9546 } 9546 }
9547 9547
9548 if (pci_read_config_dword(pdev, LPFC_SLI_ASIC_VER,
9549 &phba->sli4_hba.sli_asic_ver.word0)) {
9550 return error;
9551 }
9552
9553 /* There is no SLI3 failback for SLI4 devices. */ 9548 /* There is no SLI3 failback for SLI4 devices. */
9554 if (bf_get(lpfc_sli_intf_valid, &phba->sli4_hba.sli_intf) != 9549 if (bf_get(lpfc_sli_intf_valid, &phba->sli4_hba.sli_intf) !=
9555 LPFC_SLI_INTF_VALID) { 9550 LPFC_SLI_INTF_VALID) {
@@ -10711,9 +10706,7 @@ lpfc_get_sli4_parameters(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
10711 if ((bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) == 10706 if ((bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) ==
10712 LPFC_SLI_INTF_IF_TYPE_2) && 10707 LPFC_SLI_INTF_IF_TYPE_2) &&
10713 (bf_get(lpfc_sli_intf_sli_family, &phba->sli4_hba.sli_intf) == 10708 (bf_get(lpfc_sli_intf_sli_family, &phba->sli4_hba.sli_intf) ==
10714 LPFC_SLI_INTF_FAMILY_LNCR_A0) && 10709 LPFC_SLI_INTF_FAMILY_LNCR_A0))
10715 (bf_get(lpfc_sli_asic_ver, &phba->sli4_hba.sli_asic_ver) ==
10716 LPFC_SLI_ASIC_VER_A))
10717 exp_wqcq_pages = false; 10710 exp_wqcq_pages = false;
10718 10711
10719 if ((bf_get(cfg_cqpsize, mbx_sli4_parameters) & LPFC_CQ_16K_PAGE_SZ) && 10712 if ((bf_get(cfg_cqpsize, mbx_sli4_parameters) & LPFC_CQ_16K_PAGE_SZ) &&
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h
index 179e870a00b4..cf64aca82bd0 100644
--- a/drivers/scsi/lpfc/lpfc_sli4.h
+++ b/drivers/scsi/lpfc/lpfc_sli4.h
@@ -592,7 +592,6 @@ struct lpfc_sli4_hba {
592 uint32_t ue_to_sr; 592 uint32_t ue_to_sr;
593 uint32_t ue_to_rp; 593 uint32_t ue_to_rp;
594 struct lpfc_register sli_intf; 594 struct lpfc_register sli_intf;
595 struct lpfc_register sli_asic_ver;
596 struct lpfc_pc_sli4_params pc_sli4_params; 595 struct lpfc_pc_sli4_params pc_sli4_params;
597 struct lpfc_bbscn_params bbscn_params; 596 struct lpfc_bbscn_params bbscn_params;
598 struct lpfc_hba_eq_hdl *hba_eq_hdl; /* HBA per-WQ handle */ 597 struct lpfc_hba_eq_hdl *hba_eq_hdl; /* HBA per-WQ handle */