diff mbox series

igb: disable virtualization features on 82580

Message ID 20230831080916.588043-1-vinschen@redhat.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series igb: disable virtualization features on 82580 | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -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 warning 4 maintainers not CCed: kuba@kernel.org edumazet@google.com davem@davemloft.net pabeni@redhat.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 No Fixes tag
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, 8:09 a.m. UTC
Disable virtualization features on 82580 just as on i210/i211.
This avoids that virt functions are acidentally called on 82850.

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

Paolo Abeni Aug. 31, 2023, 11:41 a.m. UTC | #1
On Thu, 2023-08-31 at 10:09 +0200, Corinna Vinschen wrote:
> Disable virtualization features on 82580 just as on i210/i211.
> This avoids that virt functions are acidentally called on 82850.
> 
> Signed-off-by: Corinna Vinschen <vinschen@redhat.com>

This looks like a fix to me?!? if so a suitable 'Fixes' tag should be
included.

Thanks!

Paolo
Corinna Vinschen Aug. 31, 2023, 12:19 p.m. UTC | #2
Hi Paolo,

On Aug 31 13:41, Paolo Abeni wrote:
> On Thu, 2023-08-31 at 10:09 +0200, Corinna Vinschen wrote:
> > Disable virtualization features on 82580 just as on i210/i211.
> > This avoids that virt functions are acidentally called on 82850.
> > 
> > Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
> 
> This looks like a fix to me?!? if so a suitable 'Fixes' tag should be
> included.

I tried, but failed to come up with one.  When 82580 was introduced, the
conditional in question didn't exist at all and the igb_probe_vfs
function looked pretty different.  When i210 was introduced, the
conditional was created the first time.  So I was a bit puzzled if this
fixes the patch introducing 82580, or if it fixes the introduction of
the conditional, or if it's just kind of "new functionality".

Your mail got me thinking again, and I'm going to send a v2, blaming the
patch introducing 52580. It failed to guard igb_probe_vfs correctly.
When i210 was introduced, a matching conditional should have already
existed.


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