diff options
author | Yuval Mintz <Yuval.Mintz@qlogic.com> | 2016-07-27 14:45:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-30 20:33:53 -0700 |
commit | c524e2f5b7036c1ab4d8296b6869544b9eea01cd (patch) | |
tree | 231c33f5402f041f4d824c0952d5cbcd06dd9904 /drivers/net | |
parent | 797cee982eef9195736afc5e7f3b8f613c41d19a (diff) | |
download | linux-c524e2f5b7036c1ab4d8296b6869544b9eea01cd.tar.bz2 |
qede: Don't try removing unconfigured vlans
As part of ndo_vlan_rx_kill_vid() implementation,
qede is requesting firmware to remove the vlan filter.
This currently happens even if the vlan wasn't previously
added [In case device ran out of vlan credits].
For PFs this doesn't cause any issues as the firmware
would simply ignore the removal request. But for VFs their
parent PF is holding an accounting of the configured vlans,
and such a request would cause the PF to fail the VF's
removal request.
Simply fix this for both PFs & VFs and don't remove filters
that were not previously added.
Fixes: 7c1bfcad9f3c8 ("qede: Add vlan filtering offload support")
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/qlogic/qede/qede_main.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c index 91e7bb0b85c8..c9ebb59a5819 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_main.c +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c @@ -2064,10 +2064,13 @@ static int qede_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid) } /* Remove vlan */ - rc = qede_set_ucast_rx_vlan(edev, QED_FILTER_XCAST_TYPE_DEL, vid); - if (rc) { - DP_ERR(edev, "Failed to remove VLAN %d\n", vid); - return -EINVAL; + if (vlan->configured) { + rc = qede_set_ucast_rx_vlan(edev, QED_FILTER_XCAST_TYPE_DEL, + vid); + if (rc) { + DP_ERR(edev, "Failed to remove VLAN %d\n", vid); + return -EINVAL; + } } qede_del_vlan_from_list(edev, vlan); |