[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100512130628.69bc3890@dhcp-lab-109.englab.brq.redhat.com>
Date: Wed, 12 May 2010 13:06:28 +0200
From: Stanislaw Gruszka <sgruszka@...hat.com>
To: netdev@...r.kernel.org
Cc: Eric Dumazet <eric.dumazet@...il.com>,
Eilon Greenstein <eilong@...adcom.com>,
Vladislav Zolotarov <vladz@...adcom.com>,
Dmitry Kravkov <dmitry@...adcom.com>,
Michael Chan <mchan@...adcom.com>,
Breno Leitao <leitao@...ux.vnet.ibm.com>,
Matt Carlson <mcarlson@...adcom.com>
Subject: [RFC PATCH] bnx2: use netif_carrier_off to prevent tx timeout
Touching ->trans_start make netdev watchdog timeouts only less probable.
Use netif_carrier_off to prevent timeout, lately we take care of tuning
carrier on.
Signed-off-by: Stanislaw Gruszka <sgruszka@...hat.com>
---
Patch was not tested!
drivers/net/bnx2.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 667f419..44fc392 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -656,17 +656,9 @@ bnx2_netif_stop(struct bnx2 *bp, bool stop_cnic)
if (stop_cnic)
bnx2_cnic_stop(bp);
if (netif_running(bp->dev)) {
- int i;
-
bnx2_napi_disable(bp);
netif_tx_disable(bp->dev);
- /* prevent tx timeout */
- for (i = 0; i < bp->dev->num_tx_queues; i++) {
- struct netdev_queue *txq;
-
- txq = netdev_get_tx_queue(bp->dev, i);
- txq->trans_start = jiffies;
- }
+ netif_carrier_off(bp->dev);
}
bnx2_disable_int_sync(bp);
}
@@ -6346,6 +6338,8 @@ bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp)
if (bp->flags & BNX2_FLAG_CAN_KEEP_VLAN)
bnx2_fw_sync(bp, BNX2_DRV_MSG_CODE_KEEP_VLAN_UPDATE, 0, 1);
+ if (bp->link_up)
+ netif_carrier_on(bp->dev);
bnx2_netif_start(bp, false);
}
#endif
--
1.5.5.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists