aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/sfc/ef10.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 5d46d155b642..2f77359607d2 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -1766,6 +1766,8 @@ static int efx_ef10_handle_rx_event(struct efx_channel *channel,
1766 ((1 << ESF_DZ_RX_DSC_PTR_LBITS_WIDTH) - 1)); 1766 ((1 << ESF_DZ_RX_DSC_PTR_LBITS_WIDTH) - 1));
1767 1767
1768 if (n_descs != rx_queue->scatter_n + 1) { 1768 if (n_descs != rx_queue->scatter_n + 1) {
1769 struct efx_ef10_nic_data *nic_data = efx->nic_data;
1770
1769 /* detect rx abort */ 1771 /* detect rx abort */
1770 if (unlikely(n_descs == rx_queue->scatter_n)) { 1772 if (unlikely(n_descs == rx_queue->scatter_n)) {
1771 WARN_ON(rx_bytes != 0); 1773 WARN_ON(rx_bytes != 0);
@@ -1773,10 +1775,13 @@ static int efx_ef10_handle_rx_event(struct efx_channel *channel,
1773 return 0; 1775 return 0;
1774 } 1776 }
1775 1777
1776 if (unlikely(rx_queue->scatter_n != 0)) { 1778 /* Check that RX completion merging is valid, i.e.
1777 /* Scattered packet completions cannot be 1779 * the current firmware supports it and this is a
1778 * merged, so something has gone wrong. 1780 * non-scattered packet.
1779 */ 1781 */
1782 if (!(nic_data->datapath_caps &
1783 (1 << MC_CMD_GET_CAPABILITIES_OUT_RX_BATCHING_LBN)) ||
1784 rx_queue->scatter_n != 0 || rx_cont) {
1780 efx_ef10_handle_rx_bad_lbits( 1785 efx_ef10_handle_rx_bad_lbits(
1781 rx_queue, next_ptr_lbits, 1786 rx_queue, next_ptr_lbits,
1782 (rx_queue->removed_count + 1787 (rx_queue->removed_count +