diff options
-rw-r--r-- | drivers/net/ethernet/sfc/ef10.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c index dfff8e7a55e2..9ec6072896c2 100644 --- a/drivers/net/ethernet/sfc/ef10.c +++ b/drivers/net/ethernet/sfc/ef10.c | |||
@@ -1252,7 +1252,8 @@ static void efx_ef10_tx_init(struct efx_tx_queue *tx_queue) | |||
1252 | return; | 1252 | return; |
1253 | 1253 | ||
1254 | fail: | 1254 | fail: |
1255 | WARN_ON(true); | 1255 | netdev_WARN(efx->net_dev, "failed to initialise TXQ %d\n", |
1256 | tx_queue->queue); | ||
1256 | } | 1257 | } |
1257 | 1258 | ||
1258 | static void efx_ef10_tx_fini(struct efx_tx_queue *tx_queue) | 1259 | static void efx_ef10_tx_fini(struct efx_tx_queue *tx_queue) |
@@ -1492,9 +1493,9 @@ static void efx_ef10_rx_init(struct efx_rx_queue *rx_queue) | |||
1492 | 1493 | ||
1493 | rc = efx_mcdi_rpc(efx, MC_CMD_INIT_RXQ, inbuf, inlen, | 1494 | rc = efx_mcdi_rpc(efx, MC_CMD_INIT_RXQ, inbuf, inlen, |
1494 | outbuf, sizeof(outbuf), &outlen); | 1495 | outbuf, sizeof(outbuf), &outlen); |
1495 | WARN_ON(rc); | 1496 | if (rc) |
1496 | 1497 | netdev_WARN(efx->net_dev, "failed to initialise RXQ %d\n", | |
1497 | return; | 1498 | efx_rx_queue_index(rx_queue)); |
1498 | } | 1499 | } |
1499 | 1500 | ||
1500 | static void efx_ef10_rx_fini(struct efx_rx_queue *rx_queue) | 1501 | static void efx_ef10_rx_fini(struct efx_rx_queue *rx_queue) |
@@ -1718,8 +1719,6 @@ static void efx_ef10_handle_rx_abort(struct efx_rx_queue *rx_queue) | |||
1718 | { | 1719 | { |
1719 | unsigned int rx_desc_ptr; | 1720 | unsigned int rx_desc_ptr; |
1720 | 1721 | ||
1721 | WARN_ON(rx_queue->scatter_n == 0); | ||
1722 | |||
1723 | netif_dbg(rx_queue->efx, hw, rx_queue->efx->net_dev, | 1722 | netif_dbg(rx_queue->efx, hw, rx_queue->efx->net_dev, |
1724 | "scattered RX aborted (dropping %u buffers)\n", | 1723 | "scattered RX aborted (dropping %u buffers)\n", |
1725 | rx_queue->scatter_n); | 1724 | rx_queue->scatter_n); |
@@ -1755,7 +1754,10 @@ static int efx_ef10_handle_rx_event(struct efx_channel *channel, | |||
1755 | rx_l4_class = EFX_QWORD_FIELD(*event, ESF_DZ_RX_L4_CLASS); | 1754 | rx_l4_class = EFX_QWORD_FIELD(*event, ESF_DZ_RX_L4_CLASS); |
1756 | rx_cont = EFX_QWORD_FIELD(*event, ESF_DZ_RX_CONT); | 1755 | rx_cont = EFX_QWORD_FIELD(*event, ESF_DZ_RX_CONT); |
1757 | 1756 | ||
1758 | WARN_ON(EFX_QWORD_FIELD(*event, ESF_DZ_RX_DROP_EVENT)); | 1757 | if (EFX_QWORD_FIELD(*event, ESF_DZ_RX_DROP_EVENT)) |
1758 | netdev_WARN(efx->net_dev, "saw RX_DROP_EVENT: event=" | ||
1759 | EFX_QWORD_FMT "\n", | ||
1760 | EFX_QWORD_VAL(*event)); | ||
1759 | 1761 | ||
1760 | rx_queue = efx_channel_get_rx_queue(channel); | 1762 | rx_queue = efx_channel_get_rx_queue(channel); |
1761 | 1763 | ||
@@ -1770,7 +1772,12 @@ static int efx_ef10_handle_rx_event(struct efx_channel *channel, | |||
1770 | 1772 | ||
1771 | /* detect rx abort */ | 1773 | /* detect rx abort */ |
1772 | if (unlikely(n_descs == rx_queue->scatter_n)) { | 1774 | if (unlikely(n_descs == rx_queue->scatter_n)) { |
1773 | WARN_ON(rx_bytes != 0); | 1775 | if (rx_queue->scatter_n == 0 || rx_bytes != 0) |
1776 | netdev_WARN(efx->net_dev, | ||
1777 | "invalid RX abort: scatter_n=%u event=" | ||
1778 | EFX_QWORD_FMT "\n", | ||
1779 | rx_queue->scatter_n, | ||
1780 | EFX_QWORD_VAL(*event)); | ||
1774 | efx_ef10_handle_rx_abort(rx_queue); | 1781 | efx_ef10_handle_rx_abort(rx_queue); |
1775 | return 0; | 1782 | return 0; |
1776 | } | 1783 | } |
@@ -3035,8 +3042,11 @@ static void efx_ef10_filter_table_remove(struct efx_nic *efx) | |||
3035 | table->entry[filter_idx].handle); | 3042 | table->entry[filter_idx].handle); |
3036 | rc = efx_mcdi_rpc(efx, MC_CMD_FILTER_OP, inbuf, sizeof(inbuf), | 3043 | rc = efx_mcdi_rpc(efx, MC_CMD_FILTER_OP, inbuf, sizeof(inbuf), |
3037 | NULL, 0, NULL); | 3044 | NULL, 0, NULL); |
3038 | 3045 | if (rc) | |
3039 | WARN_ON(rc != 0); | 3046 | netdev_WARN(efx->net_dev, |
3047 | "filter_idx=%#x handle=%#llx\n", | ||
3048 | filter_idx, | ||
3049 | table->entry[filter_idx].handle); | ||
3040 | kfree(spec); | 3050 | kfree(spec); |
3041 | } | 3051 | } |
3042 | 3052 | ||