From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linuxppc-dev@ozlabs.org,
Giulio Benetti <giulio.benetti@micronovasrl.com>,
Andy Fleming <afleming@freescale.com>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH] phylib: Fix Freescale TBI PHY detection
Date: Wed, 14 Jan 2009 18:03:32 +0300 [thread overview]
Message-ID: <20090114150332.GA839@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20090113160513.GA22083@oksana.dev.rtsoft.ru>
On Tue, Jan 13, 2009 at 07:05:13PM +0300, Anton Vorontsov wrote:
> Freescale on-chip TBI PHYs reports PHY ID as 0x0, but as of
>
> commit 3ee82383f0098a2e13acc8cf1be8e47512f41e5a
> Author: Giulio Benetti <giulio.benetti@micronovasrl.com>
> Date: Thu Nov 13 21:53:13 2008 +0000
>
> phy: fix phy address bug
>
> PHYID returns 0xffff and not 0xffffffff when not found and in some
> case(at91sam9263) 0x0. Maybe this patch could be useful.
>
> phy_device.c treats PHY ID == 0x0 as bogus IDs, and that results in
> gianfar driver failure to see the TBI PHYs. This code snippet triggers:
>
> if (!priv->tbiphy) {
> printk(KERN_WARNING "SGMII mode requires that the device "
> "tree specify a tbi-handle\n");
> return;
> }
>
> Although tbi-handle is specified in the device tree.
>
> Btw, technically PHY ID == 0x0 is a valid ID (if we ever see a PHY
> manufactured by Xerox :-).
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
>
> There is one thing I don't actually understand though...
>
> Andy, were you testing the TBI support on a hardware where PHY ID
> != 0x0 or maybe your TBI PHY support patch (commit b31a1d8b41513b,
> dated Tue Dec 16 15:29:15 2008) was based on a bit outdated kernel
> version? Because according to the git timestamps, the TBI support
> was not working since the submission.
>
> Just in case, the hardware I'm seeing the PHY ID == 0x0 is
> MPC8378E-MDS.
I think I got it. Probably the TBI support patch was based on the
powerpc.git next, and the commit that broke the TBI support
was in the net-next-2.6 tree.
That explains why nobody noticed the issue.
> drivers/net/phy/phy_device.c | 9 ---------
> 1 files changed, 0 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> index e354601..0a06e4f 100644
> --- a/drivers/net/phy/phy_device.c
> +++ b/drivers/net/phy/phy_device.c
> @@ -231,15 +231,6 @@ struct phy_device * get_phy_device(struct mii_bus *bus, int addr)
> if ((phy_id & 0x1fffffff) == 0x1fffffff)
> return NULL;
>
> - /*
> - * Broken hardware is sometimes missing the pull-up resistor on the
> - * MDIO line, which results in reads to non-existent devices returning
> - * 0 rather than 0xffff. Catch this here and treat 0 as a non-existent
> - * device as well.
> - */
> - if (phy_id == 0)
> - return NULL;
> -
> dev = phy_device_create(bus, addr, phy_id);
>
> return dev;
> --
> 1.5.6.5
next prev parent reply other threads:[~2009-01-14 15:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-13 16:05 [PATCH] phylib: Fix Freescale TBI PHY detection Anton Vorontsov
2009-01-14 15:03 ` Anton Vorontsov [this message]
2009-01-14 18:20 ` Andy Fleming
2009-01-14 22:38 ` 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=20090114150332.GA839@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=afleming@freescale.com \
--cc=davem@davemloft.net \
--cc=giulio.benetti@micronovasrl.com \
--cc=jgarzik@pobox.com \
--cc=linuxppc-dev@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).