]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
qlge: Fix netdev features configuration.
authorManish Chopra <manish.chopra@cavium.com>
Thu, 23 Aug 2018 20:20:52 +0000 (13:20 -0700)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:46:14 +0000 (19:46 -0600)
commitcab09f7768f8cd6fd93a4e48f10505d341eae074
treebfc61a42dfa4358b9e7a355d84db89436a80bd43
parent6635494139c83834d3a9da195842016969bd7496
qlge: Fix netdev features configuration.

BugLink: https://bugs.launchpad.net/bugs/1835972
[ Upstream commit 6750c87074c5b534d82fdaabb1deb45b8f1f57de ]

qlge_fix_features() is not supposed to modify hardware or
driver state, rather it is supposed to only fix requested
fetures bits. Currently qlge_fix_features() also goes for
interface down and up unnecessarily if there is not even
any change in features set.

This patch changes/fixes following -

1) Move reload of interface or device re-config from
   qlge_fix_features() to qlge_set_features().
2) Reload of interface in qlge_set_features() only if
   relevant feature bit (NETIF_F_HW_VLAN_CTAG_RX) is changed.
3) Get rid of qlge_fix_features() since driver is not really
   required to fix any features bit.

Signed-off-by: Manish <manish.chopra@cavium.com>
Reviewed-by: Benjamin Poirier <bpoirier@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/qlogic/qlge/qlge_main.c