aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/sfc/tx.c8
-rw-r--r--drivers/net/sfc/workarounds.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
index b1e190779073..d6681edb7014 100644
--- a/drivers/net/sfc/tx.c
+++ b/drivers/net/sfc/tx.c
@@ -162,6 +162,14 @@ static int efx_enqueue_skb(struct efx_tx_queue *tx_queue,
162 /* Get size of the initial fragment */ 162 /* Get size of the initial fragment */
163 len = skb_headlen(skb); 163 len = skb_headlen(skb);
164 164
165 /* Pad if necessary */
166 if (EFX_WORKAROUND_15592(efx) && skb->len <= 32) {
167 EFX_BUG_ON_PARANOID(skb->data_len);
168 len = 32 + 1;
169 if (skb_pad(skb, len - skb->len))
170 return NETDEV_TX_OK;
171 }
172
165 fill_level = tx_queue->insert_count - tx_queue->old_read_count; 173 fill_level = tx_queue->insert_count - tx_queue->old_read_count;
166 q_space = efx->type->txd_ring_mask - 1 - fill_level; 174 q_space = efx->type->txd_ring_mask - 1 - fill_level;
167 175
diff --git a/drivers/net/sfc/workarounds.h b/drivers/net/sfc/workarounds.h
index 78de68f4a95b..c821c15445a0 100644
--- a/drivers/net/sfc/workarounds.h
+++ b/drivers/net/sfc/workarounds.h
@@ -36,6 +36,8 @@
36#define EFX_WORKAROUND_11482 EFX_WORKAROUND_ALWAYS 36#define EFX_WORKAROUND_11482 EFX_WORKAROUND_ALWAYS
37/* Flush events can take a very long time to appear */ 37/* Flush events can take a very long time to appear */
38#define EFX_WORKAROUND_11557 EFX_WORKAROUND_ALWAYS 38#define EFX_WORKAROUND_11557 EFX_WORKAROUND_ALWAYS
39/* Truncated IPv4 packets can confuse the TX packet parser */
40#define EFX_WORKAROUND_15592 EFX_WORKAROUND_ALWAYS
39 41
40/* Spurious parity errors in TSORT buffers */ 42/* Spurious parity errors in TSORT buffers */
41#define EFX_WORKAROUND_5129 EFX_WORKAROUND_FALCON_A 43#define EFX_WORKAROUND_5129 EFX_WORKAROUND_FALCON_A