mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
ena: Trigger reset on ena_com_prepare_tx failure
All ena_com_prepare_tx errors other than ENA_COM_NO_MEM are fatal and require device reset. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc.
This commit is contained in:
parent
c81f8c2611
commit
36130d2979
2 changed files with 4 additions and 0 deletions
|
|
@ -1000,6 +1000,8 @@ ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf **mbuf)
|
|||
tx_ring->que->id);
|
||||
} else {
|
||||
ena_log(pdev, ERR, "failed to prepare tx bufs\n");
|
||||
ena_trigger_reset(adapter,
|
||||
ENA_REGS_RESET_DRIVER_INVALID_STATE);
|
||||
}
|
||||
counter_u64_add(tx_ring->tx_stats.prepare_ctx_err, 1);
|
||||
goto dma_error;
|
||||
|
|
|
|||
|
|
@ -444,6 +444,8 @@ ena_netmap_tx_frame(struct ena_netmap_ctx *ctx)
|
|||
} else {
|
||||
ena_log_nm(adapter->pdev, ERR,
|
||||
"Failed to prepare Tx bufs\n");
|
||||
ena_trigger_reset(adapter,
|
||||
ENA_REGS_RESET_DRIVER_INVALID_STATE);
|
||||
}
|
||||
counter_u64_add(tx_ring->tx_stats.prepare_ctx_err, 1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue