|
@@ -463,8 +463,7 @@ normal_tx:
|
|
|
prod = NEXT_TX(prod);
|
|
|
txr->tx_prod = prod;
|
|
|
|
|
|
- writel(DB_KEY_TX | prod, txr->tx_doorbell);
|
|
|
- writel(DB_KEY_TX | prod, txr->tx_doorbell);
|
|
|
+ bnxt_db_write(bp, txr->tx_doorbell, DB_KEY_TX | prod);
|
|
|
|
|
|
tx_done:
|
|
|
|
|
@@ -1779,8 +1778,7 @@ static int bnxt_poll_work(struct bnxt *bp, struct bnxt_napi *bnapi, int budget)
|
|
|
/* Sync BD data before updating doorbell */
|
|
|
wmb();
|
|
|
|
|
|
- writel(DB_KEY_TX | prod, db);
|
|
|
- writel(DB_KEY_TX | prod, db);
|
|
|
+ bnxt_db_write(bp, db, DB_KEY_TX | prod);
|
|
|
}
|
|
|
|
|
|
cpr->cp_raw_cons = raw_cons;
|
|
@@ -1796,14 +1794,10 @@ static int bnxt_poll_work(struct bnxt *bp, struct bnxt_napi *bnapi, int budget)
|
|
|
if (event & BNXT_RX_EVENT) {
|
|
|
struct bnxt_rx_ring_info *rxr = bnapi->rx_ring;
|
|
|
|
|
|
- writel(DB_KEY_RX | rxr->rx_prod, rxr->rx_doorbell);
|
|
|
- writel(DB_KEY_RX | rxr->rx_prod, rxr->rx_doorbell);
|
|
|
- if (event & BNXT_AGG_EVENT) {
|
|
|
- writel(DB_KEY_RX | rxr->rx_agg_prod,
|
|
|
- rxr->rx_agg_doorbell);
|
|
|
- writel(DB_KEY_RX | rxr->rx_agg_prod,
|
|
|
- rxr->rx_agg_doorbell);
|
|
|
- }
|
|
|
+ bnxt_db_write(bp, rxr->rx_doorbell, DB_KEY_RX | rxr->rx_prod);
|
|
|
+ if (event & BNXT_AGG_EVENT)
|
|
|
+ bnxt_db_write(bp, rxr->rx_agg_doorbell,
|
|
|
+ DB_KEY_RX | rxr->rx_agg_prod);
|
|
|
}
|
|
|
return rx_pkts;
|
|
|
}
|
|
@@ -1863,13 +1857,11 @@ static int bnxt_poll_nitroa0(struct napi_struct *napi, int budget)
|
|
|
|
|
|
cpr->cp_raw_cons = raw_cons;
|
|
|
BNXT_CP_DB(cpr->cp_doorbell, cpr->cp_raw_cons);
|
|
|
- writel(DB_KEY_RX | rxr->rx_prod, rxr->rx_doorbell);
|
|
|
- writel(DB_KEY_RX | rxr->rx_prod, rxr->rx_doorbell);
|
|
|
+ bnxt_db_write(bp, rxr->rx_doorbell, DB_KEY_RX | rxr->rx_prod);
|
|
|
|
|
|
- if (event & BNXT_AGG_EVENT) {
|
|
|
- writel(DB_KEY_RX | rxr->rx_agg_prod, rxr->rx_agg_doorbell);
|
|
|
- writel(DB_KEY_RX | rxr->rx_agg_prod, rxr->rx_agg_doorbell);
|
|
|
- }
|
|
|
+ if (event & BNXT_AGG_EVENT)
|
|
|
+ bnxt_db_write(bp, rxr->rx_agg_doorbell,
|
|
|
+ DB_KEY_RX | rxr->rx_agg_prod);
|
|
|
|
|
|
if (!bnxt_has_work(bp, cpr) && rx_pkts < budget) {
|
|
|
napi_complete_done(napi, rx_pkts);
|
|
@@ -7714,6 +7706,8 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
bp->gro_func = bnxt_gro_func_5730x;
|
|
|
if (BNXT_CHIP_P4_PLUS(bp))
|
|
|
bp->gro_func = bnxt_gro_func_5731x;
|
|
|
+ else
|
|
|
+ bp->flags |= BNXT_FLAG_DOUBLE_DB;
|
|
|
|
|
|
rc = bnxt_hwrm_func_drv_rgtr(bp);
|
|
|
if (rc)
|