net: stmmac: Add support to Ethtool get/set ring parameters
authorSong, Yoong Siang <yoong.siang.song@intel.com>
Wed, 16 Sep 2020 07:40:20 +0000 (15:40 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Sep 2020 22:22:52 +0000 (15:22 -0700)
commitaa042f60e4961d4bec57e3268624df1f3a6befa4
treec0d0bb6a3feab3d44a0ad1901b20b15e04b1bdc5
parent18e9a407323fa8ffa2ba64c4240a2d4faeb9ad4d
net: stmmac: Add support to Ethtool get/set ring parameters

This patch add support to --show-ring & --set-ring Ethtool functions:
- Adding min, max, power of two check to new ring parameter's value.
- Bring down the network interface before changing the value of ring
  parameters.
- Bring up the network interface after changing the value of ring
  parameters.

Signed-off-by: Song, Yoong Siang <yoong.siang.song@intel.com>
Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/chain_mode.c
drivers/net/ethernet/stmicro/stmmac/common.h
drivers/net/ethernet/stmicro/stmmac/ring_mode.c
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c