[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1401958387-8154-3-git-send-email-alexander.stein@systec-electronic.com>
Date: Thu, 5 Jun 2014 10:53:04 +0200
From: Alexander Stein <alexander.stein@...tec-electronic.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: Daniel Krueger <daniel.krueger@...tec-electronic.com>,
netdev@...r.kernel.org,
Alexander Stein <alexander.stein@...tec-electronic.com>
Subject: [PATCH v2 3/6] pch_gbe: change order of PHY address discovering
From: Daniel Krueger <daniel.krueger@...tec-electronic.com>
Scan PHY address 0 after all other addresses. Address 0 is a multicast
address which unfortunately does not work properly with Micrel KSZ9021.
Our board uses PHY address 2.
Signed-off-by: Daniel Krueger <daniel.krueger@...tec-electronic.com>
Signed-off-by: Alexander Stein <alexander.stein@...tec-electronic.com>
---
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index e7acbd7..9ac407d 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -662,9 +662,9 @@ static int pch_gbe_init_phy(struct pch_gbe_adapter *adapter)
u32 addr;
u16 bmcr, stat;
- /* Discover phy addr by searching addrs in order {1,0,2,..., 31} */
+ /* Discover phy addr by searching addrs in order {1,2,...,31,0} */
for (addr = 0; addr < PCH_GBE_PHY_REGS_LEN; addr++) {
- adapter->mii.phy_id = (addr == 0) ? 1 : (addr == 1) ? 0 : addr;
+ adapter->mii.phy_id = (addr == 31) ? 0 : (addr + 1);
bmcr = pch_gbe_mdio_read(netdev, adapter->mii.phy_id, MII_BMCR);
stat = pch_gbe_mdio_read(netdev, adapter->mii.phy_id, MII_BMSR);
stat = pch_gbe_mdio_read(netdev, adapter->mii.phy_id, MII_BMSR);
--
1.8.5.5
--
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