Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1395457
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH net-next 01/20] net: dsa: mv88e6xxx: factorize PHY access with PPU |
| Date | 2016-05-06 01:00 +0200 |
| Message-ID | <rvAps-Kj-19@gated-at.bofh.it> (permalink) |
| References | <rvAfL-Dg-3@gated-at.bofh.it> <rvAfM-Dg-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, May 05, 2016 at 06:40:45PM -0400, Vivien Didelot wrote:
> Add a flags bitmap to the mv88e6xxx_info structure to help describing
> features supported or not by a switch model.
>
> Add a MV88E6XXX_FLAG_PPU flag to describe switch models with a PHY
> Polling Unit. This allows to merge PPU specific PHY access code in the
> share code. In the meantime, use unlocked register accesses.
>
> Since the PPU code is shared, also remove NET_DSA_MV88E6XXX_NEED_PPU.
> -#ifdef CONFIG_NET_DSA_MV88E6XXX_NEED_PPU
> -static int mv88e6xxx_ppu_disable(struct mv88e6xxx_priv_state *ps)
> +static int _mv88e6xxx_ppu_enable(struct mv88e6xxx_priv_state *ps, bool enable)
> {
> - int ret;
The change log does not say anything about refactoring
mv88e6xxx_ppu_disable() and mv88e6xxx_ppu_enable() into one function.
That should be in separate patch. Also, i don't see much value in this
refactoring. The names mv88e6xxx_ppu_disable() and
mv88e6xxx_ppu_enable() are much clearer than having one function which
takes a bool.
Andrew
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH net-next 01/20] net: dsa: mv88e6xxx: factorize PHY access with PPU Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-05-06 00:50 +0200 Re: [RFC PATCH net-next 01/20] net: dsa: mv88e6xxx: factorize PHY access with PPU Andrew Lunn <andrew@lunn.ch> - 2016-05-06 01:00 +0200 Re: [RFC PATCH net-next 01/20] net: dsa: mv88e6xxx: factorize PHY access with PPU Andrew Lunn <andrew@lunn.ch> - 2016-05-06 01:00 +0200 Re: [RFC PATCH net-next 01/20] net: dsa: mv88e6xxx: factorize PHY access with PPU Andrew Lunn <andrew@lunn.ch> - 2016-05-06 01:10 +0200
csiph-web