[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181108205349.GG5259@lunn.ch>
Date: Thu, 8 Nov 2018 21:53:49 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Heiner Kallweit <hkallweit1@...il.com>
Cc: Florian Fainelli <f.fainelli@...il.com>,
David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 1/2] net: phy: use phy_id_mask value zero for
exact match
> > 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
Powered by blists - more mailing lists