Commit 517c54d2 authored by David S. Miller's avatar David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parents d33d19d3 828affc2
...@@ -1788,6 +1788,10 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, ...@@ -1788,6 +1788,10 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
if (!RX_CMP_VALID(rxcmp1, tmp_raw_cons)) if (!RX_CMP_VALID(rxcmp1, tmp_raw_cons))
return -EBUSY; return -EBUSY;
/* The valid test of the entry must be done first before
* reading any further.
*/
dma_rmb();
prod = rxr->rx_prod; prod = rxr->rx_prod;
if (cmp_type == CMP_TYPE_RX_L2_TPA_START_CMP) { if (cmp_type == CMP_TYPE_RX_L2_TPA_START_CMP) {
...@@ -2010,6 +2014,10 @@ static int bnxt_force_rx_discard(struct bnxt *bp, ...@@ -2010,6 +2014,10 @@ static int bnxt_force_rx_discard(struct bnxt *bp,
if (!RX_CMP_VALID(rxcmp1, tmp_raw_cons)) if (!RX_CMP_VALID(rxcmp1, tmp_raw_cons))
return -EBUSY; return -EBUSY;
/* The valid test of the entry must be done first before
* reading any further.
*/
dma_rmb();
cmp_type = RX_CMP_TYPE(rxcmp); cmp_type = RX_CMP_TYPE(rxcmp);
if (cmp_type == CMP_TYPE_RX_L2_CMP) { if (cmp_type == CMP_TYPE_RX_L2_CMP) {
rxcmp1->rx_cmp_cfa_code_errors_v2 |= rxcmp1->rx_cmp_cfa_code_errors_v2 |=
...@@ -2475,6 +2483,10 @@ static int bnxt_poll_nitroa0(struct napi_struct *napi, int budget) ...@@ -2475,6 +2483,10 @@ static int bnxt_poll_nitroa0(struct napi_struct *napi, int budget)
if (!TX_CMP_VALID(txcmp, raw_cons)) if (!TX_CMP_VALID(txcmp, raw_cons))
break; break;
/* The valid test of the entry must be done first before
* reading any further.
*/
dma_rmb();
if ((TX_CMP_TYPE(txcmp) & 0x30) == 0x10) { if ((TX_CMP_TYPE(txcmp) & 0x30) == 0x10) {
tmp_raw_cons = NEXT_RAW_CMP(raw_cons); tmp_raw_cons = NEXT_RAW_CMP(raw_cons);
cp_cons = RING_CMP(tmp_raw_cons); cp_cons = RING_CMP(tmp_raw_cons);
...@@ -10792,6 +10804,9 @@ static bool bnxt_rfs_supported(struct bnxt *bp) ...@@ -10792,6 +10804,9 @@ static bool bnxt_rfs_supported(struct bnxt *bp)
return true; return true;
return false; return false;
} }
/* 212 firmware is broken for aRFS */
if (BNXT_FW_MAJ(bp) == 212)
return false;
if (BNXT_PF(bp) && !BNXT_CHIP_TYPE_NITRO_A0(bp)) if (BNXT_PF(bp) && !BNXT_CHIP_TYPE_NITRO_A0(bp))
return true; return true;
if (bp->flags & BNXT_FLAG_NEW_RSS_CAP) if (bp->flags & BNXT_FLAG_NEW_RSS_CAP)
......
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