Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Aug 2016 10:50:28 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r304394 - stable/10/sys/dev/ntb/ntb_hw
Message-ID:  <201608181050.u7IAoSL0026807@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Aug 18 10:50:27 2016
New Revision: 304394
URL: https://svnweb.freebsd.org/changeset/base/304394

Log:
  MFC r302508: Disable SB01BASE_LOCKUP workaround when split BARs disabled.
  
  For some reason hack with sending MSI-X interrupts by writing to remote
  LAPIC memory works only for 32-bit BARs, that are available only if split
  BARs mode is enabled in BIOS.  If it is not, complain loudly and fall back
  to less efficient workaround.

Modified:
  stable/10/sys/dev/ntb/ntb_hw/ntb_hw.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/ntb/ntb_hw/ntb_hw.c
==============================================================================
--- stable/10/sys/dev/ntb/ntb_hw/ntb_hw.c	Thu Aug 18 10:47:22 2016	(r304393)
+++ stable/10/sys/dev/ntb/ntb_hw/ntb_hw.c	Thu Aug 18 10:50:27 2016	(r304394)
@@ -453,7 +453,7 @@ ntb_vm_memattr_to_str(vm_memattr_t pat)
 	}
 }
 
-static int g_ntb_msix_idx = 0;
+static int g_ntb_msix_idx = 1;
 TUNABLE_INT("hw.ntb.msix_mw_idx", &g_ntb_msix_idx);
 SYSCTL_INT(_hw_ntb, OID_AUTO, msix_mw_idx, CTLFLAG_RDTUN, &g_ntb_msix_idx,
     0, "Use this memory window to access the peer MSIX message complex on "
@@ -1455,6 +1455,16 @@ ntb_detect_xeon(struct ntb_softc *ntb)
 	if ((ppd & XEON_PPD_SPLIT_BAR) != 0)
 		ntb->features |= NTB_SPLIT_BAR;
 
+	if (HAS_FEATURE(ntb, NTB_SB01BASE_LOCKUP) &&
+	    !HAS_FEATURE(ntb, NTB_SPLIT_BAR)) {
+		device_printf(ntb->device,
+		    "Can not apply SB01BASE_LOCKUP workaround "
+		    "with split BARs disabled!\n");
+		device_printf(ntb->device,
+		    "Expect system hangs under heavy NTB traffic!\n");
+		ntb->features &= ~NTB_SB01BASE_LOCKUP;
+	}
+
 	/*
 	 * SDOORBELL errata workaround gets in the way of SB01BASE_LOCKUP
 	 * errata workaround; only do one at a time.



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