[PATCH net-next 24/40] net: fec: return NETDEV_TX_BUSY, when not enough space in ring
Troy Kisky
troy.kisky at boundarydevices.com
Thu Jan 28 13:25:48 PST 2016
Signed-off-by: Troy Kisky <troy.kisky at boundarydevices.com>
---
drivers/net/ethernet/freescale/fec_main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 29c5781..98b9be2 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -424,10 +424,9 @@ static int fec_enet_txq_submit_skb(struct fec_enet_priv_tx_q *txq,
entries_free = fec_enet_get_free_txdesc_num(txq);
if (entries_free < MAX_SKB_FRAGS + 1) {
- dev_kfree_skb_any(skb);
if (net_ratelimit())
netdev_err(ndev, "NOT enough BD for SG!\n");
- return NETDEV_TX_OK;
+ return NETDEV_TX_BUSY;
}
/* Protocol checksum off-load for TCP and UDP. */
@@ -653,10 +652,9 @@ static int fec_enet_txq_submit_tso(struct fec_enet_priv_tx_q *txq,
int ret;
if (tso_count_descs(skb) >= fec_enet_get_free_txdesc_num(txq)) {
- dev_kfree_skb_any(skb);
if (net_ratelimit())
netdev_err(ndev, "NOT enough BD for TSO!\n");
- return NETDEV_TX_OK;
+ return NETDEV_TX_BUSY;
}
/* Protocol checksum off-load for TCP and UDP. */
--
2.5.0
More information about the linux-arm-kernel
mailing list