]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 12 Apr 2018 13:06:52 +0000 (10:06 -0300)
commit56a388d1450c525d46ca5463413cbe1948b01467
tree3bbf0f86f344dfcfa5c3aac13e532379c6d0a62b
parentb6d5f4bfcc3d90de9533cb81ca393488d5dceb30
net/mlx4_en: Fix mixed PFC and Global pause user control requests

BugLink: http://bugs.launchpad.net/bugs/1763366
[ Upstream commit 6e8814ceb7e8f468659ef9253bd212c07ae19584 ]

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: af7d51852631 ("net/mlx4_en: Add DCB PFC support through CEE netlink commands")
Fixes: c27a02cd94d6 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
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