Skip to content

Commit 098286f

Browse files
Michael Chandavem330
authored andcommitted
bnxt_en: Add doorbell information to bnxt_en_dev struct.
The purpose of this is to inform the RDMA driver the size of the doorbell BAR that the L2 driver has mapped and the portion that is mapped uncacheable. The unchaeable portion is shared with the RoCE driver. Any remaining unmapped doorbell BAR can be used by the RDMA driver for its own purpose. Currently, the entire L2 portion is mapped uncacheable. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 8ae2473 commit 098286f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,8 @@ struct bnxt_en_dev *bnxt_ulp_probe(struct net_device *dev)
481481
edev->flags |= BNXT_EN_FLAG_ROCEV2_CAP;
482482
edev->net = dev;
483483
edev->pdev = bp->pdev;
484+
edev->l2_db_size = bp->db_size;
485+
edev->l2_db_size_nc = bp->db_size;
484486
bp->edev = edev;
485487
}
486488
return bp->edev;

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ struct bnxt_en_dev {
6767
#define BNXT_EN_FLAG_ULP_STOPPED 0x8
6868
const struct bnxt_en_ops *en_ops;
6969
struct bnxt_ulp ulp_tbl[BNXT_MAX_ULP];
70+
int l2_db_size; /* Doorbell BAR size in
71+
* bytes mapped by L2
72+
* driver.
73+
*/
74+
int l2_db_size_nc; /* Doorbell BAR size in
75+
* bytes mapped as non-
76+
* cacheable.
77+
*/
7078
};
7179

7280
struct bnxt_en_ops {

0 commit comments

Comments
 (0)