From: Andy Fleming <afleming@freescale.com>
To: David Miller <davem@davemloft.net>,
Kumar Gala <galak@kernel.crashing.org>
Cc: <linuxppc-dev@lists.ozlabs.org>, <netdev@vger.kernel.org>
Subject: [PATCH] Revert "net: fsl_pq_mdio: fix non tbi phy access"
Date: Fri, 2 Dec 2011 01:05:48 -0600 [thread overview]
Message-ID: <1322809549-32622-1-git-send-email-afleming@freescale.com> (raw)
This reverts commit c3e072f8a6c5625028531c40ec65f7e301531be2.
The TBI PHY Address must always be set to something sensible.
If not, the value currently in the register may interfere
with MDIO transactions to that address. The architected
solution is to have a TBI node in the device tree, which corresponds
to the desired address (and which should be chosen so that it does
not conflict with other PHYs on the bus). If that node is not there,
it is incorrect to just continue. We must return an error, so that
developers have a chance to realize they've mis-configured their
device trees. A separate patch has been submitted to add such
a node to the device trees for boards which were missing that node.
Signed-off-by: Andy Fleming <afleming@freescale.com>
---
drivers/net/ethernet/freescale/fsl_pq_mdio.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
index f109602..6ff124c 100644
--- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c
+++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
@@ -356,16 +356,16 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev)
if (prop)
tbiaddr = *prop;
+ }
- if (tbiaddr == -1) {
- err = -EBUSY;
+ if (tbiaddr == -1) {
+ err = -EBUSY;
- goto err_free_irqs;
- } else {
- out_be32(tbipa, tbiaddr);
- }
+ goto err_free_irqs;
}
+ out_be32(tbipa, tbiaddr);
+
err = of_mdiobus_register(new_bus, np);
if (err) {
printk (KERN_ERR "%s: Cannot register as MDIO bus\n",
--
1.7.3.4
next reply other threads:[~2011-12-02 7:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-02 7:05 Andy Fleming [this message]
2011-12-02 7:05 ` [PATCH] pq3: Add default tbi address Andy Fleming
2011-12-02 7:20 ` Kumar Gala
2011-12-03 20:15 ` Andy Fleming
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=1322809549-32622-1-git-send-email-afleming@freescale.com \
--to=afleming@freescale.com \
--cc=davem@davemloft.net \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--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).