Skip to contentSkip to conversation

mlx4_en: Validate port up prior to transmitting

PATCH In review Yevgeny Petrilin 1 participant 1 message Aug 24, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 7/14 mlx4_en: Validate port up prior to transmitting

We might try to use resources which were not activated.

---
 drivers/net/mlx4/en_tx.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/mlx4/en_tx.c +3 -0
index 580968f..3deabd1 100644
@@ -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;
Signature · 1 line
1.6.1.3