Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Sep 2019 17:36:49 +0000 (UTC)
From:      Eric Joyner <erj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r352911 - stable/12/sys/dev/ixgbe
Message-ID:  <201909301736.x8UHanii076758@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: erj
Date: Mon Sep 30 17:36:49 2019
New Revision: 352911
URL: https://svnweb.freebsd.org/changeset/base/352911

Log:
  MFC r352656: ix/ixv: Read MSI-X bar from device config
  
  This fixes an issue with some HP-branded Intel 10G cards not being able to use
  MSI-X.
  
  Sponsored by:	Intel Corporation

Modified:
  stable/12/sys/dev/ixgbe/if_ix.c
  stable/12/sys/dev/ixgbe/if_ixv.c
  stable/12/sys/dev/ixgbe/ixgbe.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/ixgbe/if_ix.c
==============================================================================
--- stable/12/sys/dev/ixgbe/if_ix.c	Mon Sep 30 17:34:25 2019	(r352910)
+++ stable/12/sys/dev/ixgbe/if_ix.c	Mon Sep 30 17:36:49 2019	(r352911)
@@ -1011,12 +1011,13 @@ ixgbe_if_attach_pre(if_ctx_t ctx)
 	    CSUM_IP6_TCP | CSUM_IP6_UDP | CSUM_IP6_TSO;
 	if (adapter->hw.mac.type == ixgbe_mac_82598EB) {
 		scctx->isc_tx_nsegments = IXGBE_82598_SCATTER;
-		scctx->isc_msix_bar = PCIR_BAR(MSIX_82598_BAR);
 	} else {
 		scctx->isc_tx_csum_flags |= CSUM_SCTP |CSUM_IP6_SCTP;
 		scctx->isc_tx_nsegments = IXGBE_82599_SCATTER;
-		scctx->isc_msix_bar = PCIR_BAR(MSIX_82599_BAR);
 	}
+
+	scctx->isc_msix_bar = pci_msix_table_bar(dev);
+
 	scctx->isc_tx_tso_segments_max = scctx->isc_tx_nsegments;
 	scctx->isc_tx_tso_size_max = IXGBE_TSO_SIZE;
 	scctx->isc_tx_tso_segsize_max = PAGE_SIZE;

Modified: stable/12/sys/dev/ixgbe/if_ixv.c
==============================================================================
--- stable/12/sys/dev/ixgbe/if_ixv.c	Mon Sep 30 17:34:25 2019	(r352910)
+++ stable/12/sys/dev/ixgbe/if_ixv.c	Mon Sep 30 17:36:49 2019	(r352911)
@@ -495,7 +495,7 @@ ixv_if_attach_pre(if_ctx_t ctx)
 	scctx->isc_tx_csum_flags = CSUM_IP | CSUM_TCP | CSUM_UDP | CSUM_TSO |
 	    CSUM_IP6_TCP | CSUM_IP6_UDP | CSUM_IP6_TSO;
 	scctx->isc_tx_nsegments = IXGBE_82599_SCATTER;
-	scctx->isc_msix_bar = PCIR_BAR(MSIX_82598_BAR);
+	scctx->isc_msix_bar = pci_msix_table_bar(dev);
 	scctx->isc_tx_tso_segments_max = scctx->isc_tx_nsegments;
 	scctx->isc_tx_tso_size_max = IXGBE_TSO_SIZE;
 	scctx->isc_tx_tso_segsize_max = PAGE_SIZE;

Modified: stable/12/sys/dev/ixgbe/ixgbe.h
==============================================================================
--- stable/12/sys/dev/ixgbe/ixgbe.h	Mon Sep 30 17:34:25 2019	(r352910)
+++ stable/12/sys/dev/ixgbe/ixgbe.h	Mon Sep 30 17:36:49 2019	(r352911)
@@ -189,8 +189,6 @@
 #define MAX_NUM_MULTICAST_ADDRESSES     128
 #define IXGBE_82598_SCATTER             100
 #define IXGBE_82599_SCATTER             32
-#define MSIX_82598_BAR                  3
-#define MSIX_82599_BAR                  4
 #define IXGBE_TSO_SIZE                  262140
 #define IXGBE_RX_HDR                    128
 #define IXGBE_VFTA_SIZE                 128



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909301736.x8UHanii076758>