Skip to content

Commit 517c54d

Browse files
committed
Merge branch 'bnxt_en-fixes'
Michael Chan says: ==================== bnxt_en: 2 bug fixes The first one disables aRFS/NTUPLE on an older broken firmware version. The second one adds missing memory barriers related to completion ring handling. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents d33d19d + 828affc commit 517c54d

File tree

1 file changed

+15
-0
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,6 +1788,10 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
17881788
if (!RX_CMP_VALID(rxcmp1, tmp_raw_cons))
17891789
return -EBUSY;
17901790

1791+
/* The valid test of the entry must be done first before
1792+
* reading any further.
1793+
*/
1794+
dma_rmb();
17911795
prod = rxr->rx_prod;
17921796

17931797
if (cmp_type == CMP_TYPE_RX_L2_TPA_START_CMP) {
@@ -2010,6 +2014,10 @@ static int bnxt_force_rx_discard(struct bnxt *bp,
20102014
if (!RX_CMP_VALID(rxcmp1, tmp_raw_cons))
20112015
return -EBUSY;
20122016

2017+
/* The valid test of the entry must be done first before
2018+
* reading any further.
2019+
*/
2020+
dma_rmb();
20132021
cmp_type = RX_CMP_TYPE(rxcmp);
20142022
if (cmp_type == CMP_TYPE_RX_L2_CMP) {
20152023
rxcmp1->rx_cmp_cfa_code_errors_v2 |=
@@ -2475,6 +2483,10 @@ static int bnxt_poll_nitroa0(struct napi_struct *napi, int budget)
24752483
if (!TX_CMP_VALID(txcmp, raw_cons))
24762484
break;
24772485

2486+
/* The valid test of the entry must be done first before
2487+
* reading any further.
2488+
*/
2489+
dma_rmb();
24782490
if ((TX_CMP_TYPE(txcmp) & 0x30) == 0x10) {
24792491
tmp_raw_cons = NEXT_RAW_CMP(raw_cons);
24802492
cp_cons = RING_CMP(tmp_raw_cons);
@@ -10792,6 +10804,9 @@ static bool bnxt_rfs_supported(struct bnxt *bp)
1079210804
return true;
1079310805
return false;
1079410806
}
10807+
/* 212 firmware is broken for aRFS */
10808+
if (BNXT_FW_MAJ(bp) == 212)
10809+
return false;
1079510810
if (BNXT_PF(bp) && !BNXT_CHIP_TYPE_NITRO_A0(bp))
1079610811
return true;
1079710812
if (bp->flags & BNXT_FLAG_NEW_RSS_CAP)

0 commit comments

Comments
 (0)