diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2010-08-24 05:46:07 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-24 23:54:50 +0200 |
commit | 3005ad40b95168aad530f1179cff47411b3ea8da (patch) | |
tree | 15a41dd56931e778ff9e5e80c5736ecc0ec9ad29 /drivers/net/mlx4 | |
parent | mlx4_en: Reporting link state with KERN_INFO (diff) | |
download | linux-3005ad40b95168aad530f1179cff47411b3ea8da.tar.xz linux-3005ad40b95168aad530f1179cff47411b3ea8da.zip |
mlx4_en: Validate port up prior to transmitting
We might try to use resources which were not activated.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4')
-rw-r--r-- | drivers/net/mlx4/en_tx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c index 580968f304eb..3deabd1d0357 100644 --- a/drivers/net/mlx4/en_tx.c +++ b/drivers/net/mlx4/en_tx.c @@ -612,6 +612,9 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) int lso_header_size; void *fragptr; + if (!priv->port_up) + goto tx_drop; + real_size = get_real_size(skb, dev, &lso_header_size); if (unlikely(!real_size)) goto tx_drop; |