diff mbox

[2/7] sfc: Reject packets from the kernel TX queue during a loopback self-test

Message ID 1236196357.3140.17.camel@achroite
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ben Hutchings March 4, 2009, 7:52 p.m. UTC
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
This is necessary because netif_carrier_off() doesn't stop the queue
immediately.

Ben.

 drivers/net/sfc/tx.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

David Miller March 5, 2009, 1:55 a.m. UTC | #1
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Wed, 04 Mar 2009 19:52:37 +0000

> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
index da3e9ff..9f97e44 100644
--- a/drivers/net/sfc/tx.c
+++ b/drivers/net/sfc/tx.c
@@ -376,6 +376,9 @@  int efx_hard_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
 	struct efx_nic *efx = netdev_priv(net_dev);
 	struct efx_tx_queue *tx_queue;
 
+	if (unlikely(efx->port_inhibited))
+		return NETDEV_TX_BUSY;
+
 	if (likely(skb->ip_summed == CHECKSUM_PARTIAL))
 		tx_queue = &efx->tx_queue[EFX_TX_QUEUE_OFFLOAD_CSUM];
 	else