]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: dsa: qca8k: introduce single mii read/write lo/hi
authorChristian Marangi <ansuelsmth@gmail.com>
Thu, 29 Dec 2022 16:33:35 +0000 (17:33 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Jan 2023 09:27:12 +0000 (09:27 +0000)
commitcfbd6de588ef659c198083205dc954a6d3ed2aec
tree5c5239690ad4358838a87f8b2346b5249922892e
parent03cb9e6d0b32b768e3d9d473c5c4ca1100877664
net: dsa: qca8k: introduce single mii read/write lo/hi

It may be useful to read/write just the lo or hi half of a reg.

This is especially useful for phy poll with the use of mdio master.
The mdio master reg is composed by the first 16 bit related to setup and
the other half with the returned data or data to write.

Refactor the mii function to permit single mii read/write of lo or hi
half of the reg.

Tested-by: Ronald Wahl <ronald.wahl@raritan.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca/qca8k-8xxx.c