devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: devicetree@vger.kernel.org, "Eric Miao" <eric.y.miao@gmail.com>,
	netdev@vger.kernel.org,
	"Antoine Ténart" <antoine.tenart@free-electrons.com>,
	linux-kernel@vger.kernel.org,
	"Haojian Zhuang" <haojian.zhuang@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFT 0/8] Marvell PXA168 libphy handling and Berlin Ethernet
Date: Thu, 09 Oct 2014 09:57:35 -0700	[thread overview]
Message-ID: <5436BE7F.7000603@gmail.com> (raw)
In-Reply-To: <5436A8B2.1030200@gmail.com>

On 10/09/2014 08:24 AM, Sebastian Hesselbarth wrote:
> On 10/09/2014 04:47 PM, Thomas Petazzoni wrote:
>> Well, I initially remember that the original driver coming from Marvell
>> was using the HW PHY stuff, and that I changed that because it would
>> not integrate well with the kernel libphy.
>>
>> A drawback of this is that because the hardware has built-in PHY
>> polling which triggers a MAC interrupt when the PHY status changes, they
>> typically don't wire up the PHY interrupt. Therefore, since we're not
>> able to use the MAC interrupt for PHY event notifications, we rely on
>> software PHY polling, which means that link up / link down events take
>> a few seconds to be noticed by the kernel. Unfortunately, I don't think
>> the hardware allows to use the hardware PHY polling to get link changes
>> interrupt, but not let the hardware configure the PHY itself.
> 
> Yeah, but that HW PHY stuff really only works properly with standard
> compliant PHYs. In particular, the integrated Marvell PHY in Marvell
> Berlin SoCs does not seem to reflect PHY status on BMCR properly /sigh/.
> Anyway, I think we can live with PHY polling.
> 
> BTW, one thing I noticed here is that libphy calls adjust_link
> over-and-over again although nothing has changed. I guess we can just
> add some before/after comparison in the libphy state machine and only
> call adjust_link when something has changed. I'll have to look closer
> at the state machine first and maybe Florian can comment on this,
> too.

There's basically nothing built in the generic libphy that would try to
limit the number of times the adjust_link() callback is invoked, some
changes went in the bcmgenet driver to avoid that, I have yet to see how
much of this logic is transferable to the libphy layer.
--
Florian

  reply	other threads:[~2014-10-09 16:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-09 12:38 [PATCH RFT 0/8] Marvell PXA168 libphy handling and Berlin Ethernet Sebastian Hesselbarth
2014-10-09 12:39 ` [PATCH RFT 6/8] ARM: berlin: Add BG2 ethernet DT nodes Sebastian Hesselbarth
2014-10-09 12:39 ` [PATCH RFT 7/8] ARM: berlin: Add BG2CD " Sebastian Hesselbarth
2014-10-09 12:39 ` [PATCH RFT 8/8] ARM: berlin: Enable ethernet on Sony NSZ-GS7 Sebastian Hesselbarth
     [not found] ` <1412858346-11334-1-git-send-email-sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-09 14:33   ` [PATCH RFT 0/8] Marvell PXA168 libphy handling and Berlin Ethernet Thomas Petazzoni
2014-10-09 14:41     ` Sebastian Hesselbarth
     [not found]       ` <54369EAC.5040301-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-09 14:47         ` Thomas Petazzoni
2014-10-09 15:24           ` Sebastian Hesselbarth
2014-10-09 16:57             ` Florian Fainelli [this message]
2014-10-09 17:28               ` Sebastian Hesselbarth
2014-10-16  9:53 ` Antoine Tenart
2014-10-20 14:37   ` Sebastian Hesselbarth
2014-10-20 15:10     ` Antoine Tenart

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=5436BE7F.7000603@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=antoine.tenart@free-electrons.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=eric.y.miao@gmail.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /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).