summaryrefslogtreecommitdiff
path: root/drivers/scsi/lpfc/lpfc_hw4.h
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2018-04-09 14:24:28 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2018-04-18 19:34:04 -0400
commitbf316c78517d9437656293f65a70d6ecdc2ec58e (patch)
tree8ae623e9b580ec1782dbc2d8711cff8a9c9d5e88 /drivers/scsi/lpfc/lpfc_hw4.h
parent01466024d2de1c05652d69411461e8e7908f0d1e (diff)
scsi: lpfc: Fix WQ/CQ creation for older asic's.
The patch to enlarge WQ/CQ creation keys off of an adapter response that indicates support for the larger values. Older adapters return an incorrect response and are limited in size. Thus the adapters fail the WQ creation steps. Augment the WQ sizing checks with a check on the older adapter types and limit them to the restricted sizes. Fixes: c176ffa0841c ("scsi: lpfc: Increase CQ and WQ sizes for SCSI") 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>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hw4.h')
-rw-r--r--drivers/scsi/lpfc/lpfc_hw4.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 98b80559c215..9df1c8da6f52 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -104,6 +104,17 @@ struct lpfc_sli_intf {
#define LPFC_SLI_INTF_IF_TYPE_VIRT 1
};
+struct lpfc_sli_asic_rev {
+ u32 word0;
+#define LPFC_SLI_ASIC_VER_A 0x0
+#define LPFC_SLI_ASIC_VER_B 0x1
+#define LPFC_SLI_ASIC_VER_C 0x2
+#define LPFC_SLI_ASIC_VER_D 0x3
+#define lpfc_sli_asic_ver_SHIFT 4
+#define lpfc_sli_asic_ver_MASK 0x0000000F
+#define lpfc_sli_asic_ver_WORD word0
+};
+
#define LPFC_SLI4_MBX_EMBED true
#define LPFC_SLI4_MBX_NEMBED false
@@ -566,6 +577,7 @@ struct lpfc_register {
/* The following BAR0 register sets are defined for if_type 0 and 2 UCNAs. */
#define LPFC_SLI_INTF 0x0058
+#define LPFC_SLI_ASIC_VER 0x009C
#define LPFC_CTL_PORT_SEM_OFFSET 0x400
#define lpfc_port_smphr_perr_SHIFT 31