]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: mscc: ocelot: extend watermark encoding function
authorMaxim Kochetkov <fido_max@inbox.ru>
Mon, 13 Jul 2020 16:57:08 +0000 (19:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Oct 2020 09:55:58 +0000 (11:55 +0200)
commit9fd541ad02bd2bb34a1f931068afd5313336d4e4
tree3541bdf4f1e418a00d8b00f1ef28d39c16a56c26
parent13c1167842508e38b97de2bd9c720c6e04fe0994
net: mscc: ocelot: extend watermark encoding function

[ Upstream commit aa92d836d5c40a7e21e563a272ad177f1bfd44dd ]

The ocelot_wm_encode function deals with setting thresholds for pause
frame start and stop. In Ocelot and Felix the register layout is the
same, but for Seville, it isn't. The easiest way to accommodate Seville
hardware configuration is to introduce a function pointer for setting
this up.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/ocelot/felix_vsc9959.c
drivers/net/ethernet/mscc/ocelot.c
drivers/net/ethernet/mscc/ocelot_vsc7514.c
include/soc/mscc/ocelot.h