Skip to content

Commit 6cd514e

Browse files
khfengbjorn-helgaas
authored andcommitted
PCI: Clear PCI_STATUS when setting up device
We are seeing Master Abort bit is set on Intel I350 ethernet device and its root port right after boot, probably happened during BIOS phase: 00:06.0 PCI bridge [0604]: Intel Corporation Device [8086:464d] (rev 05) (prog-if 00 [Normal decode]) Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx- 6e:00.0 Ethernet controller [0200]: Intel Corporation I350 Gigabit Network Connection [8086:1521] (rev 01) Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx- The Master Abort bit is cleared after S3. Since there's no functional impact found, clear the PCI_STATUS to treat it anew at setting up. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=215989 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kai-Heng Feng <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 5e69a33 commit 6cd514e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/pci/probe.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1890,6 +1890,9 @@ int pci_setup_device(struct pci_dev *dev)
18901890

18911891
dev->broken_intx_masking = pci_intx_mask_broken(dev);
18921892

1893+
/* Clear errors left from system firmware */
1894+
pci_write_config_word(dev, PCI_STATUS, 0xffff);
1895+
18931896
switch (dev->hdr_type) { /* header type */
18941897
case PCI_HEADER_TYPE_NORMAL: /* standard header */
18951898
if (class == PCI_CLASS_BRIDGE_PCI)

0 commit comments

Comments
 (0)