Thread (10 messages) flat view 10 messages, 4 authors, 2021-03-17

Re: [PATCH net-next v17 4/4] net: dsa: mv88e6xxx: implement .port_set_policy for Amethyst

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2021-03-17 14:33:44

On Wed, Mar 17, 2021 at 02:46:43PM +0100, Marek Behún wrote:
The 16-bit Port Policy CTL register from older chips is on 6393x changed
to Port Policy MGMT CTL, which can access more data, but indirectly and
via 8-bit registers.

The original 16-bit value is divided into first two 8-bit register in
the Port Policy MGMT CTL.

We can therefore use the previous code to compute the mask and shift,
and then
- if 0 <= shift < 8, we access register 0 in Port Policy MGMT CTL
- if 8 <= shift < 16, we access register 1 in Port Policy MGMT CTL

There are in fact other possible policy settings for Amethyst which
could be added here, but this can be done in the future.
..and not using ethtool --config-nfc perhaps, but with tc clsact, flower
filters and actions.
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Pavana Sharma <redacted>
---
I don't have any documentation for 6393x, but the change looks simple
enough.

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help