[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <046e07df-0ea1-4e4a-a205-29d17f637d69@lunn.ch>
Date: Fri, 15 Sep 2023 15:53:28 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Pawel Chmielewski <pawel.chmielewski@...el.com>
Cc: Alexander Lobakin <aleksander.lobakin@...el.com>,
"Greenwalt, Paul" <paul.greenwalt@...el.com>, aelior@...vell.com,
intel-wired-lan@...ts.osuosl.org, manishc@...vell.com,
netdev@...r.kernel.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2 2/9] ethtool: Add forced
speed to supported link modes maps
On Thu, Sep 14, 2023 at 04:27:28PM +0200, Pawel Chmielewski wrote:
> On Sun, Sep 03, 2023 at 04:00:57PM +0200, Andrew Lunn wrote:
> > > Let me check if I understand correctly- is that what was sent with the
> > > v3 [1] , with the initialization helper (ethtool_forced_speed_maps_init)
> > > and the structure map in the ethtool code? Or do you have another helper
> > > in mind?
> >
> > Sorry for the late reply, been on vacation.
> >
> > The main thing is you try to reuse the table:
> >
> > static const struct phy_setting settings[] = {}
> >
> > If you can build your helper on top of phy_lookup_setting() even
> > better. You don't need a phy_device to use those.
> >
> > Andrew
>
> Thank for the hint Andrew! I took a look into the phy-core code,
> and a little into phylink. However, I still have the same concern
> regarding modes that are supported/unsupported by hardware (managed
> by the firmware in our case). Let's say I'm only looking for duplex
> modes and iterate over speeds with advertised modes map as an argument
> for phy_lookup_setting. In this case, I still need another table/map of
> hardware compatible link modes to check against. Theese are actually
> the maps we'd like to keep in the driver (and proposed in [1]), so
> maybe the simple intersect check between them and the advertised modes
> is sufficient?
The idea was you have a mask of link modes which your hardware
actually supports. You then ask the core code, give me a link mode
which fulfils this speed and duplex, taking into account the mask.
Andrew
Powered by blists - more mailing lists