From: Alexander Stein <alexander.stein@systec-electronic.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: Daniel Krueger <daniel.krueger@systec-electronic.com>,
netdev@vger.kernel.org,
Alexander Stein <alexander.stein@systec-electronic.com>
Subject: [PATCH v2 3/6] pch_gbe: change order of PHY address discovering
Date: Thu, 5 Jun 2014 10:53:04 +0200 [thread overview]
Message-ID: <1401958387-8154-3-git-send-email-alexander.stein@systec-electronic.com> (raw)
In-Reply-To: <1401958387-8154-1-git-send-email-alexander.stein@systec-electronic.com>
From: Daniel Krueger <daniel.krueger@systec-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@systec-electronic.com>
Signed-off-by: Alexander Stein <alexander.stein@systec-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
next prev parent reply other threads:[~2014-06-05 8:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 8:53 [PATCH v2 1/6] pch_gbe: print invalid MAC address during probe Alexander Stein
2014-06-05 8:53 ` [PATCH v2 2/6] pch_gbe: Add module parameter for RGMII/GMII PHY mode selection Alexander Stein
2014-06-05 18:15 ` Florian Fainelli
2014-06-05 8:53 ` Alexander Stein [this message]
2014-06-05 8:53 ` [PATCH v2 4/6] pch_gbe: remove unnecessary PHY resets Alexander Stein
2014-06-05 8:53 ` [PATCH v2 5/6] pch_gbe: reset PHY before first configuration Alexander Stein
2014-06-05 8:53 ` [PATCH v2 6/6] pch_gbe: remove shutdown and restart of interface after PHY settings change Alexander Stein
2014-06-05 18:00 ` [PATCH v2 1/6] pch_gbe: print invalid MAC address during probe Florian Fainelli
2014-06-05 22:19 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401958387-8154-3-git-send-email-alexander.stein@systec-electronic.com \
--to=alexander.stein@systec-electronic.com \
--cc=daniel.krueger@systec-electronic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).