summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-03-04 10:52:37 +0100
committerDavid S. Miller <davem@davemloft.net>2009-03-05 02:40:21 +0100
commita7ef59332b33cb1924ea76cce2aa620a32bb0d7a (patch)
treed475e78453114c6ac67cd032bd673572394baa8d /drivers/net/sfc
parentsfc: Fix efx_ethtool_nway_result() to use clause 45 MDIO registers (diff)
downloadlinux-a7ef59332b33cb1924ea76cce2aa620a32bb0d7a.tar.xz
linux-a7ef59332b33cb1924ea76cce2aa620a32bb0d7a.zip
sfc: Reject packets from the kernel TX queue during a loopback self-test
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r--drivers/net/sfc/tx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
index da3e9ff339f5..9f97e44840b6 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