From: Kai-Heng Feng Date: Tue, 17 May 2022 04:37:38 +0000 (+0800) Subject: PCI: Clear PCI_STATUS when setting up device X-Git-Tag: v6.1~835^2~24^2~4 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=6cd514e58f12b211d638dbf6f791fa18d854f09c;p=mirror_ubuntu-kernels.git 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- SERR- TAbort- SERR- Signed-off-by: Bjorn Helgaas --- diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 17a969942d37..414f659dc873 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1890,6 +1890,9 @@ int pci_setup_device(struct pci_dev *dev) dev->broken_intx_masking = pci_intx_mask_broken(dev); + /* Clear errors left from system firmware */ + pci_write_config_word(dev, PCI_STATUS, 0xffff); + switch (dev->hdr_type) { /* header type */ case PCI_HEADER_TYPE_NORMAL: /* standard header */ if (class == PCI_CLASS_BRIDGE_PCI)