Re: [PATCH net-next 1/3] net: phy: broadcom: Remove unused flags
From: Florian Fainelli
Date: Fri Feb 12 2021 - 20:11:33 EST
On 2/12/2021 4:56 PM, Vladimir Oltean wrote:
> On Fri, Feb 12, 2021 at 12:57:19PM -0800, Florian Fainelli wrote:
>> We have a number of unused flags defined today and since we are scarce
>> on space and may need to introduce new flags in the future remove and
>> shift every existing flag down into a contiguous assignment. No
>> functional change.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
>> ---
>
> Good to see some of the dev_flags go away!
>
> PHY_BCM_FLAGS_MODE_1000BX is used just from broadcom.c, therefore it can
> probably be moved to a structure in phydev->priv.
The next step would be to move it to a private flag, indeed.
>
> PHY_BRCM_STD_IBND_DISABLE, PHY_BRCM_EXT_IBND_RX_ENABLE and
> PHY_BRCM_EXT_IBND_TX_ENABLE are set by
> drivers/net/ethernet/broadcom/tg3.c but not used anywhere.
That's right, tg3 drove a lot of the Broadcom PHY driver changes back
then, I also would like to rework the way we pass flags towards PHY
drivers because tg3 is basically the only driver doing it right, where
it checks the PHY ID first, then sets appropriate flags during connect.
--
Florian