diff --git a/drivers/net/ipq807x/ipq807x_edma.c b/drivers/net/ipq807x/ipq807x_edma.c index f919b7e46a..7950bdfe86 100644 --- a/drivers/net/ipq807x/ipq807x_edma.c +++ b/drivers/net/ipq807x/ipq807x_edma.c @@ -436,6 +436,7 @@ static int ipq807x_edma_rx_complete(struct ipq807x_edma_common_info *c_info) return 0; } +#define MIN_PKT_SIZE 33 /* * ipq807x_eth_snd() * Transmit a packet using an EDMA ring @@ -528,7 +529,14 @@ static int ipq807x_eth_snd(struct eth_device *dev, void *packet, int length) * copy the packet */ memcpy(skb + IPQ807X_EDMA_TX_PREHDR_SIZE, packet, length); - + /* + * The EDMA HW is unable to process packets less than MIN_PKT_SIZE(33) bytes, + * then the EDMA stalls. This is to pad the packets up to MIN_PKT_SIZE. + */ + if (length < MIN_PKT_SIZE) { + memset(skb + IPQ807X_EDMA_TX_PREHDR_SIZE + length, 0x00, (MIN_PKT_SIZE - length)); + length = MIN_PKT_SIZE; + } /* * Populate Tx descriptor */