[PATCH] iseries_veth: Supress spurious WARN_ON() at module unload
Changes
1 files changed · +5 −4
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| drivers/net/iseries_veth.c | modified | +5 | −4 | View file |
drivers/net/iseries_veth.c
View filediff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
index 13ed8dc..55af32e 100644
--- a/drivers/net/iseries_veth.c
+++ b/drivers/net/iseries_veth.c
@@ -802,13 +802,14 @@ static void veth_tx_timeout(struct net_device *dev)
spin_lock_irqsave(&port->pending_gate, flags);
+ if (!port->pending_lpmask) {
+ spin_unlock_irqrestore(&port->pending_gate, flags);
+ return;
+ }
+
printk(KERN_WARNING "%s: Tx timeout! Resetting lp connections: %08x\n",
dev->name, port->pending_lpmask);
- /* If we've timed out the queue must be stopped, which should
- * only ever happen when there is a pending packet. */
- WARN_ON(! port->pending_lpmask);
-
for (i = 0; i < HVMAXARCHITECTEDLPS; i++) {
struct veth_lpar_connection *cnx = veth_cnx[i];