Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1737641
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next 1/4] net: dsa: move up phy enabling in core |
| Date | 2017-09-22 18:40 +0200 |
| Message-ID | <usz9F-8nF-41@gated-at.bofh.it> (permalink) |
| References | <usyZY-8kh-3@gated-at.bofh.it> <usyZY-8kh-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Sep 22, 2017 at 12:17:50PM -0400, Vivien Didelot wrote:
> bcm_sf2 is currently the only driver using the phy argument passed to
> .port_enable. It resets the state machine if the phy has been hard
> reset. This check is generic and can be moved to DSA core.
>
> dsa_port_set_state_now(p->dp, stp_state);
>
> - if (p->phy)
> - phy_start(p->phy);
> + if (phy) {
> + /* If phy_stop() has been called before, phy will be in
> + * halted state, and phy_start() will call resume.
> + *
> + * The resume path does not configure back autoneg
> + * settings, and since the internal phy may have been
> + * hard reset, we need to reset the state machine also.
> + */
> + phy->state = PHY_READY;
> + phy_init_hw(phy);
> + phy_start(phy);
> + }
Hi Vivien
If this is generic, why is it needed at all here? Shouldn't this
actually by in phylib?
Florian ?
Andrew
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next 1/4] net: dsa: move up phy enabling in core Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-09-22 18:30 +0200
Re: [PATCH net-next 1/4] net: dsa: move up phy enabling in core Andrew Lunn <andrew@lunn.ch> - 2017-09-22 18:40 +0200
Re: [PATCH net-next 1/4] net: dsa: move up phy enabling in core Florian Fainelli <f.fainelli@gmail.com> - 2017-09-22 19:00 +0200
Re: [PATCH net-next 1/4] net: dsa: move up phy enabling in core Florian Fainelli <f.fainelli@gmail.com> - 2017-09-22 19:00 +0200
csiph-web