From: Stefan Assmann Date: Thu, 24 Feb 2011 20:03:31 +0000 (+0000) Subject: igb: warn if max_vfs limit is exceeded X-Git-Tag: firefly_0821_release~7613^2~2196^2~170^2~23 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9b082d734a938b951ed4b9b5a850ae3513d4a7e3;p=firefly-linux-kernel-4.4.55.git 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 Tested-by: Jeff Pieper Signed-off-by: Jeff Kirsher --- 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) 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;