From: Andrew Lunn <andrew@lunn.ch>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 1/2] net: phy: use phy_id_mask value zero for exact match
Date: Thu, 8 Nov 2018 21:53:49 +0100 [thread overview]
Message-ID: <20181108205349.GG5259@lunn.ch> (raw)
In-Reply-To: <072cad0e-f5c0-2f40-b18d-8801834e2676@gmail.com>
> > Maybe we can find a clever way with a macro to specify only the PHY OUI
> > and compute a suitable mask automatically?
> >
> I don't think so. For Realtek each driver is specific even to a model
> revision (therefore mask 0xffffffff). Same applies to intel-xway.
> In broadcom.c we have masks 0xfffffff0, so for each model, independent
> of revision number. There is no general rule.
> Also we can't simply check for the first-bit-set to derive a mask.
I'm crystal ball gazing, but i think Florian was meaning something like
#define PHY_ID_UNIQUE(_id) \
.phy_id = _id_; \
.phy_id_mask = 0xffffffff;
It is the boilerplate setting .phy_id_mask which you don't like. This removes that boilerplate.
Andrew
next prev parent reply other threads:[~2018-11-09 6:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 20:52 [PATCH net-next 0/2] net: phy: use phy_id_mask value zero for exact match Heiner Kallweit
2018-11-07 20:53 ` [PATCH net-next 1/2] " Heiner Kallweit
2018-11-08 18:34 ` Andrew Lunn
2018-11-08 19:44 ` Florian Fainelli
2018-11-08 20:06 ` Heiner Kallweit
2018-11-08 20:53 ` Andrew Lunn [this message]
2018-11-08 23:06 ` Florian Fainelli
2018-11-07 20:54 ` [PATCH net-next 2/2] net: phy: realtek: remove boilerplate code from driver configs Heiner Kallweit
2018-11-08 18:37 ` Andrew Lunn
2018-11-08 19:38 ` Heiner Kallweit
2018-11-08 23:05 ` [PATCH net-next 0/2] net: phy: use phy_id_mask value zero for exact match 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=20181108205349.GG5259@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@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 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.