From: Andrew Lunn <andrew@lunn.ch>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Heiner Kallweit" <hkallweit1@gmail.com>,
"Vivien Didelot" <vivien.didelot@savoirfairelinux.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
netdev <netdev@vger.kernel.org>,
"OpenWrt Development List" <openwrt-devel@lists.openwrt.org>,
"LEDE Development List" <lede-dev@lists.infradead.org>,
"Antti Seppälä" <a.seppala@gmail.com>,
"Roman Yeryomin" <roman@advem.lv>,
"Colin Leitner" <colin.leitner@googlemail.com>,
"Gabor Juhos" <juhosg@openwrt.org>
Subject: Re: [1/4,RFCv2] net: phy: realtek: Support RTL8366RB variant
Date: Tue, 29 May 2018 22:17:54 +0200 [thread overview]
Message-ID: <20180529201754.GE13697@lunn.ch> (raw)
In-Reply-To: <CACRpkdaKZC2YHYO_xLEtTB6DYW4FpapNBe4KQSCO57iHmCLZvw@mail.gmail.com>
On Tue, May 29, 2018 at 10:01:14PM +0200, Linus Walleij wrote:
> On Tue, May 29, 2018 at 8:51 PM, Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> >> +#define RTL8366RB_POWER_SAVE 0x21
>
> > Typically PHY register addresses are 5 bits wide, is 0x21 correct
> > and I miss something?
Heiner is correct, MDIO only supports 32 register, when using clause
22. However, your device is not clause 22, it is its own thing. So one
danger you have is that we put some checks in the generic code testing
for values > 31, and return -EINVAL.
I think you have two choices:
1) A comment explaining what is going on here, how 0x21 is valid in
this context. And check the return value and give out a good warning
which will point somebody in the right direction to notice this 0x21.
2) Move this into the DSA driver, which does not have this
restriction.
Andrew
next prev parent reply other threads:[~2018-05-29 20:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-28 17:47 [PATCH 0/4 RFCv2] Realtek SMI RTL836x DSA driver Linus Walleij
2018-05-28 17:47 ` [PATCH 1/4 RFCv2] net: phy: realtek: Support RTL8366RB variant Linus Walleij
2018-05-29 12:34 ` Andrew Lunn
2018-05-29 18:51 ` [1/4,RFCv2] " Heiner Kallweit
2018-05-29 20:01 ` Linus Walleij
2018-05-29 20:17 ` Andrew Lunn [this message]
2018-05-29 21:15 ` Heiner Kallweit
2018-05-28 17:47 ` [PATCH 2/4 RFCv2] net: dsa: Add bindings for Realtek SMI DSAs Linus Walleij
2018-05-28 18:54 ` Andrew Lunn
2018-05-29 19:30 ` Florian Fainelli
2018-05-28 17:47 ` [PATCH 3/4 RFCv2] net: dsa: realtek-smi: Add Realtek SMI driver Linus Walleij
2018-05-28 19:33 ` Andrew Lunn
2018-05-28 19:45 ` Andrew Lunn
2018-05-28 17:47 ` [PATCH 4/4 RFCv2] ARM: dts: Add ethernet and switch to D-Link DIR-685 Linus Walleij
2018-05-28 18:20 ` [PATCH 0/4 RFCv2] Realtek SMI RTL836x DSA driver Andrew Lunn
2018-05-29 8:49 ` Linus Walleij
2018-05-29 12:24 ` Andrew Lunn
2018-05-29 18:41 ` Linus Walleij
2018-05-29 18:57 ` [OpenWrt-Devel] " Kevin Darbyshire-Bryant
2018-05-29 19:47 ` Linus Walleij
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=20180529201754.GE13697@lunn.ch \
--to=andrew@lunn.ch \
--cc=a.seppala@gmail.com \
--cc=colin.leitner@googlemail.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=juhosg@openwrt.org \
--cc=lede-dev@lists.infradead.org \
--cc=linus.walleij@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=openwrt-devel@lists.openwrt.org \
--cc=roman@advem.lv \
--cc=vivien.didelot@savoirfairelinux.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.