[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <C27F8246C663564A84BB7AB3439772421B6C41FC57@IRVEXCHCCR01.corp.ad.broadcom.com>
Date: Wed, 12 May 2010 07:09:16 -0700
From: "Michael Chan" <mchan@...adcom.com>
To: "'Stanislaw Gruszka'" <sgruszka@...hat.com>
cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"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:
> On Wed, 12 May 2010 06:31:52 -0700
> "Michael Chan" <mchan@...adcom.com> wrote:
>
> > > @@ -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().
>
> IIRC in most cases we set carrier status in bnx2_init_nic()
> (based on what we get from PHY) called before bnx2_netif_start().
> One exception is bnx2_vlan_rx_register() function.
>
Yes, if we reset the chip and reset the PHY, we'll always get a
link up event and we'll set carrier. We need to take care of
the cases where the chip is not reset or the phy is not reset.
I think it is better if the caller of bnx2_netif_start() does
not have to worry about setting the carrier.
--
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