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

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
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -2044,12 +2044,16 @@ static int ixgbevf_vlan_rx_add_vid(struct net_device *netdev,

	spin_unlock_bh(&adapter->mbx_lock);

	if (err) {
		netdev_err(netdev, "VF could not set VLAN %d\n", vid);

		/* 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;