From: Jack Morgenstein Date: Tue, 15 May 2012 10:35:01 +0000 (+0000) Subject: net/mlx4_core: Do not reset module-parameter num_vfs when fail to enable sriov X-Git-Tag: v3.5-rc1~109^2~60 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=681372a7a37d4226261e2be2faf3aec5b9e022c2;p=pandora-kernel.git net/mlx4_core: Do not reset module-parameter num_vfs when fail to enable sriov Consider the following scenario: 2 HCAs, where only one of which can run SRIOV. If we reset the module parameter, all the VFs of the SRIOV HCA will be claimed by the PPF host (-- the code relies on num_vfs being non-zero to avoid this claiming, and num_vfs was reset when pci_enable_sriov failed for the non-SRIOV HCA). The solution is not to touch the num_vfs parameter. Also, eliminate the unneeded check of num_vfs when disabling sriov (the dev flag bit is sufficient). Signed-off-by: Jack Morgenstein Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller --- Reading git-diff-tree failed