]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: workaround initial read failures for integrated PHYs
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 26 Jun 2015 17:39:05 +0000 (10:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jun 2015 03:28:20 +0000 (20:28 -0700)
commitc82ae6142f9317a770a4f11d901ea7e8984093c5
tree80e2c8d5e756a9d632cd4b1ca0cb6d9927376dad
parentb27616fd61a88e46fb320754f8fefc5a9ea522e0
net: bcmgenet: workaround initial read failures for integrated PHYs

All BCM7xxx integrated Gigabit PHYs have an issue in their MDIO
management controller which will make the initial read or write to them
to fail and return 0xffff. This is a real issue as the typical first
thing we do is read from MII_PHYSID1 and MII_PHYSID2 from get_phy_id()
to register a driver for these PHYs.

Coupled with the workaround in drivers/net/phy/bcm7xxx.c, this
workaround for the MDIO bus controller consists in scanning the list of
PHYs to do this initial read workaround for as part of the MDIO bus
reset routine which is invoked prior to mdiobus_scan().

Once we have a proper PHY driver/device registered, all workarounds are
located there (e.g: power management suspend/resume calls).

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.h
drivers/net/ethernet/broadcom/genet/bcmmii.c