From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Andy Fleming <afleming@freescale.com>
Cc: linuxppc-dev@ozlabs.org, netdev@vger.kernel.org,
Li Yang <leoli@freescale.com>, David Miller <davem@davemloft.net>
Subject: Re: [PATCH] gianfar: Fix half-duplex operation for non-MII/RMII interfaces
Date: Thu, 25 Jun 2009 01:39:45 +0400 [thread overview]
Message-ID: <20090624213945.GB4163@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <FFCBF074-5F39-4D0C-A0C3-F488A619C821@freescale.com>
On Wed, Jun 24, 2009 at 04:25:06PM -0500, Andy Fleming wrote:
[...]
>>> My concern is that you will be detecting the GMII interface, and
>>> disallowing half-duplex, despite the fact that the interface is
>>> actually
>>> running at 10 or 100 Mbit.
>>
>> Very interesting, though I'm not sure I'm completely following. :-)
>>
>> Are you saying that I should do this instead:
>>
>> if (!phydev->duplex &&
>> (phyi == PHY_INTERFACE_MODE_MII ||
>> phyi == PHY_INTERFACE_MODE_RMII ||
>> (phyi == PHY_INTERFACE_MODE_GMII &&
>> phydev->speed < 1000)))
>> tempval &= ~MACCFG2_FULL_DUPLEX;
>> else
>> tempval |= MACCFG2_FULL_DUPLEX;
>>
>> i.e. we detected GMII interface initially, but it downgraded
>> to MII since speed is < 1000, thus we can set half-duplex in MAC?
>
> Yeah, I think that works out more correctly.
Cool, thanks.
Do you happen to know how gianfar iface auto-detection works in HW?
I mean, if we connect 100 Mbs link to the GMII PHY, then
gfar_get_interface() would return MII, correct?
If so, then I think I'll also have to change
phy_interface_t phyi = phydev->interface;
to
phy_interface_t phyi = gfar_get_interface(dev);
since phydev->interface may contain outdated information.
Or this can't happen?
> And I suspect that the same is true for UCC
Yup. Much thanks for catching this!
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
next prev parent reply other threads:[~2009-06-24 21:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 18:27 [PATCH] gianfar: Fix half-duplex operation for non-MII/RMII interfaces Anton Vorontsov
2009-06-24 20:18 ` Andy Fleming
2009-06-24 21:10 ` Anton Vorontsov
2009-06-24 21:25 ` Andy Fleming
2009-06-24 21:39 ` Anton Vorontsov [this message]
2009-06-24 21:50 ` Anton Vorontsov
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=20090624213945.GB4163@oksana.dev.rtsoft.ru \
--to=cbouatmailru@gmail.com \
--cc=afleming@freescale.com \
--cc=avorontsov@ru.mvista.com \
--cc=davem@davemloft.net \
--cc=leoli@freescale.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).