[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOiHx==f0czkaEVTe=+wabQMmifdaN00PMQwaR8f-602Dq56pA@mail.gmail.com>
Date: Thu, 19 Apr 2012 16:52:46 +0200
From: Jonas Gorski <jonas.gorski@...il.com>
To: mbizon@...ebox.fr
Cc: netdev@...r.kernel.org, Florian Fainelli <florian@...nwrt.org>,
Eric Dumazet <eric.dumazet@...il.com>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] NET: bcm63xx_enet: move phy_(dis)connect into probe/remove
On 19 April 2012 15:33, Maxime Bizon <mbizon@...ebox.fr> wrote:
>
> On Wed, 2012-04-18 at 21:30 +0200, Jonas Gorski wrote:
>>
>> The phy state machine will start in PHY_READY after phy_connect, which
>> will result in NOPs, so no call to bcm_enet_adjust_phy_link() after
>> _probe() and before _open(). The state machine starts doing real work
>> only after calling phy_start(), which happens only after the dma
>> register accesses in open(). So no race here.
>
> If I read the phylib code correctly, after phy_connect() the phy is in
> READY state, and you can access it via ethtool.
Yes, but none of the ethtool functions cause register writes in the
priv->has_phy = true case when in PHY_READY or PHY_HALTED state. All
they do is modify the phy_device's settings.
The settings only get taken over when the phy is started and the
phy_state_machine is running, so after phy_start() was and before
phy_stop().
In the priv->has_phy = false case they do cause register writes since
bcm_enet_adjust_link() might get called, but these never use the phy
state machine, so my patch does not change anything there.
Jonas
--
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