diff options
| author | Marek BehĂșn <kabel@kernel.org> | 2021-03-17 16:46:43 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2021-03-18 00:44:19 +0300 |
| commit | 6584b26020fc5bb586d6e9f621eb8a7343a6ed33 (patch) | |
| tree | 97e37ec40185dc24012abbca06e960f48885fd5d /tools/perf/scripts/python/sched-migration.py | |
| parent | de776d0d316f7230d96ac1aa1df354d880476c1f (diff) | |
| download | linux-6584b26020fc5bb586d6e9f621eb8a7343a6ed33.tar.xz | |
net: dsa: mv88e6xxx: implement .port_set_policy for Amethyst
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.
Signed-off-by: Marek BehĂșn <kabel@kernel.org>
Reviewed-by: Pavana Sharma <pavana.sharma@digi.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions
