Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 2020 16:40:42 +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-11@freebsd.org
Subject:   svn commit: r360275 - stable/11/sys/dev/pci
Message-ID:  <202004241640.03OGegN2095856@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Fri Apr 24 16:40:42 2020
New Revision: 360275
URL: https://svnweb.freebsd.org/changeset/base/360275

Log:
  MFC r351514: Don't consider PCIe hot-plug command timeout fatal.
  
  According to my tests and errata to several generations of Intel CPUs,
  PCIe hot-plug command completion reporting is not very reliable thing.
  At least on my Supermicro X11DPi-NT board I never saw it reported.
  Before this change timeout code detached devices and tried to disable
  the slot, that in my case resulted in hot-plugged device being detached
  just a second after it was successfully detected and attached.  This
  change removes that, so in case of timeout it just prints the error and
  continue operation.  Linux does the same.

Modified:
  stable/11/sys/dev/pci/pci_pci.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/pci/pci_pci.c
==============================================================================
--- stable/11/sys/dev/pci/pci_pci.c	Fri Apr 24 16:39:34 2020	(r360274)
+++ stable/11/sys/dev/pci/pci_pci.c	Fri Apr 24 16:40:42 2020	(r360275)
@@ -1253,11 +1253,8 @@ pcib_pcie_cc_timeout(void *arg)
 	mtx_assert(&Giant, MA_OWNED);
 	sta = pcie_read_config(dev, PCIER_SLOT_STA, 2);
 	if (!(sta & PCIEM_SLOT_STA_CC)) {
-		device_printf(dev,
-		    "HotPlug Command Timed Out - forcing detach\n");
-		sc->flags &= ~(PCIB_HOTPLUG_CMD_PENDING | PCIB_DETACH_PENDING);
-		sc->flags |= PCIB_DETACHING;
-		pcib_pcie_hotplug_update(sc, 0, 0, true);
+		device_printf(dev, "HotPlug Command Timed Out\n");
+		sc->flags &= ~PCIB_HOTPLUG_CMD_PENDING;
 	} else {
 		device_printf(dev,
 	    "Missed HotPlug interrupt waiting for Command Completion\n");



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