All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pch_gbe: Fix transmit queue management
@ 2013-11-27 23:29 Ondrej Puzman
  2013-11-27 23:29 ` [PATCH] pch_gbe: Remove tx_queue_len setting from the driver Ondrej Puzman
  0 siblings, 1 reply; 19+ messages in thread
From: Ondrej Puzman @ 2013-11-27 23:29 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, Ondrej Puzman

According to Documentation/networking/driver.txt the ndo_start_xmit method should not return NETDEV_TX_BUSY under normal circumstances.
Stop the transmit queue when tx_ring is full.

Signed-off-by: Ondrej Puzman <puzman@gmail.com>
---
 .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c   |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index 27ffe0e..6764e59 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -2157,6 +2157,10 @@ static int pch_gbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
 
 	/* CRC,ITAG no support */
 	pch_gbe_tx_queue(adapter, tx_ring, skb);
+
+	if (unlikely(!PCH_GBE_DESC_UNUSED(tx_ring)))
+		netif_stop_queue(netdev);
+
 	spin_unlock_irqrestore(&tx_ring->tx_lock, flags);
 	return NETDEV_TX_OK;
 }
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-12-02 22:17 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-27 23:29 [PATCH] pch_gbe: Fix transmit queue management Ondrej Puzman
2013-11-27 23:29 ` [PATCH] pch_gbe: Remove tx_queue_len setting from the driver Ondrej Puzman
2013-11-27 23:29   ` [PATCH] pch_gbe: Add DQL support to " Ondrej Puzman
2013-11-27 23:29     ` [PATCH] pch_gbe: Fix: Link configuration in module parameters was ignored Ondrej Puzman
2013-11-28  4:39   ` [PATCH] pch_gbe: Remove tx_queue_len setting from the driver David Miller
2013-11-28  9:44     ` [PATCH 0/4] pch_gbe fixes and enhancements Ondrej Puzman
2013-11-29 21:43       ` David Miller
2013-11-28  9:44     ` [PATCH 1/4] pch_gbe: Fix transmit queue management Ondrej Puzman
2013-11-29 21:42       ` David Miller
2013-11-30 22:41         ` Ondřej Pužman
2013-12-02 10:04         ` David Laight
2013-12-02 16:16           ` David Miller
2013-12-02 16:33             ` Eric Dumazet
2013-12-02 16:51               ` [PATCH] net: do not pretend FRAGLIST support Eric Dumazet
2013-12-02 22:17                 ` David Miller
2013-12-02 16:51               ` [PATCH 1/4] pch_gbe: Fix transmit queue management Eric Dumazet
2013-11-28  9:44     ` [PATCH 2/4] pch_gbe: Remove tx_queue_len setting from the driver Ondrej Puzman
2013-11-28  9:44     ` [PATCH 3/4] pch_gbe: Add DQL support to " Ondrej Puzman
2013-11-28  9:44     ` [PATCH 4/4] pch_gbe: Fix: Link configuration in module parameters was ignored Ondrej Puzman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.