public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@zonque•org>
To: Florian Fainelli <f.fainelli@gmail•com>
Cc: netdev <netdev@vger•kernel.org>,
	David Miller <davem@davemloft•net>,
	marek.belisko@gmail•com, Matus Ujhelyi <ujhelyi.m@gmail•com>
Subject: Re: [PATCH 1/3] net: phylib: add adjust_state callback to phy device
Date: Thu, 05 Jun 2014 09:14:30 +0200	[thread overview]
Message-ID: <539018D6.4000806@zonque.org> (raw)
In-Reply-To: <CAGVrzcYfa6rwhqpZ8NB9Za0WdJDi3eePoYLcHsqQnUhuP3ui=w@mail.gmail.com>

Hi Florian,

On 06/05/2014 07:11 AM, Florian Fainelli wrote:
> 2014-06-04 2:00 GMT-07:00 Daniel Mack <zonque@gmail•com>:
>> Allow phy drivers to take action when the core does its link adjustment.
>> No change for drivers that do not implement this callback.
> 
> This sounds potentially dangerous if misused, PHY drivers would
> basically be allowed to do arbitrary link state changes based on their
> custom needs.

Yes, and this is basically what my quirk handler does. It takes action
when the link goes down (PHY_NOLINK), as we unfortunately need to reset
the chip every time this happens.

> I really need to review your workaround here to better
> understand whether we can come up with a solution that allows for less
> liberty in PHY drivers.

Sure, any other way of calling back to the PHY when the core enters the
PHY_NOLINK state would do. I just thought that an adjust_state callback
is most versatile, but I understand that it could be misused.


Thanks for having a look!

Daniel

  reply	other threads:[~2014-06-05  7:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04  9:00 [PATCH 0/3] Handle stuck TX queue bug in AT8030 PHY Daniel Mack
2014-06-04  9:00 ` [PATCH 1/3] net: phylib: add adjust_state callback to phy device Daniel Mack
2014-06-05  5:11   ` Florian Fainelli
2014-06-05  7:14     ` Daniel Mack [this message]
2014-06-05 18:12       ` Florian Fainelli
2014-06-05 21:39         ` Daniel Mack
2014-06-04  9:00 ` [PATCH 2/3] net: phy: at803x: use #defines for supported PHY ids Daniel Mack
2014-06-04  9:00 ` [PATCH 3/3] net: phy: at803x: Add support for hardware reset Daniel Mack

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=539018D6.4000806@zonque.org \
    --to=daniel@zonque$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=f.fainelli@gmail$(echo .)com \
    --cc=marek.belisko@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=ujhelyi.m@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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