linux-brain/drivers/net/ethernet/hisilicon/hns3/hns3pf
Guangbin Huang 2f3cefa6ab net: hns3: fix get wrong pfc_en when query PFC configuration
[ Upstream commit 8c1671e0d13d4a0ba4fb3a0da932bf3736d7ff73 ]

Currently, when query PFC configuration by dcbtool, driver will return
PFC enable status based on TC. As all priorities are mapped to TC0 by
default, if TC0 is enabled, then all priorities mapped to TC0 will be
shown as enabled status when query PFC setting, even though some
priorities have never been set.

for example:
$ dcb pfc show dev eth0
pfc-cap 4 macsec-bypass off delay 0
prio-pfc 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off
$ dcb pfc set dev eth0 prio-pfc 0:on 1:on 2:on 3:on
$ dcb pfc show dev eth0
pfc-cap 4 macsec-bypass off delay 0
prio-pfc 0:on 1:on 2:on 3:on 4:on 5:on 6:on 7:on

To fix this problem, just returns user's PFC config parameter saved in
driver.

Fixes: cacde272dd ("net: hns3: Add hclge_dcb module for the support of DCB feature")
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-03 10:08:14 +02:00
..
Makefile net: hns3: fix compile error 2019-03-27 22:47:58 -07:00
hclge_cmd.c net: hns3: fix some reset handshake issue 2019-08-01 13:32:13 -04:00
hclge_cmd.h net: hns3: clear hardware resource when loading driver 2021-09-03 10:08:14 +02:00
hclge_dcb.c net: hns3: fix get wrong pfc_en when query PFC configuration 2021-09-03 10:08:14 +02:00
hclge_dcb.h net: hns3: Use the correct style for SPDX License Identifier 2019-11-05 17:45:38 -08:00
hclge_debugfs.c net: hns3: add some DFX info for reset issue 2019-09-11 09:08:46 +01:00
hclge_debugfs.h net: hns3: remove a misused pragma packed 2020-12-21 13:27:03 +01:00
hclge_err.c net: hns3: fix incorrect configuration for igu_egu_hw_err 2021-05-19 10:08:26 +02:00
hclge_err.h net: hns3: fix incorrect configuration for igu_egu_hw_err 2021-05-19 10:08:26 +02:00
hclge_main.c net: hns3: fix duplicate node in VLAN list 2021-09-03 10:08:14 +02:00
hclge_main.h net: hns3: fix a wrong reset interrupt status mask 2019-11-19 19:09:53 -08:00
hclge_mbx.c net: hns3: initialize the message content in hclge_get_link_mode() 2021-05-19 10:08:26 +02:00
hclge_mdio.c net: hns3: disable phy loopback setting in hclge_mac_start_phy 2021-05-19 10:08:26 +02:00
hclge_mdio.h net: hns3: Use the correct style for SPDX License Identifier 2019-11-05 17:45:38 -08:00
hclge_tm.c net: hns3: fix mis-counting IRQ vector numbers issue 2019-10-19 11:40:55 -07:00
hclge_tm.h net: hns3: Use the correct style for SPDX License Identifier 2019-11-05 17:45:38 -08:00