]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Fix mixed PFC and Global pause user control requests
authorEran Ben Elisha <eranbe@mellanox.com>
Tue, 27 Mar 2018 11:41:18 +0000 (14:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Mar 2018 16:02:30 +0000 (12:02 -0400)
commit262149950d6a9a1ba27f0d0e7ae9039e0b3a66b6
tree969970bea901bed43c6901258c0e0ed7f7cdecb9
parent41060f8e7707039c0956939132167e626d134863
net/mlx4_en: Fix mixed PFC and Global pause user control requests

Global pause and PFC configuration should be mutually exclusive (i.e. only
one of them at most can be set). However, once PFC was turned off,
driver automatically turned Global pause on. This is a bug.

Fix the driver behaviour to turn off PFC/Global once the user turned the
other on.

This also fixed a weird behaviour that at a current time, the profile
had both PFC and global pause configuration turned on, which is
Hardware-wise impossible and caused returning false positive indication
to query tools.

In addition, fix error code when setting global pause or PFC to change
metadata only upon successful change.

Also, removed useless debug print.

Fixes: aa6877a6d9e3 ("net/mlx4_en: Add DCB PFC support through CEE netlink commands")
Fixes: eebe24d1aff7 ("mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
drivers/net/ethernet/mellanox/mlx4/en_main.c