[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <C27F8246C663564A84BB7AB3439772421B6C41FC55@IRVEXCHCCR01.corp.ad.broadcom.com>
Date: Wed, 12 May 2010 06:31:52 -0700
From: "Michael Chan" <mchan@...adcom.com>
To: "'Stanislaw Gruszka'" <sgruszka@...hat.com>,
"netdev@...r.kernel.org" <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>,
"Breno Leitao" <leitao@...ux.vnet.ibm.com>,
"Matthew Carlson" <mcarlson@...adcom.com>
Subject: Re: [RFC PATCH] bnx2: use netif_carrier_off to prevent tx
timeout
Stanislaw Gruszka wrote:
> 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);
Thanks Stanislaw, I think it is better to turn carrier on in
bnx2_netif_start(). We can use the start_cnic parameter to
decide if we need to call carrier_on(). I'll test this out.
Thanks.
> 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