Commit ebdf73dc authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnxt_en: Define the doorbell offsets on 57500 chips.

Define the 57500 chip doorbell offsets instead of using the magic
values in the C file.
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8cec0940
...@@ -5355,9 +5355,9 @@ static void bnxt_set_db(struct bnxt *bp, struct bnxt_db_info *db, u32 ring_type, ...@@ -5355,9 +5355,9 @@ static void bnxt_set_db(struct bnxt *bp, struct bnxt_db_info *db, u32 ring_type,
{ {
if (bp->flags & BNXT_FLAG_CHIP_P5) { if (bp->flags & BNXT_FLAG_CHIP_P5) {
if (BNXT_PF(bp)) if (BNXT_PF(bp))
db->doorbell = bp->bar1 + 0x10000; db->doorbell = bp->bar1 + DB_PF_OFFSET_P5;
else else
db->doorbell = bp->bar1 + 0x4000; db->doorbell = bp->bar1 + DB_VF_OFFSET_P5;
switch (ring_type) { switch (ring_type) {
case HWRM_RING_ALLOC_TX: case HWRM_RING_ALLOC_TX:
db->db_key64 = DBR_PATH_L2 | DBR_TYPE_SQ; db->db_key64 = DBR_PATH_L2 | DBR_TYPE_SQ;
......
...@@ -537,6 +537,9 @@ struct nqe_cn { ...@@ -537,6 +537,9 @@ struct nqe_cn {
#define DBR_TYPE_NQ_ARM (0xbULL << 60) #define DBR_TYPE_NQ_ARM (0xbULL << 60)
#define DBR_TYPE_NULL (0xfULL << 60) #define DBR_TYPE_NULL (0xfULL << 60)
#define DB_PF_OFFSET_P5 0x10000
#define DB_VF_OFFSET_P5 0x4000
#define INVALID_HW_RING_ID ((u16)-1) #define INVALID_HW_RING_ID ((u16)-1)
/* The hardware supports certain page sizes. Use the supported page sizes /* The hardware supports certain page sizes. Use the supported page sizes
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment