Skip to content

Commit 00c8c5e

Browse files
committed
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 ff45e47)
1 parent 37032a3 commit 00c8c5e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sys/dev/pci/pci_pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,7 @@ pcib_setup_hotplug(struct pcib_softc *sc)
14341434

14351435
/* Clear any events previously pending. */
14361436
pcie_write_config(dev, PCIER_SLOT_STA, sc->pcie_slot_sta, 2);
1437+
sc->pcie_slot_sta = pcie_read_config(dev, PCIER_SLOT_STA, 2);
14371438

14381439
/* Enable HotPlug events. */
14391440
mask = PCIEM_SLOT_CTL_DLLSCE | PCIEM_SLOT_CTL_HPIE |

0 commit comments

Comments
 (0)