diff options
author | Stefan Assmann <sassmann@redhat.com> | 2011-02-24 15:03:31 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-03-03 05:47:23 -0500 |
commit | 9b082d734a938b951ed4b9b5a850ae3513d4a7e3 (patch) | |
tree | 19b104db3c23dda7da62ca95be6cb8dcf04bd8ee /drivers/net/igb | |
parent | dc6ed1df5a5f84e45e77e2acb6fd99b995414956 (diff) |
igb: warn if max_vfs limit is exceeded
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>
Diffstat (limited to 'drivers/net/igb')
-rw-r--r-- | drivers/net/igb/igb_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 579dbba5f9e4..eef380af0537 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -2291,7 +2291,12 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter) | |||
2291 | switch (hw->mac.type) { | 2291 | switch (hw->mac.type) { |
2292 | case e1000_82576: | 2292 | case e1000_82576: |
2293 | case e1000_i350: | 2293 | case e1000_i350: |
2294 | adapter->vfs_allocated_count = (max_vfs > 7) ? 7 : max_vfs; | 2294 | if (max_vfs > 7) { |
2295 | dev_warn(&pdev->dev, | ||
2296 | "Maximum of 7 VFs per PF, using max\n"); | ||
2297 | adapter->vfs_allocated_count = 7; | ||
2298 | } else | ||
2299 | adapter->vfs_allocated_count = max_vfs; | ||
2295 | break; | 2300 | break; |
2296 | default: | 2301 | default: |
2297 | break; | 2302 | break; |