Skip to content

Commit

Permalink
be2net: do not remove vids from driver table if be_vid_config() fails.
Browse files Browse the repository at this point in the history
The driver currently removes a new vid from the adapter->vids[] array if
be_vid_config() returns an error, which occurs when there is an error in
HW/FW. This is wrong. After the HW/FW error is recovered from, we need the
complete vids[] array to re-program the vlan list.

Signed-off-by: Sathya Perla <sathya.perla@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sathya Perla authored and David S. Miller committed Aug 8, 2016
1 parent 841f60f commit 0aff1fb
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1463,13 +1463,7 @@ static int be_vlan_add_vid(struct net_device *netdev, __be16 proto, u16 vid)
set_bit(vid, adapter->vids);
adapter->vlans_added++;

status = be_vid_config(adapter);
if (status) {
adapter->vlans_added--;
clear_bit(vid, adapter->vids);
}

return status;
return be_vid_config(adapter);
}

static int be_vlan_rem_vid(struct net_device *netdev, __be16 proto, u16 vid)
Expand Down

0 comments on commit 0aff1fb

Please sign in to comment.