Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-07 Thread Danilo Krummrich
I somehow missed this mail.. On Mon, Apr 05, 2021 at 10:12:36PM +0100, Russell King - ARM Linux admin wrote: > On Mon, Apr 05, 2021 at 08:58:07PM +0200, Danilo Krummrich wrote: > > On Mon, Apr 05, 2021 at 03:33:55PM +0200, Andrew Lunn wrote: > > However, this was about something else - Russell

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-06 Thread Danilo Krummrich
On Tue, Apr 06, 2021 at 12:30:11AM +0200, Danilo Krummrich wrote: > On Mon, Apr 05, 2021 at 09:27:44PM +0200, Andrew Lunn wrote: > > > Now, instead of encoding this information of the bus' capabilities at both > > > places, I'd propose just checking the mii_bus->capabilities field in the > > >

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-05 Thread Danilo Krummrich
On Mon, Apr 05, 2021 at 09:27:44PM +0200, Andrew Lunn wrote: > > Now, instead of encoding this information of the bus' capabilities at both > > places, I'd propose just checking the mii_bus->capabilities field in the > > mdiobus_c45_*() functions. IMHO this would be a little cleaner, than having

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-05 Thread Russell King - ARM Linux admin
On Mon, Apr 05, 2021 at 08:58:07PM +0200, Danilo Krummrich wrote: > On Mon, Apr 05, 2021 at 03:33:55PM +0200, Andrew Lunn wrote: > However, this was about something else - Russell wrote: > > > > We have established that MDIO drivers need to reject accesses for > > > > reads/writes that they do not

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-05 Thread Andrew Lunn
> Now, instead of encoding this information of the bus' capabilities at both > places, I'd propose just checking the mii_bus->capabilities field in the > mdiobus_c45_*() functions. IMHO this would be a little cleaner, than having > two > places where this information is stored. What do you think

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-05 Thread Danilo Krummrich
On Mon, Apr 05, 2021 at 03:33:55PM +0200, Andrew Lunn wrote: > On Sun, Apr 04, 2021 at 09:23:55PM +0200, Danilo Krummrich wrote: > > So currently every driver should check for the flag MII_ADDR_C45 and report > > an > > error in case it's unsupported. > > > > What do you think about checking the

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-05 Thread Andrew Lunn
On Sun, Apr 04, 2021 at 09:23:55PM +0200, Danilo Krummrich wrote: > On Fri, Apr 02, 2021 at 01:58:58PM +0100, Russell King - ARM Linux admin > wrote: > > On Fri, Apr 02, 2021 at 03:10:49AM +0200, Danilo Krummrich wrote: > > > On Thu, Apr 01, 2021 at 09:48:58AM +0100, Russell King - ARM Linux

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-04 Thread Danilo Krummrich
On Fri, Apr 02, 2021 at 01:58:58PM +0100, Russell King - ARM Linux admin wrote: > On Fri, Apr 02, 2021 at 03:10:49AM +0200, Danilo Krummrich wrote: > > On Thu, Apr 01, 2021 at 09:48:58AM +0100, Russell King - ARM Linux admin > > wrote: > > > One could also argue this is a feature, and it allows

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-04 Thread Danilo Krummrich
On Fri, Apr 02, 2021 at 02:28:54PM +0200, Andrew Lunn wrote: > > > Do you actually have a requirement for this? > > > > > Yes, the Marvell 88Q2112 1000Base-T1 PHY. But actually, I just recognize > > that it > > should be possible to just register it with the compatible string > >

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-02 Thread Russell King - ARM Linux admin
On Fri, Apr 02, 2021 at 03:10:49AM +0200, Danilo Krummrich wrote: > On Thu, Apr 01, 2021 at 09:48:58AM +0100, Russell King - ARM Linux admin > wrote: > > Do you actually have a requirement for this? > > > Yes, the Marvell 88Q2112 1000Base-T1 PHY. But actually, I just recognize that > it > should

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-02 Thread Andrew Lunn
> > Do you actually have a requirement for this? > > > Yes, the Marvell 88Q2112 1000Base-T1 PHY. But actually, I just recognize that > it > should be possible to just register it with the compatible string > "ethernet-phy-ieee802.3-c22" instead of "ethernet-phy-ieee802.3-c45", this > should

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-01 Thread Danilo Krummrich
On Thu, Apr 01, 2021 at 09:48:58AM +0100, Russell King - ARM Linux admin wrote: > On Thu, Apr 01, 2021 at 03:23:05AM +0200, danilokrummr...@dk-develop.de wrote: > > On 2021-03-31 20:35, Russell King - ARM Linux admin wrote: > > > On Wed, Mar 31, 2021 at 07:58:33PM +0200,

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-01 Thread Russell King - ARM Linux admin
On Thu, Apr 01, 2021 at 03:23:05AM +0200, danilokrummr...@dk-develop.de wrote: > On 2021-03-31 20:35, Russell King - ARM Linux admin wrote: > > On Wed, Mar 31, 2021 at 07:58:33PM +0200, danilokrummr...@dk-develop.de > > wrote: > > > For this cited change the only thing happening is that if > > >

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-03-31 Thread danilokrummrich
On 2021-03-31 20:35, Russell King - ARM Linux admin wrote: On Wed, Mar 31, 2021 at 07:58:33PM +0200, danilokrummr...@dk-develop.de wrote: For this cited change the only thing happening is that if get_phy_device() already failed for probing with is_c45==false (C22 devices) it tries to probe

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-03-31 Thread Russell King - ARM Linux admin
On Wed, Mar 31, 2021 at 07:58:33PM +0200, danilokrummr...@dk-develop.de wrote: > For this cited change the only thing happening is that if get_phy_device() > already failed for probing with is_c45==false (C22 devices) it tries to > probe with is_c45==true (C45 devices) which then either results

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-03-31 Thread danilokrummrich
Hi Andrew, On 2021-03-31 18:27, Andrew Lunn wrote: @@ -670,19 +670,21 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr) struct phy_device *phydev = ERR_PTR(-ENODEV); int err; + /* In case of NO_CAP and C22 only, we still can try to scan for C45 + *

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-03-31 Thread Andrew Lunn
> @@ -670,19 +670,21 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, > int addr) > struct phy_device *phydev = ERR_PTR(-ENODEV); > int err; > > + /* In case of NO_CAP and C22 only, we still can try to scan for C45 > + * devices, since indirect access will be used

[PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-03-31 Thread Danilo Krummrich
There are still a lot of mdio controllers which don't support the clause 45 frame format as well as drivers for mdio controllers which don't implement the cause 45 mode of the controller even if natively supported by the hardware. Therefore it makes sense to support clause 45 peripherals on busses