diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2022-02-02 01:03:33 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-02 15:44:00 +0100 |
commit | 2481d206fae7884cd07014fd1318e63af35e99eb (patch) | |
tree | 19a085ed03883771bf1ebd489ec5baa53824596c /drivers/net/dsa/qca8k.h | |
parent | net: dsa: qca8k: move page cache to driver priv (diff) | |
download | linux-2481d206fae7884cd07014fd1318e63af35e99eb.tar.xz linux-2481d206fae7884cd07014fd1318e63af35e99eb.zip |
net: dsa: qca8k: cache lo and hi for mdio write
From Documentation, we can cache lo and hi the same way we do with the
page. This massively reduce the mdio write as 3/4 of the time as we only
require to write the lo or hi part for a mdio write.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/qca8k.h')
-rw-r--r-- | drivers/net/dsa/qca8k.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h index 57368acae41b..c3d3c2269b1d 100644 --- a/drivers/net/dsa/qca8k.h +++ b/drivers/net/dsa/qca8k.h @@ -369,6 +369,11 @@ struct qca8k_mdio_cache { * mdio writes */ u16 page; +/* lo and hi can also be cached and from Documentation we can skip one + * extra mdio write if lo or hi is didn't change. + */ + u16 lo; + u16 hi; }; struct qca8k_priv { |