From: Heiner Kallweit <hkallweit1@gmail.com>
To: "Lendacky, Thomas" <Thomas.Lendacky@amd.com>,
Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"S-k, Shyam-sundar" <Shyam-sundar.S-k@amd.com>
Subject: Re: [PATCH net-next v2 1/4] net: phy: start state machine in phy_start only
Date: Tue, 22 Jan 2019 20:09:08 +0100 [thread overview]
Message-ID: <cab82f78-a331-b607-3505-4a03f8db9d50@gmail.com> (raw)
In-Reply-To: <a0ceabb0-4118-4295-6bf3-3cb006735ceb@amd.com>
On 22.01.2019 15:46, Lendacky, Thomas wrote:
> On 1/21/19 12:36 PM, Heiner Kallweit wrote:
>> On 21.01.2019 17:35, Andrew Lunn wrote:
>>> On Sun, Jan 20, 2019 at 10:01:15AM +0100, Heiner Kallweit wrote:
>>>> The state machine is a no-op before phy_start() has been called.
>>>> Therefore let's enable it in phy_start() only. In phy_start()
>>>> let's call phy_start_machine() instead of phy_trigger_machine().
>>>> phy_start_machine is an alias for phy_trigger_machine but it makes
>>>> clearer that we start the state machine here instead of just
>>>> triggering a run.
>>>
>>> Hi Heiner
>>>
>>> Documentation/networking/phy.txt has a section "Doing it all yourself"
>>> It would be good to review that, and make sure that documentation is
>>> still valid. I'm not sure any MAC driver actually does do it all
>>> itself. So it might be worth reviewing the whole document and making
>>> updates to remove parts of the text.
>>>
>> Right. I figured out that I have update phy.txt anyway because I
>> recently removed phy_stop_interrupts which is referenced in the
>> documentation. OK if we leave the patch series as is and I submit
>> the documentation update as a separate patch?
>
> I think you need to be careful here and not break what is allowed in the
> "Doing it all yourself" section. The amd-xgbe driver makes use of this
> functionality and does not use phy_start()/phy_stop(). Specifically, it
> does:
> get_phy_device();
> phy_device_register();
> phy_attach_direct();
>
> At which point it uses phy_start_aneg(), phy_read(), phy_write(),
> phy_read_status() and phy_aneg_done().
>
Thanks for the hint, Tom. I *think* the changes should be safe.
However, if AMD has a regression test suite I'd appreciate if you could
test the changes upfront or once they reach net-next.
> I'm not sure what other drivers out there that make use of this support
> within phylib.
>
> Btw, I did notice this revert that was applied that eliminated a warning
> that I started seeing in 5.0, so that is good:
> d9f903f6af3d ("net: phy: fix too strict check in phy_start_aneg")
>
> Thanks,
> Tom
>
>>
>>> Andrew
>>>
>>>
>> Heiner
>>
next prev parent reply other threads:[~2019-01-22 19:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-20 8:59 [PATCH net-next v2 0/4] net: phy: improve starting PHY Heiner Kallweit
2019-01-20 9:01 ` [PATCH net-next v2 1/4] net: phy: start state machine in phy_start only Heiner Kallweit
2019-01-21 16:35 ` Andrew Lunn
2019-01-21 18:36 ` Heiner Kallweit
2019-01-21 18:42 ` Andrew Lunn
2019-01-21 21:52 ` Heiner Kallweit
2019-01-21 23:55 ` Andrew Lunn
2019-01-22 14:46 ` Lendacky, Thomas
2019-01-22 19:09 ` Heiner Kallweit [this message]
2019-01-23 2:50 ` S-k, Shyam-sundar
2019-01-20 9:02 ` [PATCH net-next v2 2/4] net: phy: warn if phy_start is called from invalid state Heiner Kallweit
2019-01-21 16:40 ` Andrew Lunn
2019-01-21 18:25 ` Heiner Kallweit
2019-01-21 18:29 ` Andrew Lunn
2019-01-21 18:30 ` Heiner Kallweit
2019-01-20 9:03 ` [PATCH net-next v2 3/4] net: phy: start interrupts in phy_start Heiner Kallweit
2019-01-20 9:05 ` [PATCH net-next v2 4/4] net: phy: change phy_start_interrupts to phy_request_interrupt Heiner Kallweit
2019-01-22 22:50 ` [PATCH net-next v2 0/4] net: phy: improve starting PHY 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=cab82f78-a331-b607-3505-4a03f8db9d50@gmail.com \
--to=hkallweit1@gmail.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=Thomas.Lendacky@amd.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--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).