|
|
Re: [PATCH] NET: bcm63xx_enet: move phy_(dis)connect into probe/remove |
On 19 April 2012 15:33, Maxime Bizon <mbizon@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Kernel Discussion] [Ethernet Bridging] [Linux Wireless Networking] [Linux Bluetooth Networking] [Linux Networking Users] [VLAN] [Git] [IETF Annouce] [Linux Assembly] [Security] [Bugtraq] [Photo] [Singles Social Networking] [Yosemite Information] [MIPS Linux] [ARM Linux Kernel] [ARM Linux] [Linux Virtualization] [Linux Security] [Linux IDE] [Linux RAID] [Linux SCSI] [Free Dating]
![]() |
![]() |