From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATH RFC net-next 7/8] net: phy: Replace phy driver features u32 with link_mode bitmap Date: Sun, 16 Sep 2018 00:30:53 +0200 Message-ID: <20180915223053.GA6038@lunn.ch> References: <1536961136-30453-1-git-send-email-andrew@lunn.ch> <1536961136-30453-8-git-send-email-andrew@lunn.ch> <12e5b18f-400f-d4d0-aca3-4e4d8b4bb6a9@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev To: Florian Fainelli Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:35594 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727940AbeIPDva (ORCPT ); Sat, 15 Sep 2018 23:51:30 -0400 Content-Disposition: inline In-Reply-To: <12e5b18f-400f-d4d0-aca3-4e4d8b4bb6a9@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Sat, Sep 15, 2018 at 02:31:14PM -0700, Florian Fainelli wrote: > > > On 09/14/18 14:38, Andrew Lunn wrote: > > This is one step in allowing phylib to make use of link_mode bitmaps, > > instead of u32 for supported and advertised features. Convert the phy > > drivers to use bitmaps to indicates the features they support. This > > requires some macro magic in order to construct constant bitmaps used > > to initialise the driver structures. > > > > Some new PHY_*_FEATURES are added, to indicate FIBRE is supported, and > > that all media ports are supported. This is done since bitmaps cannot > > be ORed together at compile time. > > > > Within phylib, the features bitmap is currently turned back into a > > u32. The MAC API to phylib needs to be cleaned up before the core of > > phylib can be converted to using bitmaps instead of u32. > > Nice! Hi Florian This is the patch i don't like. I'm hoping somebody can think of a better way to initialise a bitmap. Andrew