diff mbox series

[v2,net] igb: disable virtualization features on 82580

Message ID 20230831121914.660875-1-vinschen@redhat.com (mailing list archive)
State Accepted
Commit fa09bc40b21a33937872c4c4cf0f266ec9fa4869
Delegated to: Netdev Maintainers
Headers show
Series [v2,net] igb: disable virtualization features on 82580 | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1330 this patch: 1330
netdev/cc_maintainers fail 2 blamed authors not CCed: davem@davemloft.net alexander.h.duyck@intel.com; 5 maintainers not CCed: kuba@kernel.org davem@davemloft.net alexander.h.duyck@intel.com pabeni@redhat.com edumazet@google.com
netdev/build_clang success Errors and warnings before: 1353 this patch: 1353
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 1353 this patch: 1353
netdev/checkpatch warning CHECK: Unnecessary parentheses around 'hw->mac.type == e1000_82580' CHECK: Unnecessary parentheses around 'hw->mac.type == e1000_i210' CHECK: Unnecessary parentheses around 'hw->mac.type == e1000_i211'
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Corinna Vinschen Aug. 31, 2023, 12:19 p.m. UTC
Disable virtualization features on 82580 just as on i210/i211.
This avoids that virt functions are acidentally called on 82850.

Fixes: 55cac248caa4 ("igb: Add full support for 82580 devices")
Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Simon Horman Sept. 1, 2023, 1:43 p.m. UTC | #1
On Thu, Aug 31, 2023 at 02:19:13PM +0200, Corinna Vinschen wrote:
> Disable virtualization features on 82580 just as on i210/i211.
> This avoids that virt functions are acidentally called on 82850.
> 
> Fixes: 55cac248caa4 ("igb: Add full support for 82580 devices")
> Signed-off-by: Corinna Vinschen <vinschen@redhat.com>

Reviewed-by: Simon Horman <horms@kernel.org>
patchwork-bot+netdevbpf@kernel.org Sept. 3, 2023, 1:12 p.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Thu, 31 Aug 2023 14:19:13 +0200 you wrote:
> Disable virtualization features on 82580 just as on i210/i211.
> This avoids that virt functions are acidentally called on 82850.
> 
> Fixes: 55cac248caa4 ("igb: Add full support for 82580 devices")
> Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Here is the summary with links:
  - [v2,net] igb: disable virtualization features on 82580
    https://git.kernel.org/netdev/net/c/fa09bc40b21a

You are awesome, thank you!
Corinna Vinschen Sept. 4, 2023, 8:54 a.m. UTC | #3
On Sep  3 13:12, patchwork-bot+netdevbpf@kernel.org wrote:
> Hello:
> 
> This patch was applied to netdev/net.git (main)
> by David S. Miller <davem@davemloft.net>:
> 
> On Thu, 31 Aug 2023 14:19:13 +0200 you wrote:
> > Disable virtualization features on 82580 just as on i210/i211.
> > This avoids that virt functions are acidentally called on 82850.
> > 
> > Fixes: 55cac248caa4 ("igb: Add full support for 82580 devices")
> > Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
> > ---
> >  drivers/net/ethernet/intel/igb/igb_main.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> Here is the summary with links:
>   - [v2,net] igb: disable virtualization features on 82580
>     https://git.kernel.org/netdev/net/c/fa09bc40b21a

Thank you!  Will my first patch

  igb: clean up in all error paths when enabling SR-IOV

https://lore.kernel.org/netdev/20230824091603.3188249-1-vinschen@redhat.com/

get applied as well?  While I reproduced this on 82580 only, there might
be some other reason why pci_enable_sriov() fails, independent of the
actual NIC.


Thanks,
Corinna
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 1ab787ed254d..13ba9c74bd84 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -3933,8 +3933,9 @@  static void igb_probe_vfs(struct igb_adapter *adapter)
 	struct pci_dev *pdev = adapter->pdev;
 	struct e1000_hw *hw = &adapter->hw;
 
-	/* Virtualization features not supported on i210 family. */
-	if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211))
+	/* Virtualization features not supported on i210 and 82580 family. */
+	if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211) ||
+	    (hw->mac.type == e1000_82580))
 		return;
 
 	/* Of the below we really only want the effect of getting