[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YyHoXUyBIMyFGZTX@lunn.ch>
Date: Wed, 14 Sep 2022 16:42:37 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Mattias Forsblad <mattias.forsblad@...il.com>
Cc: netdev@...r.kernel.org, Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, linux@...linux.org.uk
Subject: Re: [PATCH net-next v11 5/6] net: dsa: mv88e6xxx: rmon: Use RMU for
reading RMON data
> @@ -1234,16 +1234,30 @@ static int mv88e6xxx_stats_get_stats(struct mv88e6xxx_chip *chip, int port,
> u16 bank1_select, u16 histogram)
> {
> struct mv88e6xxx_hw_stat *stat;
> + int offset = 0;
> + u64 high;
> int i, j;
>
> for (i = 0, j = 0; i < ARRAY_SIZE(mv88e6xxx_hw_stats); i++) {
> stat = &mv88e6xxx_hw_stats[i];
> if (stat->type & types) {
> - mv88e6xxx_reg_lock(chip);
> - data[j] = _mv88e6xxx_get_ethtool_stat(chip, stat, port,
> - bank1_select,
> - histogram);
> - mv88e6xxx_reg_unlock(chip);
> + if (mv88e6xxx_rmu_available(chip) &&
> + !(stat->type & STATS_TYPE_PORT)) {
If i understand you comment to a previous version, the problem here is
STATS_TYPE_PORT. You are falling back to MDIO for those three
statistics. The data sheet for the 6352 shows these statistics are
available at offset 129 and above in the RMU reply.
I looked through the datasheets i have. I don't have a full set, but
all that i have which include the RMU have these statistics at offset
129.
So i think you can remove the fallback to MDIO. That should then allow
you to have a fully independent implementation, making it much
cleaner.
Or do you see other problems i currently don't?
Andrew
Powered by blists - more mailing lists