Commit eac0b680 authored by Jan Sokolowski's avatar Jan Sokolowski Committed by Tony Nguyen

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: default avatarJan Sokolowski <jan.sokolowski@intel.com>
Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent f49fafa5
...@@ -2044,12 +2044,16 @@ static int ixgbevf_vlan_rx_add_vid(struct net_device *netdev, ...@@ -2044,12 +2044,16 @@ static int ixgbevf_vlan_rx_add_vid(struct net_device *netdev,
spin_unlock_bh(&adapter->mbx_lock); spin_unlock_bh(&adapter->mbx_lock);
/* translate error return types so error makes sense */ if (err) {
if (err == IXGBE_ERR_MBX) netdev_err(netdev, "VF could not set VLAN %d\n", vid);
return -EIO;
/* translate error return types so error makes sense */
if (err == IXGBE_ERR_MBX)
return -EIO;
if (err == IXGBE_ERR_INVALID_ARGUMENT) if (err == IXGBE_ERR_INVALID_ARGUMENT)
return -EACCES; return -EACCES;
}
set_bit(vid, adapter->active_vlans); set_bit(vid, adapter->active_vlans);
...@@ -2070,6 +2074,9 @@ static int ixgbevf_vlan_rx_kill_vid(struct net_device *netdev, ...@@ -2070,6 +2074,9 @@ static int ixgbevf_vlan_rx_kill_vid(struct net_device *netdev,
spin_unlock_bh(&adapter->mbx_lock); spin_unlock_bh(&adapter->mbx_lock);
if (err)
netdev_err(netdev, "Could not remove VLAN %d\n", vid);
clear_bit(vid, adapter->active_vlans); clear_bit(vid, adapter->active_vlans);
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment