[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <72530e86-9ba9-4a01-9cd2-68835ecae7a0@lunn.ch>
Date: Tue, 7 Mar 2023 21:35:42 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Klaus Kudielka <klaus.kudielka@...il.com>
Cc: Michael Walle <michael@...le.cc>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Felix Fietkau <nbd@....name>,
John Crispin <john@...ozen.org>,
Sean Wang <sean.wang@...iatek.com>,
Mark Lee <Mark-MC.Lee@...iatek.com>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Bryan Whitehead <bryan.whitehead@...rochip.com>,
UNGLinuxDriver@...rochip.com,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Joel Stanley <joel@....id.au>,
Andrew Jeffery <andrew@...id.au>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
linux-stm32@...md-mailman.stormreply.com,
linux-aspeed@...ts.ozlabs.org,
Jesse Brandeburg <jesse.brandeburg@...el.com>
Subject: Re: [PATCH net-next v2 4/6] net: mdio: scan bus based on bus
capabilities for C22 and C45
> Summary: Still 4 calls to mdio_bus_scan_c22, but also *2* calls to mdio_bus_scan_c45, approx. 190*100 reads by the switch driver
Those calls to mdio_bus_scan_c45 are caused by 743a19e38d02 net: dsa:
mv88e6xxx: Separate C22 and C45 transactions.
Some families of the mv88e6xxx do support C45 bus transactions. That
includes the 6171 you have. Before, we never scanned the C45 bus, but
now we do.
But something does not add up. Doing an additional c45 scan should
only double the number of reads by the switch driver.
The only part of a c45 scan which is not linear is
mv88e6xxx_g2_smi_phy_wait() which is implemented by
mv88e6xxx_wait_mask(). That loops reading a register waiting for a bit
to change. Maybe print out the value of i, and see if it is looping
more times for C45 than C22?
Andrew
Powered by blists - more mailing lists