ixgbevf: Add error messages on vlan error
ixgbevf did not provide an error in dmesg if VLAN addition failed. Add two descriptive failure messages in the kernel log. Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com> Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
f49fafa504
commit
eac0b6804b
@ -2044,12 +2044,16 @@ static int ixgbevf_vlan_rx_add_vid(struct net_device *netdev,
|
||||
|
||||
spin_unlock_bh(&adapter->mbx_lock);
|
||||
|
||||
/* translate error return types so error makes sense */
|
||||
if (err == IXGBE_ERR_MBX)
|
||||
return -EIO;
|
||||
if (err) {
|
||||
netdev_err(netdev, "VF could not set VLAN %d\n", vid);
|
||||
|
||||
if (err == IXGBE_ERR_INVALID_ARGUMENT)
|
||||
return -EACCES;
|
||||
/* translate error return types so error makes sense */
|
||||
if (err == IXGBE_ERR_MBX)
|
||||
return -EIO;
|
||||
|
||||
if (err == IXGBE_ERR_INVALID_ARGUMENT)
|
||||
return -EACCES;
|
||||
}
|
||||
|
||||
set_bit(vid, adapter->active_vlans);
|
||||
|
||||
@ -2070,6 +2074,9 @@ static int ixgbevf_vlan_rx_kill_vid(struct net_device *netdev,
|
||||
|
||||
spin_unlock_bh(&adapter->mbx_lock);
|
||||
|
||||
if (err)
|
||||
netdev_err(netdev, "Could not remove VLAN %d\n", vid);
|
||||
|
||||
clear_bit(vid, adapter->active_vlans);
|
||||
|
||||
return err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user