]> git.karo-electronics.de Git - linux-beck.git/commitdiff
igb: warn if max_vfs limit is exceeded
authorStefan Assmann <sassmann@redhat.com>
Thu, 24 Feb 2011 20:03:31 +0000 (20:03 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 3 Mar 2011 10:47:23 +0000 (02:47 -0800)
Currently there's no warning printed when max_vfs > 7 is specified with
igb and the maximum of 7 is silently enforced. This patch prints a
warning and informs the user of the actions taken.

Signed-off-by: Stefan Assmann <sassmann@redhat.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/igb/igb_main.c

index 579dbba5f9e41b903cea25cc4764b3b1a63d798a..eef380af05378869b03a71c02cf351981125c5ac 100644 (file)
@@ -2291,7 +2291,12 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
        switch (hw->mac.type) {
        case e1000_82576:
        case e1000_i350:
-               adapter->vfs_allocated_count = (max_vfs > 7) ? 7 : max_vfs;
+               if (max_vfs > 7) {
+                       dev_warn(&pdev->dev,
+                                "Maximum of 7 VFs per PF, using max\n");
+                       adapter->vfs_allocated_count = 7;
+               } else
+                       adapter->vfs_allocated_count = max_vfs;
                break;
        default:
                break;