netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Stas Sergeev <stsp@list.ru>, netdev@vger.kernel.org
Cc: Linux kernel <linux-kernel@vger.kernel.org>,
	Stas Sergeev <stsp@users.sourceforge.net>
Subject: Re: [PATCH 1/2] add fixed_phy_update_state() - update state of fixed_phy
Date: Fri, 03 Apr 2015 12:25:42 -0700	[thread overview]
Message-ID: <551EE936.4010700@gmail.com> (raw)
In-Reply-To: <551C2B37.6000100@list.ru>

On 01/04/15 10:30, Stas Sergeev wrote:
> 
> Currently fixed_phy uses a callback to periodically poll the link state.
> This patch adds the fixed_phy_update_state() API.
> It solves the following problems:
> - On link state interrupt, MAC driver can't update status.
> Instead it needs to provide the callback to periodically query
> the HW about the link state. It is more efficient to update status
> after interrupt.
> - The callback needs to be unregistered before phy_disconnect(),
> or otherwise it will be called with net_dev==NULL. phy_disconnect()
> does not have enough info to unregister the callback automatically.
> - The callback needs to be registered before of_phy_connect() to
> avoid running with outdated state, but of_phy_connect() returns the
> phy_device pointer, which is needed to register the callback. Registering
> it before of_phy_connect() will therefore require a hack to get the
> pointer earlier.
> 
> Overall, this addition makes the subsequent patch that implements
> SGMII link status for mvneta, much cleaner.

Agreed, now that we have that, we should probably just remove the
ability to have a fixed link update callback since it suffers from all
the deficiencies you outlined above, and is creating some overhead by
polling the hardware.

Thanks!
-- 
Florian

  reply	other threads:[~2015-04-03 19:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 17:28 [PATCH v3 0/2] mvneta: SGMII-based in-band link state signaling Stas Sergeev
2015-04-01 17:30 ` [PATCH 1/2] add fixed_phy_update_state() - update state of fixed_phy Stas Sergeev
2015-04-03 19:25   ` Florian Fainelli [this message]
2015-04-03 21:25     ` Stas Sergeev
2015-04-01 17:32 ` [PATCH 2/2] mvneta: implement SGMII-based in-band link state signaling Stas Sergeev
2015-04-03 19:08 ` [PATCH v3 0/2] mvneta: " 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=551EE936.4010700@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stsp@list.ru \
    --cc=stsp@users.sourceforge.net \
    /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).