Skip to content

Commit 8e44e96

Browse files
Michael Chandavem330
Michael Chan
authored andcommitted
bnxt_en: Reset device on RX buffer errors.
If the RX completion indicates RX buffers errors, the RX ring will be disabled by firmware and no packets will be received on that ring from that point on. Recover by resetting the device. Fixes: c0c050c ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a1b0e4e commit 8e44e96

File tree

1 file changed

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

1 file changed

+6
-0
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -1614,11 +1614,17 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
16141614

16151615
rx_buf->data = NULL;
16161616
if (rxcmp1->rx_cmp_cfa_code_errors_v2 & RX_CMP_L2_ERRORS) {
1617+
u32 rx_err = le32_to_cpu(rxcmp1->rx_cmp_cfa_code_errors_v2);
1618+
16171619
bnxt_reuse_rx_data(rxr, cons, data);
16181620
if (agg_bufs)
16191621
bnxt_reuse_rx_agg_bufs(cpr, cp_cons, agg_bufs);
16201622

16211623
rc = -EIO;
1624+
if (rx_err & RX_CMPL_ERRORS_BUFFER_ERROR_MASK) {
1625+
netdev_warn(bp->dev, "RX buffer error %x\n", rx_err);
1626+
bnxt_sched_reset(bp, rxr);
1627+
}
16221628
goto next_rx;
16231629
}
16241630

0 commit comments

Comments
 (0)