LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Esben Haabendal <esben.haabendal@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: andrew@lunn.ch, f.fainelli@gmail.com, richardcochran@gmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
rasmus.villemoes@prevas.dk
Subject: Re: [PATCH 2/2] net: phy: dp83640: Read strapped configuration settings
Date: Fri, 06 Apr 2018 13:05:06 +0200 [thread overview]
Message-ID: <87h8oo61el.fsf@gmail.com> (raw)
In-Reply-To: <20180405.222437.1573582680811455269.davem@davemloft.net> (David Miller's message of "Thu, 05 Apr 2018 22:24:37 -0400 (EDT)")
David Miller <davem@davemloft.net> writes:
> From: Andrew Lunn <andrew@lunn.ch>
> Date: Thu, 5 Apr 2018 22:40:49 +0200
>
>> Or could it still contain whatever state the last boot of Linux, or
>> maybe the bootloader, left the PHY in?
>
> Right, this is my concern as well.
I don't think that should happen.
With config_init() being called (in phy_init_hw()) after soft_reset(),
any state set by software should be cleared.
>From DP83620 datasheet description of what happens when BMCR_RESET is
set:
The software reset will reset the device such that all registers
will be reset to default values and the hardware configuration
values will be maintained.
But something else that could be a concern is the risk that there is
boards out there with wrong hardware configuration, which works with
current Linux (because it ignores hardware configuration). Such designs
could break with this patch.
If we need to safeguard against that, maybe we could just keep the
genphy_read_config() function in the kernel, and let board specific code
use it as a phy_fixup where hardware configuration is to be respected.
Would that be a better approach?
/Esben
next prev parent reply other threads:[~2018-04-06 11:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 11:44 [PATCH 1/2] net: phy: Helper function for reading strapped configuration values esben.haabendal
2018-04-05 11:44 ` [PATCH 2/2] net: phy: dp83640: Read strapped configuration settings esben.haabendal
2018-04-05 16:02 ` Florian Fainelli
2018-04-05 20:30 ` Esben Haabendal
2018-04-05 20:40 ` Andrew Lunn
2018-04-06 2:24 ` David Miller
2018-04-06 11:05 ` Esben Haabendal [this message]
2018-04-05 20:34 ` Esben Haabendal
2018-04-05 16:00 ` [PATCH 1/2] net: phy: Helper function for reading strapped configuration values Florian Fainelli
2018-04-05 20:18 ` Esben Haabendal
2018-04-05 20:34 ` Esben Haabendal
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=87h8oo61el.fsf@gmail.com \
--to=esben.haabendal@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rasmus.villemoes@prevas.dk \
--cc=richardcochran@gmail.com \
--subject='Re: [PATCH 2/2] net: phy: dp83640: Read strapped configuration settings' \
/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
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).