Date: Tue, 29 Apr 2025 20:33:10 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 00c8c5e2c358 - stable/13 - pcib: Clear any pending slot status events during attach Message-ID: <202504292033.53TKXAH6056238@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=00c8c5e2c35862d61ddb2618d5ecd08db1e9fb89 commit 00c8c5e2c35862d61ddb2618d5ecd08db1e9fb89 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2025-04-22 02:08:17 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2025-04-29 14:46:43 +0000 pcib: Clear any pending slot status events during attach Any events left over from boot firmware, etc. are not meaningful so clear pending events during attach. If they are still pending they should remain asserted when the slot status register is re-read. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D49950 (cherry picked from commit ff45e4759a38f44a0199b2948b7b1e987e7c71da) --- sys/dev/pci/pci_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 86b57f28fd81..d780854761d6 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -1434,6 +1434,7 @@ pcib_setup_hotplug(struct pcib_softc *sc) /* Clear any events previously pending. */ pcie_write_config(dev, PCIER_SLOT_STA, sc->pcie_slot_sta, 2); + sc->pcie_slot_sta = pcie_read_config(dev, PCIER_SLOT_STA, 2); /* Enable HotPlug events. */ mask = PCIEM_SLOT_CTL_DLLSCE | PCIEM_SLOT_CTL_HPIE |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504292033.53TKXAH6056238>