[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <95eb709c-a91f-4390-30b2-9e81e4534e20@gmail.com>
Date: Thu, 23 Mar 2023 11:19:12 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Álvaro Fernández Rojas <noltari@...il.com>,
jonas.gorski@...il.com, andrew@...n.ch, olteanv@...il.com,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, linux@...linux.org.uk, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/1] net: dsa: b53: mmap: add dsa switch ops
On 3/23/23 10:02, Álvaro Fernández Rojas wrote:
> B53 MMAP switches have a MDIO Mux bus controller which should be used instead
> of the default phy_read/phy_write ops used in the rest of the B53 controllers.
> Therefore, in order to use the proper MDIO Mux bus controller we need to
> replicate the default B53 DSA switch ops removing the phy_read/phy_write
> entries.
Did you try to implement b53_mmap_ops::phy_read16/phy_write16 and have
them return -EIO such that you do not fallback to the else path:
ret = b53_read16(priv, B53_PORT_MII_PAGE(addr),
reg * 2, &value);
The reason for the hang I believe is because the B53_PORT_MII_PAGE is
simply not mapped into the switch register space, and there is no logic
within the switch block to return an error when you read at that invalid
location.
Re-implementing dsa_switch_ops is usually done when you have a very
different switch integration logic, ala bcm_sf2, here it seems a bit of
a tall order for simply not using the phy_read16/phy_write16 functions.
--
Florian
Powered by blists - more mailing lists