Skip to content

Commit ebdf73d

Browse files
Michael Chandavem330
authored andcommitted
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: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 8cec094 commit ebdf73d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5355,9 +5355,9 @@ static void bnxt_set_db(struct bnxt *bp, struct bnxt_db_info *db, u32 ring_type,
53555355
{
53565356
if (bp->flags & BNXT_FLAG_CHIP_P5) {
53575357
if (BNXT_PF(bp))
5358-
db->doorbell = bp->bar1 + 0x10000;
5358+
db->doorbell = bp->bar1 + DB_PF_OFFSET_P5;
53595359
else
5360-
db->doorbell = bp->bar1 + 0x4000;
5360+
db->doorbell = bp->bar1 + DB_VF_OFFSET_P5;
53615361
switch (ring_type) {
53625362
case HWRM_RING_ALLOC_TX:
53635363
db->db_key64 = DBR_PATH_L2 | DBR_TYPE_SQ;

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,9 @@ struct nqe_cn {
537537
#define DBR_TYPE_NQ_ARM (0xbULL << 60)
538538
#define DBR_TYPE_NULL (0xfULL << 60)
539539

540+
#define DB_PF_OFFSET_P5 0x10000
541+
#define DB_VF_OFFSET_P5 0x4000
542+
540543
#define INVALID_HW_RING_ID ((u16)-1)
541544

542545
/* The hardware supports certain page sizes. Use the supported page sizes

0 commit comments

Comments
 (0)