diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2018-04-04 14:27:45 -0400 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-04-04 14:27:45 -0400 |
commit | 43b90eaed57679731ae340a47cef49e59a321c2e (patch) | |
tree | 8fe583ff17647d4b079c977a2b899b738669adcf | |
parent | 3da1b6174ba3f573ee795cc25c4b8633749bd036 (diff) | |
parent | ad32eb2df801548a4b55802384fbbfbc04d76bfa (diff) |
Merge branch 'pci/misc'
- use PCI_EXP_DEVCTL2_COMP_TIMEOUT in rapidio/tsi721 (Bjorn Helgaas)
- remove possible NULL pointer dereference in of_pci_bus_find_domain_nr()
(Shawn Lin)
- report quirk timings with dev_info (Bjorn Helgaas)
- report quirks that take longer than 10ms (Bjorn Helgaas)
- add and use Altera Vendor ID (Johannes Thumshirn)
- tidy Makefiles and comments (Bjorn Helgaas)
* pci/misc:
PCI: Always define the of_node helpers
PCI: Tidy comments
PCI: Tidy Makefiles
mcb: Add Altera PCI ID to mcb-pci
PCI: Add Altera vendor ID
PCI: Report quirks that take more than 10ms
PCI: Report quirk timings with pci_info() instead of pr_debug()
PCI: Fix NULL pointer dereference in of_pci_bus_find_domain_nr()
rapidio/tsi721: use PCI_EXP_DEVCTL2_COMP_TIMEOUT macro
43 files changed, 121 insertions, 197 deletions
diff --git a/drivers/char/xillybus/xillybus_pcie.c b/drivers/char/xillybus/xillybus_pcie.c index dff2d1538164..05e5324f60bd 100644 --- a/drivers/char/xillybus/xillybus_pcie.c +++ b/drivers/char/xillybus/xillybus_pcie.c | |||
@@ -24,7 +24,6 @@ MODULE_LICENSE("GPL v2"); | |||
24 | 24 | ||
25 | #define PCI_DEVICE_ID_XILLYBUS 0xebeb | 25 | #define PCI_DEVICE_ID_XILLYBUS 0xebeb |
26 | 26 | ||
27 | #define PCI_VENDOR_ID_ALTERA 0x1172 | ||
28 | #define PCI_VENDOR_ID_ACTEL 0x11aa | 27 | #define PCI_VENDOR_ID_ACTEL 0x11aa |
29 | #define PCI_VENDOR_ID_LATTICE 0x1204 | 28 | #define PCI_VENDOR_ID_LATTICE 0x1204 |
30 | 29 | ||
diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c index 00e73d28077c..77b04e4b3254 100644 --- a/drivers/fpga/altera-cvp.c +++ b/drivers/fpga/altera-cvp.c | |||
@@ -384,8 +384,6 @@ static int altera_cvp_probe(struct pci_dev *pdev, | |||
384 | const struct pci_device_id *dev_id); | 384 | const struct pci_device_id *dev_id); |
385 | static void altera_cvp_remove(struct pci_dev *pdev); | 385 | static void altera_cvp_remove(struct pci_dev *pdev); |
386 | 386 | ||
387 | #define PCI_VENDOR_ID_ALTERA 0x1172 | ||
388 | |||
389 | static struct pci_device_id altera_cvp_id_tbl[] = { | 387 | static struct pci_device_id altera_cvp_id_tbl[] = { |
390 | { PCI_VDEVICE(ALTERA, PCI_ANY_ID) }, | 388 | { PCI_VDEVICE(ALTERA, PCI_ANY_ID) }, |
391 | { } | 389 | { } |
diff --git a/drivers/mcb/mcb-pci.c b/drivers/mcb/mcb-pci.c index af4d2f26f1c6..c2d69e33bf2b 100644 --- a/drivers/mcb/mcb-pci.c +++ b/drivers/mcb/mcb-pci.c | |||
@@ -117,6 +117,7 @@ static void mcb_pci_remove(struct pci_dev *pdev) | |||
117 | 117 | ||
118 | static const struct pci_device_id mcb_pci_tbl[] = { | 118 | static const struct pci_device_id mcb_pci_tbl[] = { |
119 | { PCI_DEVICE(PCI_VENDOR_ID_MEN, PCI_DEVICE_ID_MEN_CHAMELEON) }, | 119 | { PCI_DEVICE(PCI_VENDOR_ID_MEN, PCI_DEVICE_ID_MEN_CHAMELEON) }, |
120 | { PCI_DEVICE(PCI_VENDOR_ID_ALTERA, PCI_DEVICE_ID_MEN_CHAMELEON) }, | ||
120 | { 0 }, | 121 | { 0 }, |
121 | }; | 122 | }; |
122 | MODULE_DEVICE_TABLE(pci, mcb_pci_tbl); | 123 | MODULE_DEVICE_TABLE(pci, mcb_pci_tbl); |
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index 941970936840..952addc7bacf 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile | |||
@@ -1,61 +1,40 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | 1 | # SPDX-License-Identifier: GPL-2.0 |
2 | # | 2 | # |
3 | # Makefile for the PCI bus specific drivers. | 3 | # Makefile for the PCI bus specific drivers. |
4 | # | ||
5 | 4 | ||
6 | obj-$(CONFIG_PCI) += access.o bus.o probe.o host-bridge.o remove.o pci.o \ | 5 | obj-$(CONFIG_PCI) += access.o bus.o probe.o host-bridge.o \ |
7 | pci-driver.o search.o pci-sysfs.o rom.o setup-res.o \ | 6 | remove.o pci.o pci-driver.o search.o \ |
8 | irq.o vpd.o setup-bus.o vc.o mmap.o setup-irq.o | 7 | pci-sysfs.o rom.o setup-res.o irq.o vpd.o \ |
8 | setup-bus.o vc.o mmap.o setup-irq.o | ||
9 | 9 | ||
10 | ifdef CONFIG_PCI | 10 | ifdef CONFIG_PCI |
11 | obj-$(CONFIG_PROC_FS) += proc.o | 11 | obj-$(CONFIG_PROC_FS) += proc.o |
12 | obj-$(CONFIG_SYSFS) += slot.o | 12 | obj-$(CONFIG_SYSFS) += slot.o |
13 | obj-$(CONFIG_OF) += of.o | 13 | obj-$(CONFIG_OF) += of.o |
14 | endif | 14 | endif |
15 | 15 | ||
16 | obj-$(CONFIG_PCI_QUIRKS) += quirks.o | 16 | obj-$(CONFIG_PCI_QUIRKS) += quirks.o |
17 | 17 | obj-$(CONFIG_PCIEPORTBUS) += pcie/ | |
18 | # Build PCI Express stuff if needed | 18 | obj-$(CONFIG_HOTPLUG_PCI) += hotplug/ |
19 | obj-$(CONFIG_PCIEPORTBUS) += pcie/ | 19 | obj-$(CONFIG_PCI_MSI) += msi.o |
20 | 20 | obj-$(CONFIG_PCI_ATS) += ats.o | |
21 | # Build the PCI Hotplug drivers if we were asked to | 21 | obj-$(CONFIG_PCI_IOV) += iov.o |
22 | obj-$(CONFIG_HOTPLUG_PCI) += hotplug/ | 22 | obj-$(CONFIG_ACPI) += pci-acpi.o |
23 | 23 | obj-$(CONFIG_PCI_LABEL) += pci-label.o | |
24 | # Build the PCI MSI interrupt support | 24 | obj-$(CONFIG_X86_INTEL_MID) += pci-mid.o |
25 | obj-$(CONFIG_PCI_MSI) += msi.o | 25 | obj-$(CONFIG_PCI_SYSCALL) += syscall.o |
26 | 26 | obj-$(CONFIG_PCI_STUB) += pci-stub.o | |
27 | obj-$(CONFIG_PCI_ATS) += ats.o | 27 | obj-$(CONFIG_PCI_ECAM) += ecam.o |
28 | obj-$(CONFIG_PCI_IOV) += iov.o | ||
29 | |||
30 | # | ||
31 | # ACPI Related PCI FW Functions | ||
32 | # ACPI _DSM provided firmware instance and string name | ||
33 | # | ||
34 | obj-$(CONFIG_ACPI) += pci-acpi.o | ||
35 | |||
36 | # SMBIOS provided firmware instance and labels | ||
37 | obj-$(CONFIG_PCI_LABEL) += pci-label.o | ||
38 | |||
39 | # Intel MID platform PM support | ||
40 | obj-$(CONFIG_X86_INTEL_MID) += pci-mid.o | ||
41 | |||
42 | obj-$(CONFIG_PCI_SYSCALL) += syscall.o | ||
43 | |||
44 | obj-$(CONFIG_PCI_STUB) += pci-stub.o | ||
45 | |||
46 | obj-$(CONFIG_PCI_ECAM) += ecam.o | ||
47 | |||
48 | obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += xen-pcifront.o | 28 | obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += xen-pcifront.o |
49 | 29 | ||
50 | ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG | 30 | obj-y += host/ |
51 | 31 | obj-y += switch/ | |
52 | # PCI host controller drivers | ||
53 | obj-y += host/ | ||
54 | obj-y += switch/ | ||
55 | 32 | ||
33 | # Endpoint library must be initialized before its users | ||
56 | obj-$(CONFIG_PCI_ENDPOINT) += endpoint/ | 34 | obj-$(CONFIG_PCI_ENDPOINT) += endpoint/ |
57 | 35 | ||
58 | # Endpoint library must be initialized before its users | ||
59 | obj-$(CONFIG_PCIE_CADENCE) += cadence/ | 36 | obj-$(CONFIG_PCIE_CADENCE) += cadence/ |
60 | # pcie-hisi.o quirks are needed even without CONFIG_PCIE_DW | 37 | # pcie-hisi.o quirks are needed even without CONFIG_PCIE_DW |
61 | obj-y += dwc/ | 38 | obj-y += dwc/ |
39 | |||
40 | ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG | ||
diff --git a/drivers/pci/access.c b/drivers/pci/access.c index 5e9a9822d9d4..dcaacb4bb880 100644 --- a/drivers/pci/access.c +++ b/drivers/pci/access.c | |||
@@ -17,9 +17,9 @@ | |||
17 | DEFINE_RAW_SPINLOCK(pci_lock); | 17 | DEFINE_RAW_SPINLOCK(pci_lock); |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * Wrappers for all PCI configuration access functions. They just check | 20 | * Wrappers for all PCI configuration access functions. They just check |
21 | * alignment, do locking and call the low-level functions pointed to | 21 | * alignment, do locking and call the low-level functions pointed to |
22 | * by pci_dev->ops. | 22 | * by pci_dev->ops. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #define PCI_byte_BAD 0 | 25 | #define PCI_byte_BAD 0 |
@@ -686,8 +686,10 @@ void pci_cfg_access_unlock(struct pci_dev *dev) | |||
686 | 686 | ||
687 | raw_spin_lock_irqsave(&pci_lock, flags); | 687 | raw_spin_lock_irqsave(&pci_lock, flags); |
688 | 688 | ||
689 | /* This indicates a problem in the caller, but we don't need | 689 | /* |
690 | * to kill them, unlike a double-block above. */ | 690 | * This indicates a problem in the caller, but we don't need |
691 | * to kill them, unlike a double-block above. | ||
692 | */ | ||
691 | WARN_ON(!dev->block_cfg_access); | 693 | WARN_ON(!dev->block_cfg_access); |
692 | 694 | ||
693 | dev->block_cfg_access = 0; | 695 | dev->block_cfg_access = 0; |
diff --git a/drivers/pci/ats.c b/drivers/pci/ats.c index 6ad80a1fd5a7..89305b569d3d 100644 --- a/drivers/pci/ats.c +++ b/drivers/pci/ats.c | |||
@@ -1,14 +1,12 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * drivers/pci/ats.c | 3 | * PCI Express I/O Virtualization (IOV) support |
4 | * | ||
5 | * Copyright (C) 2009 Intel Corporation, Yu Zhao <yu.zhao@intel.com> | ||
6 | * Copyright (C) 2011 Advanced Micro Devices, | ||
7 | * | ||
8 | * PCI Express I/O Virtualization (IOV) support. | ||
9 | * Address Translation Service 1.0 | 4 | * Address Translation Service 1.0 |
10 | * Page Request Interface added by Joerg Roedel <joerg.roedel@amd.com> | 5 | * Page Request Interface added by Joerg Roedel <joerg.roedel@amd.com> |
11 | * PASID support added by Joerg Roedel <joerg.roedel@amd.com> | 6 | * PASID support added by Joerg Roedel <joerg.roedel@amd.com> |
7 | * | ||
8 | * Copyright (C) 2009 Intel Corporation, Yu Zhao <yu.zhao@intel.com> | ||
9 | * Copyright (C) 2011 Advanced Micro Devices, | ||
12 | */ | 10 | */ |
13 | 11 | ||
14 | #include <linux/export.h> | 12 | #include <linux/export.h> |
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 737d1c52f002..bc2ded4c451f 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c | |||
@@ -1,7 +1,5 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * drivers/pci/bus.c | ||
4 | * | ||
5 | * From setup-res.c, by: | 3 | * From setup-res.c, by: |
6 | * Dave Rusling (david.rusling@reo.mts.dec.com) | 4 | * Dave Rusling (david.rusling@reo.mts.dec.com) |
7 | * David Mosberger (davidm@cs.arizona.edu) | 5 | * David Mosberger (davidm@cs.arizona.edu) |
diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c index ac8d81268296..e01d53f5b32f 100644 --- a/drivers/pci/host-bridge.c +++ b/drivers/pci/host-bridge.c | |||
@@ -1,6 +1,6 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * host bridge related code | 3 | * Host bridge related code |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 677924ae0350..538de9057c23 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c | |||
@@ -1,12 +1,10 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * drivers/pci/iov.c | 3 | * PCI Express I/O Virtualization (IOV) support |
4 | * | ||
5 | * Copyright (C) 2009 Intel Corporation, Yu Zhao <yu.zhao@intel.com> | ||
6 | * | ||
7 | * PCI Express I/O Virtualization (IOV) support. | ||
8 | * Single Root IOV 1.0 | 4 | * Single Root IOV 1.0 |
9 | * Address Translation Service 1.0 | 5 | * Address Translation Service 1.0 |
6 | * | ||
7 | * Copyright (C) 2009 Intel Corporation, Yu Zhao <yu.zhao@intel.com> | ||
10 | */ | 8 | */ |
11 | 9 | ||
12 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
diff --git a/drivers/pci/mmap.c b/drivers/pci/mmap.c index 814a3ce341fc..24505b08de40 100644 --- a/drivers/pci/mmap.c +++ b/drivers/pci/mmap.c | |||
@@ -1,6 +1,6 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * mmap.c — generic PCI resource mmap helper | 3 | * Generic PCI resource mmap helper |
4 | * | 4 | * |
5 | * Copyright © 2017 Amazon.com, Inc. or its affiliates. | 5 | * Copyright © 2017 Amazon.com, Inc. or its affiliates. |
6 | * | 6 | * |
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 8b0729c94bb7..30250631efe7 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -1,7 +1,6 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * File: msi.c | 3 | * PCI Message Signaled Interrupt (MSI) |
4 | * Purpose: PCI Message Signaled Interrupt (MSI) | ||
5 | * | 4 | * |
6 | * Copyright (C) 2003-2004 Intel | 5 | * Copyright (C) 2003-2004 Intel |
7 | * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com) | 6 | * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com) |
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 78157688dcc9..1abdbf267c19 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -1,7 +1,6 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * File: pci-acpi.c | 3 | * PCI support in ACPI |
4 | * Purpose: Provide PCI support in ACPI | ||
5 | * | 4 | * |
6 | * Copyright (C) 2005 David Shaohua Li <shaohua.li@intel.com> | 5 | * Copyright (C) 2005 David Shaohua Li <shaohua.li@intel.com> |
7 | * Copyright (C) 2004 Tom Long Nguyen <tom.l.nguyen@intel.com> | 6 | * Copyright (C) 2004 Tom Long Nguyen <tom.l.nguyen@intel.com> |
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 8876b98546ce..ae85cf8feb4b 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -1,7 +1,5 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * drivers/pci/pci-driver.c | ||
4 | * | ||
5 | * (C) Copyright 2002-2004, 2007 Greg Kroah-Hartman <greg@kroah.com> | 3 | * (C) Copyright 2002-2004, 2007 Greg Kroah-Hartman <greg@kroah.com> |
6 | * (C) Copyright 2007 Novell Inc. | 4 | * (C) Copyright 2007 Novell Inc. |
7 | */ | 5 | */ |
diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c index a961a71d950f..a5910f942857 100644 --- a/drivers/pci/pci-label.c +++ b/drivers/pci/pci-label.c | |||
@@ -1,7 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * Purpose: Export the firmware instance and label associated with | 3 | * Export the firmware instance and label associated with a PCI device to |
4 | * a pci device to sysfs | 4 | * sysfs |
5 | * | ||
5 | * Copyright (C) 2010 Dell Inc. | 6 | * Copyright (C) 2010 Dell Inc. |
6 | * by Narendra K <Narendra_K@dell.com>, | 7 | * by Narendra K <Narendra_K@dell.com>, |
7 | * Jordan Hargrave <Jordan_Hargrave@dell.com> | 8 | * Jordan Hargrave <Jordan_Hargrave@dell.com> |
diff --git a/drivers/pci/pci-stub.c b/drivers/pci/pci-stub.c index 10d54f939048..66f8a59fadbd 100644 --- a/drivers/pci/pci-stub.c +++ b/drivers/pci/pci-stub.c | |||
@@ -1,5 +1,6 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* pci-stub - simple stub driver to reserve a pci device | 2 | /* |
3 | * Simple stub driver to reserve a PCI device | ||
3 | * | 4 | * |
4 | * Copyright (C) 2008 Red Hat, Inc. | 5 | * Copyright (C) 2008 Red Hat, Inc. |
5 | * Author: | 6 | * Author: |
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 63d0952684fb..478dde8330c3 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -1,7 +1,5 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * drivers/pci/pci-sysfs.c | ||
4 | * | ||
5 | * (C) Copyright 2002-2004 Greg Kroah-Hartman <greg@kroah.com> | 3 | * (C) Copyright 2002-2004 Greg Kroah-Hartman <greg@kroah.com> |
6 | * (C) Copyright 2002-2004 IBM Corp. | 4 | * (C) Copyright 2002-2004 IBM Corp. |
7 | * (C) Copyright 2003 Matthew Wilcox | 5 | * (C) Copyright 2003 Matthew Wilcox |
@@ -12,7 +10,6 @@ | |||
12 | * File attributes for PCI devices | 10 | * File attributes for PCI devices |
13 | * | 11 | * |
14 | * Modeled after usb's driverfs.c | 12 | * Modeled after usb's driverfs.c |
15 | * | ||
16 | */ | 13 | */ |
17 | 14 | ||
18 | 15 | ||
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 7128853a6e2a..63409ff826ca 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1,11 +1,11 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * PCI Bus Services, see include/linux/pci.h for further explanation. | 3 | * PCI Bus Services, see include/linux/pci.h for further explanation. |
4 | * | 4 | * |
5 | * Copyright 1993 -- 1997 Drew Eckhardt, Frederic Potter, | 5 | * Copyright 1993 -- 1997 Drew Eckhardt, Frederic Potter, |
6 | * David Mosberger-Tang | 6 | * David Mosberger-Tang |
7 | * | 7 | * |
8 | * Copyright 1997 -- 2000 Martin Mares <mj@ucw.cz> | 8 | * Copyright 1997 -- 2000 Martin Mares <mj@ucw.cz> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/acpi.h> | 11 | #include <linux/acpi.h> |
@@ -4126,6 +4126,7 @@ void pci_reset_secondary_bus(struct pci_dev *dev) | |||
4126 | pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &ctrl); | 4126 | pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &ctrl); |
4127 | ctrl |= PCI_BRIDGE_CTL_BUS_RESET; | 4127 | ctrl |= PCI_BRIDGE_CTL_BUS_RESET; |
4128 | pci_write_config_word(dev, PCI_BRIDGE_CONTROL, ctrl); | 4128 | pci_write_config_word(dev, PCI_BRIDGE_CONTROL, ctrl); |
4129 | |||
4129 | /* | 4130 | /* |
4130 | * PCI spec v3.0 7.6.4.2 requires minimum Trst of 1ms. Double | 4131 | * PCI spec v3.0 7.6.4.2 requires minimum Trst of 1ms. Double |
4131 | * this to 2ms to ensure that we meet the minimum requirement. | 4132 | * this to 2ms to ensure that we meet the minimum requirement. |
@@ -5728,8 +5729,9 @@ static int of_pci_bus_find_domain_nr(struct device *parent) | |||
5728 | use_dt_domains = 0; | 5729 | use_dt_domains = 0; |
5729 | domain = pci_get_new_domain_nr(); | 5730 | domain = pci_get_new_domain_nr(); |
5730 | } else { | 5731 | } else { |
5731 | dev_err(parent, "Node %pOF has inconsistent \"linux,pci-domain\" property in DT\n", | 5732 | if (parent) |
5732 | parent->of_node); | 5733 | pr_err("Node %pOF has ", parent->of_node); |
5734 | pr_err("Inconsistent \"linux,pci-domain\" property in DT\n"); | ||
5733 | domain = -1; | 5735 | domain = -1; |
5734 | } | 5736 | } |
5735 | 5737 | ||
diff --git a/drivers/pci/pcie/Makefile b/drivers/pci/pcie/Makefile index 223e4c34c29a..7d1648bd0766 100644 --- a/drivers/pci/pcie/Makefile +++ b/drivers/pci/pcie/Makefile | |||
@@ -1,20 +1,14 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | 1 | # SPDX-License-Identifier: GPL-2.0 |
2 | # | 2 | # |
3 | # Makefile for PCI-Express PORT Driver | 3 | # Makefile for PCI Express features and port driver |
4 | # | ||
5 | |||
6 | # Build PCI Express ASPM if needed | ||
7 | obj-$(CONFIG_PCIEASPM) += aspm.o | ||
8 | 4 | ||
9 | pcieportdrv-y := portdrv_core.o portdrv_pci.o portdrv_bus.o | 5 | pcieportdrv-y := portdrv_core.o portdrv_pci.o portdrv_bus.o |
10 | pcieportdrv-$(CONFIG_ACPI) += portdrv_acpi.o | 6 | pcieportdrv-$(CONFIG_ACPI) += portdrv_acpi.o |
11 | 7 | ||
12 | obj-$(CONFIG_PCIEPORTBUS) += pcieportdrv.o | 8 | obj-$(CONFIG_PCIEPORTBUS) += pcieportdrv.o |
13 | 9 | ||
14 | # Build PCI Express AER if needed | 10 | obj-$(CONFIG_PCIEASPM) += aspm.o |
15 | obj-$(CONFIG_PCIEAER) += aer/ | 11 | obj-$(CONFIG_PCIEAER) += aer/ |
16 | 12 | obj-$(CONFIG_PCIE_PME) += pme.o | |
17 | obj-$(CONFIG_PCIE_PME) += pme.o | 13 | obj-$(CONFIG_PCIE_DPC) += pcie-dpc.o |
18 | 14 | obj-$(CONFIG_PCIE_PTM) += ptm.o | |
19 | obj-$(CONFIG_PCIE_DPC) += pcie-dpc.o | ||
20 | obj-$(CONFIG_PCIE_PTM) += ptm.o | ||
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c index da8331f5684d..9066d6e976d4 100644 --- a/drivers/pci/pcie/aer/aerdrv.c +++ b/drivers/pci/pcie/aer/aerdrv.c | |||
@@ -1,15 +1,12 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * drivers/pci/pcie/aer/aerdrv.c | 3 | * Implement the AER root port service driver. The driver registers an IRQ |
4 | * | 4 | * handler. When a root port triggers an AER interrupt, the IRQ handler |
5 | * This file implements the AER root port service driver. The driver will | 5 | * collects root port status and schedules work. |
6 | * register an irq handler. When root port triggers an AER interrupt, the irq | ||
7 | * handler will collect root port status and schedule a work. | ||
8 | * | 6 | * |
9 | * Copyright (C) 2006 Intel Corp. | 7 | * Copyright (C) 2006 Intel Corp. |
10 | * Tom Long Nguyen (tom.l.nguyen@intel.com) | 8 | * Tom Long Nguyen (tom.l.nguyen@intel.com) |
11 | * Zhang Yanmin (yanmin.zhang@intel.com) | 9 | * Zhang Yanmin (yanmin.zhang@intel.com) |
12 | * | ||
13 | */ | 10 | */ |
14 | 11 | ||
15 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
diff --git a/drivers/pci/pcie/aer/aerdrv.h b/drivers/pci/pcie/aer/aerdrv.h index 5449e5ce139d..72835141d640 100644 --- a/drivers/pci/pcie/aer/aerdrv.h +++ b/drivers/pci/pcie/aer/aerdrv.h | |||
@@ -3,7 +3,6 @@ | |||
3 | * Copyright (C) 2006 Intel Corp. | 3 | * Copyright (C) 2006 Intel Corp. |
4 | * Tom Long Nguyen (tom.l.nguyen@intel.com) | 4 | * Tom Long Nguyen (tom.l.nguyen@intel.com) |
5 | * Zhang Yanmin (yanmin.zhang@intel.com) | 5 | * Zhang Yanmin (yanmin.zhang@intel.com) |
6 | * | ||
7 | */ | 6 | */ |
8 | 7 | ||
9 | #ifndef _AERDRV_H_ | 8 | #ifndef _AERDRV_H_ |
diff --git a/drivers/pci/pcie/aer/aerdrv_acpi.c b/drivers/pci/pcie/aer/aerdrv_acpi.c index b2019440e882..08c87de13cb8 100644 --- a/drivers/pci/pcie/aer/aerdrv_acpi.c +++ b/drivers/pci/pcie/aer/aerdrv_acpi.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * Copyright (C) 2006 Intel Corp. | 5 | * Copyright (C) 2006 Intel Corp. |
6 | * Tom Long Nguyen (tom.l.nguyen@intel.com) | 6 | * Tom Long Nguyen (tom.l.nguyen@intel.com) |
7 | * Zhang Yanmin (yanmin.zhang@intel.com) | 7 | * Zhang Yanmin (yanmin.zhang@intel.com) |
8 | * | ||
9 | */ | 8 | */ |
10 | 9 | ||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index a4bfea52e7d4..0ea5acc40323 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c | |||
@@ -1,16 +1,13 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * drivers/pci/pcie/aer/aerdrv_core.c | 3 | * Implement the core part of PCIe AER. When a PCIe error is delivered, an |
4 | * | 4 | * error message will be collected and printed to console, then an error |
5 | * This file implements the core part of PCIe AER. When a PCIe | 5 | * recovery procedure will be executed by following the PCI error recovery |
6 | * error is delivered, an error message will be collected and printed to | 6 | * rules. |
7 | * console, then, an error recovery procedure will be executed by following | ||
8 | * the PCI error recovery rules. | ||
9 | * | 7 | * |
10 | * Copyright (C) 2006 Intel Corp. | 8 | * Copyright (C) 2006 Intel Corp. |
11 | * Tom Long Nguyen (tom.l.nguyen@intel.com) | 9 | * Tom Long Nguyen (tom.l.nguyen@intel.com) |
12 | * Zhang Yanmin (yanmin.zhang@intel.com) | 10 | * Zhang Yanmin (yanmin.zhang@intel.com) |
13 | * | ||
14 | */ | 11 | */ |
15 | 12 | ||
16 | #include <linux/module.h> | 13 | #include <linux/module.h> |
diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c b/drivers/pci/pcie/aer/aerdrv_errprint.c index 6a352e638699..cfc89dd57831 100644 --- a/drivers/pci/pcie/aer/aerdrv_errprint.c +++ b/drivers/pci/pcie/aer/aerdrv_errprint.c | |||
@@ -1,13 +1,10 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * drivers/pci/pcie/aer/aerdrv_errprint.c | ||
4 | * | ||
5 | * Format error messages and print them to console. | 3 | * Format error messages and print them to console. |
6 | * | 4 | * |
7 | * Copyright (C) 2006 Intel Corp. | 5 | * Copyright (C) 2006 Intel Corp. |
8 | * Tom Long Nguyen (tom.l.nguyen@intel.com) | 6 | * Tom Long Nguyen (tom.l.nguyen@intel.com) |
9 | * Zhang Yanmin (yanmin.zhang@intel.com) | 7 | * Zhang Yanmin (yanmin.zhang@intel.com) |
10 | * | ||
11 | */ | 8 | */ |
12 | 9 | ||
13 | #include <linux/module.h> | 10 | #include <linux/module.h> |
diff --git a/drivers/pci/pcie/aer/ecrc.c b/drivers/pci/pcie/aer/ecrc.c index 26d3cac9e635..36e671835c41 100644 --- a/drivers/pci/pcie/aer/ecrc.c +++ b/drivers/pci/pcie/aer/ecrc.c | |||
@@ -1,8 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * Enables/disables PCIe ECRC checking. | 3 | * Enable/disable PCIe ECRC checking |
4 | * | 4 | * |
5 | * (C) Copyright 2009 Hewlett-Packard Development Company, L.P. | 5 | * (C) Copyright 2009 Hewlett-Packard Development Company, L.P. |
6 | * Andrew Patterson <andrew.patterson@hp.com> | 6 | * Andrew Patterson <andrew.patterson@hp.com> |
7 | */ | 7 | */ |
8 | 8 | ||
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 95a2f222b64e..f76eb7704f64 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c | |||
@@ -1,7 +1,6 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * File: drivers/pci/pcie/aspm.c | 3 | * Enable PCIe link L0s/L1 state and Clock Power Management |
4 | * Enabling PCIe link L0s/L1 state and Clock Power Management | ||
5 | * | 4 | * |
6 | * Copyright (C) 2007 Intel | 5 | * Copyright (C) 2007 Intel |
7 | * Copyright (C) Zhang Yanmin (yanmin.zhang@intel.com) | 6 | * Copyright (C) Zhang Yanmin (yanmin.zhang@intel.com) |
diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h index a854bc569117..9681aba0d428 100644 --- a/drivers/pci/pcie/portdrv.h +++ b/drivers/pci/pcie/portdrv.h | |||
@@ -1,6 +1,5 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 */ | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | /* | 2 | /* |
3 | * File: portdrv.h | ||
4 | * Purpose: PCI Express Port Bus Driver's Internal Data Structures | 3 | * Purpose: PCI Express Port Bus Driver's Internal Data Structures |
5 | * | 4 | * |
6 | * Copyright (C) 2004 Intel | 5 | * Copyright (C) 2004 Intel |
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index ef3bad4ad010..07833e5cde36 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c | |||
@@ -1,6 +1,5 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * File: portdrv_core.c | ||
4 | * Purpose: PCI Express Port Bus Driver's Core Functions | 3 | * Purpose: PCI Express Port Bus Driver's Core Functions |
5 | * | 4 | * |
6 | * Copyright (C) 2004 Intel | 5 | * Copyright (C) 2004 Intel |
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index fb1c1bb87316..06d9445997ff 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c | |||
@@ -1,9 +1,7 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * File: portdrv_pci.c | ||
4 | * Purpose: PCI Express Port Bus Driver | 3 | * Purpose: PCI Express Port Bus Driver |
5 | * Author: Tom Nguyen <tom.l.nguyen@intel.com> | 4 | * Author: Tom Nguyen <tom.l.nguyen@intel.com> |
6 | * Version: v1.0 | ||
7 | * | 5 | * |
8 | * Copyright (C) 2004 Intel | 6 | * Copyright (C) 2004 Intel |
9 | * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com) | 7 | * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com) |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 86bf045f3d59..1c059235ab67 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -1,6 +1,6 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * probe.c - PCI detection and setup code | 3 | * PCI detection and setup code |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 58a662e3c4a6..1ee8927a0635 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c | |||
@@ -1,8 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * Procfs interface for the PCI bus. | 3 | * Procfs interface for the PCI bus |
4 | * | 4 | * |
5 | * Copyright (c) 1997--1999 Martin Mares <mj@ucw.cz> | 5 | * Copyright (c) 1997--1999 Martin Mares <mj@ucw.cz> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index fc734014206f..8bf0ad91432a 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1,15 +1,15 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * This file contains work-arounds for many known PCI hardware | 3 | * This file contains work-arounds for many known PCI hardware bugs. |
4 | * bugs. Devices present only on certain architectures (host | 4 | * Devices present only on certain architectures (host bridges et cetera) |
5 | * bridges et cetera) should be handled in arch-specific code. | 5 | * should be handled in arch-specific code. |
6 | * | 6 | * |
7 | * Note: any quirks for hotpluggable devices must _NOT_ be declared __init. | 7 | * Note: any quirks for hotpluggable devices must _NOT_ be declared __init. |
8 | * | 8 | * |
9 | * Copyright (c) 1999 Martin Mares <mj@ucw.cz> | 9 | * Copyright (c) 1999 Martin Mares <mj@ucw.cz> |
10 | * | 10 | * |
11 | * Init/reset quirks for USB host controllers should be in the | 11 | * Init/reset quirks for USB host controllers should be in the USB quirks |
12 | * USB quirks file, where their drivers can access reuse it. | 12 | * file, where their drivers can use them. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
@@ -3104,16 +3104,10 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb); | |||
3104 | static ktime_t fixup_debug_start(struct pci_dev *dev, | 3104 | static ktime_t fixup_debug_start(struct pci_dev *dev, |
3105 | void (*fn)(struct pci_dev *dev)) | 3105 | void (*fn)(struct pci_dev *dev)) |
3106 | { | 3106 | { |
3107 | ktime_t calltime = 0; | 3107 | if (initcall_debug) |
3108 | pci_info(dev, "calling %pF @ %i\n", fn, task_pid_nr(current)); | ||
3108 | 3109 | ||
3109 | pci_dbg(dev, "calling %pF\n", fn); | 3110 | return ktime_get(); |
3110 | if (initcall_debug) { | ||
3111 | pr_debug("calling %pF @ %i for %s\n", | ||
3112 | fn, task_pid_nr(current), dev_name(&dev->dev)); | ||
3113 | calltime = ktime_get(); | ||
3114 | } | ||
3115 | |||
3116 | return calltime; | ||
3117 | } | 3111 | } |
3118 | 3112 | ||
3119 | static void fixup_debug_report(struct pci_dev *dev, ktime_t calltime, | 3113 | static void fixup_debug_report(struct pci_dev *dev, ktime_t calltime, |
@@ -3122,13 +3116,11 @@ static void fixup_debug_report(struct pci_dev *dev, ktime_t calltime, | |||
3122 | ktime_t delta, rettime; | 3116 | ktime_t delta, rettime; |
3123 | unsigned long long duration; | 3117 | unsigned long long duration; |
3124 | 3118 | ||
3125 | if (initcall_debug) { | 3119 | rettime = ktime_get(); |
3126 | rettime = ktime_get(); | 3120 | delta = ktime_sub(rettime, calltime); |
3127 | delta = ktime_sub(rettime, calltime); | 3121 | duration = (unsigned long long) ktime_to_ns(delta) >> 10; |
3128 | duration = (unsigned long long) ktime_to_ns(delta) >> 10; | 3122 | if (initcall_debug || duration > 10000) |
3129 | pr_debug("pci fixup %pF returned after %lld usecs for %s\n", | 3123 | pci_info(dev, "%pF took %lld usecs\n", fn, duration); |
3130 | fn, duration, dev_name(&dev->dev)); | ||
3131 | } | ||
3132 | } | 3124 | } |
3133 | 3125 | ||
3134 | /* | 3126 | /* |
diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c index 374a33443be9..a7b5c37a85ec 100644 --- a/drivers/pci/rom.c +++ b/drivers/pci/rom.c | |||
@@ -1,11 +1,9 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * drivers/pci/rom.c | 3 | * PCI ROM access routines |
4 | * | 4 | * |
5 | * (C) Copyright 2004 Jon Smirl <jonsmirl@yahoo.com> | 5 | * (C) Copyright 2004 Jon Smirl <jonsmirl@yahoo.com> |
6 | * (C) Copyright 2004 Silicon Graphics, Inc. Jesse Barnes <jbarnes@sgi.com> | 6 | * (C) Copyright 2004 Silicon Graphics, Inc. Jesse Barnes <jbarnes@sgi.com> |
7 | * | ||
8 | * PCI ROM access routines | ||
9 | */ | 7 | */ |
10 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
11 | #include <linux/export.h> | 9 | #include <linux/export.h> |
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index bc1e023f1353..2b5f720862d3 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
@@ -1,11 +1,11 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * PCI searching functions. | 3 | * PCI searching functions |
4 | * | 4 | * |
5 | * Copyright (C) 1993 -- 1997 Drew Eckhardt, Frederic Potter, | 5 | * Copyright (C) 1993 -- 1997 Drew Eckhardt, Frederic Potter, |
6 | * David Mosberger-Tang | 6 | * David Mosberger-Tang |
7 | * Copyright (C) 1997 -- 2000 Martin Mares <mj@ucw.cz> | 7 | * Copyright (C) 1997 -- 2000 Martin Mares <mj@ucw.cz> |
8 | * Copyright (C) 2003 -- 2004 Greg Kroah-Hartman <greg@kroah.com> | 8 | * Copyright (C) 2003 -- 2004 Greg Kroah-Hartman <greg@kroah.com> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 3cce29a069e6..072784f55ea5 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -1,16 +1,12 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * drivers/pci/setup-bus.c | 3 | * Support routines for initializing a PCI subsystem |
4 | * | 4 | * |
5 | * Extruded from code written by | 5 | * Extruded from code written by |
6 | * Dave Rusling (david.rusling@reo.mts.dec.com) | 6 | * Dave Rusling (david.rusling@reo.mts.dec.com) |
7 | * David Mosberger (davidm@cs.arizona.edu) | 7 | * David Mosberger (davidm@cs.arizona.edu) |
8 | * David Miller (davem@redhat.com) | 8 | * David Miller (davem@redhat.com) |
9 | * | 9 | * |
10 | * Support routines for initializing a PCI subsystem. | ||
11 | */ | ||
12 | |||
13 | /* | ||
14 | * Nov 2000, Ivan Kokshaysky <ink@jurassic.park.msu.ru> | 10 | * Nov 2000, Ivan Kokshaysky <ink@jurassic.park.msu.ru> |
15 | * PCI-PCI bridges cleanup, sorted resource allocation. | 11 | * PCI-PCI bridges cleanup, sorted resource allocation. |
16 | * Feb 2002, Ivan Kokshaysky <ink@jurassic.park.msu.ru> | 12 | * Feb 2002, Ivan Kokshaysky <ink@jurassic.park.msu.ru> |
diff --git a/drivers/pci/setup-irq.c b/drivers/pci/setup-irq.c index 5ad4ee7d7b1e..7129494754dd 100644 --- a/drivers/pci/setup-irq.c +++ b/drivers/pci/setup-irq.c | |||
@@ -1,13 +1,11 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * drivers/pci/setup-irq.c | 3 | * Support routines for initializing a PCI subsystem |
4 | * | 4 | * |
5 | * Extruded from code written by | 5 | * Extruded from code written by |
6 | * Dave Rusling (david.rusling@reo.mts.dec.com) | 6 | * Dave Rusling (david.rusling@reo.mts.dec.com) |
7 | * David Mosberger (davidm@cs.arizona.edu) | 7 | * David Mosberger (davidm@cs.arizona.edu) |
8 | * David Miller (davem@redhat.com) | 8 | * David Miller (davem@redhat.com) |
9 | * | ||
10 | * Support routines for initializing a PCI subsystem. | ||
11 | */ | 9 | */ |
12 | 10 | ||
13 | 11 | ||
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 369d48d6c6f1..1ef01d79b52e 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
@@ -1,18 +1,14 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * drivers/pci/setup-res.c | 3 | * Support routines for initializing a PCI subsystem |
4 | * | 4 | * |
5 | * Extruded from code written by | 5 | * Extruded from code written by |
6 | * Dave Rusling (david.rusling@reo.mts.dec.com) | 6 | * Dave Rusling (david.rusling@reo.mts.dec.com) |
7 | * David Mosberger (davidm@cs.arizona.edu) | 7 | * David Mosberger (davidm@cs.arizona.edu) |
8 | * David Miller (davem@redhat.com) | 8 | * David Miller (davem@redhat.com) |
9 | * | 9 | * |
10 | * Support routines for initializing a PCI subsystem. | 10 | * Fixed for multiple PCI buses, 1999 Andrea Arcangeli <andrea@suse.de> |
11 | */ | 11 | * |
12 | |||
13 | /* fixed for multiple pci buses, 1999 Andrea Arcangeli <andrea@suse.de> */ | ||
14 | |||
15 | /* | ||
16 | * Nov 2000, Ivan Kokshaysky <ink@jurassic.park.msu.ru> | 12 | * Nov 2000, Ivan Kokshaysky <ink@jurassic.park.msu.ru> |
17 | * Resource sorting | 13 | * Resource sorting |
18 | */ | 14 | */ |
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c index 191893e19d5c..e634229ece89 100644 --- a/drivers/pci/slot.c +++ b/drivers/pci/slot.c | |||
@@ -1,6 +1,5 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * drivers/pci/slot.c | ||
4 | * Copyright (C) 2006 Matthew Wilcox <matthew@wil.cx> | 3 | * Copyright (C) 2006 Matthew Wilcox <matthew@wil.cx> |
5 | * Copyright (C) 2006-2009 Hewlett-Packard Development Company, L.P. | 4 | * Copyright (C) 2006-2009 Hewlett-Packard Development Company, L.P. |
6 | * Alex Chiang <achiang@hp.com> | 5 | * Alex Chiang <achiang@hp.com> |
diff --git a/drivers/pci/syscall.c b/drivers/pci/syscall.c index e725f99b5479..d96626c614f5 100644 --- a/drivers/pci/syscall.c +++ b/drivers/pci/syscall.c | |||
@@ -1,11 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * pci_syscall.c | 3 | * For architectures where we want to allow direct access to the PCI config |
4 | * | 4 | * stuff - it would probably be preferable on PCs too, but there people |
5 | * For architectures where we want to allow direct access | 5 | * just do it by hand with the magic northbridge registers. |
6 | * to the PCI config stuff - it would probably be preferable | ||
7 | * on PCs too, but there people just do it by hand with the | ||
8 | * magic northbridge registers.. | ||
9 | */ | 6 | */ |
10 | 7 | ||
11 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c index 70fba57d6103..4b22885f4e9c 100644 --- a/drivers/pci/vpd.c +++ b/drivers/pci/vpd.c | |||
@@ -1,7 +1,6 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * File: vpd.c | 3 | * PCI VPD support |
4 | * Purpose: Provide PCI VPD support | ||
5 | * | 4 | * |
6 | * Copyright (C) 2010 Broadcom Corporation. | 5 | * Copyright (C) 2010 Broadcom Corporation. |
7 | */ | 6 | */ |
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index 8785014f656e..eba6e33147a2 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c | |||
@@ -1,8 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * Xen PCI Frontend. | 3 | * Xen PCI Frontend |
4 | * | 4 | * |
5 | * Author: Ryan Wilson <hap9@epoch.ncsc.mil> | 5 | * Author: Ryan Wilson <hap9@epoch.ncsc.mil> |
6 | */ | 6 | */ |
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c index 9a68914100ad..bb655854713d 100644 --- a/drivers/rapidio/devices/tsi721.c +++ b/drivers/rapidio/devices/tsi721.c | |||
@@ -2880,8 +2880,9 @@ static int tsi721_probe(struct pci_dev *pdev, | |||
2880 | "Invalid MRRS override value %d", pcie_mrrs); | 2880 | "Invalid MRRS override value %d", pcie_mrrs); |
2881 | } | 2881 | } |
2882 | 2882 | ||
2883 | /* Adjust PCIe completion timeout. */ | 2883 | /* Set PCIe completion timeout to 1-10ms */ |
2884 | pcie_capability_clear_and_set_word(pdev, PCI_EXP_DEVCTL2, 0xf, 0x2); | 2884 | pcie_capability_clear_and_set_word(pdev, PCI_EXP_DEVCTL2, |
2885 | PCI_EXP_DEVCTL2_COMP_TIMEOUT, 0x2); | ||
2885 | 2886 | ||
2886 | /* | 2887 | /* |
2887 | * FIXUP: correct offsets of MSI-X tables in the MSI-X Capability Block | 2888 | * FIXUP: correct offsets of MSI-X tables in the MSI-X Capability Block |
diff --git a/include/linux/pci.h b/include/linux/pci.h index df9fc9d4de81..a718b2ddec64 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -2180,24 +2180,11 @@ int pci_parse_request_of_pci_ranges(struct device *dev, | |||
2180 | /* Arch may override this (weak) */ | 2180 | /* Arch may override this (weak) */ |
2181 | struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus); | 2181 | struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus); |
2182 | 2182 | ||
2183 | static inline struct device_node * | ||
2184 | pci_device_to_OF_node(const struct pci_dev *pdev) | ||
2185 | { | ||
2186 | return pdev ? pdev->dev.of_node : NULL; | ||
2187 | } | ||
2188 | |||
2189 | static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus) | ||
2190 | { | ||
2191 | return bus ? bus->dev.of_node : NULL; | ||
2192 | } | ||
2193 | |||
2194 | #else /* CONFIG_OF */ | 2183 | #else /* CONFIG_OF */ |
2195 | static inline void pci_set_of_node(struct pci_dev *dev) { } | 2184 | static inline void pci_set_of_node(struct pci_dev *dev) { } |
2196 | static inline void pci_release_of_node(struct pci_dev *dev) { } | 2185 | static inline void pci_release_of_node(struct pci_dev *dev) { } |
2197 | static inline void pci_set_bus_of_node(struct pci_bus *bus) { } | 2186 | static inline void pci_set_bus_of_node(struct pci_bus *bus) { } |
2198 | static inline void pci_release_bus_of_node(struct pci_bus *bus) { } | 2187 | static inline void pci_release_bus_of_node(struct pci_bus *bus) { } |
2199 | static inline struct device_node * | ||
2200 | pci_device_to_OF_node(const struct pci_dev *pdev) { return NULL; } | ||
2201 | static inline struct irq_domain * | 2188 | static inline struct irq_domain * |
2202 | pci_host_bridge_of_msi_domain(struct pci_bus *bus) { return NULL; } | 2189 | pci_host_bridge_of_msi_domain(struct pci_bus *bus) { return NULL; } |
2203 | static inline int pci_parse_request_of_pci_ranges(struct device *dev, | 2190 | static inline int pci_parse_request_of_pci_ranges(struct device *dev, |
@@ -2208,6 +2195,17 @@ static inline int pci_parse_request_of_pci_ranges(struct device *dev, | |||
2208 | } | 2195 | } |
2209 | #endif /* CONFIG_OF */ | 2196 | #endif /* CONFIG_OF */ |
2210 | 2197 | ||
2198 | static inline struct device_node * | ||
2199 | pci_device_to_OF_node(const struct pci_dev *pdev) | ||
2200 | { | ||
2201 | return pdev ? pdev->dev.of_node : NULL; | ||
2202 | } | ||
2203 | |||
2204 | static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus) | ||
2205 | { | ||
2206 | return bus ? bus->dev.of_node : NULL; | ||
2207 | } | ||
2208 | |||
2211 | #ifdef CONFIG_ACPI | 2209 | #ifdef CONFIG_ACPI |
2212 | struct irq_domain *pci_host_bridge_acpi_msi_domain(struct pci_bus *bus); | 2210 | struct irq_domain *pci_host_bridge_acpi_msi_domain(struct pci_bus *bus); |
2213 | 2211 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index a6b30667a331..6a96a70fb462 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1561,6 +1561,8 @@ | |||
1561 | #define PCI_DEVICE_ID_SERVERWORKS_CSB6LPC 0x0227 | 1561 | #define PCI_DEVICE_ID_SERVERWORKS_CSB6LPC 0x0227 |
1562 | #define PCI_DEVICE_ID_SERVERWORKS_HT1100LD 0x0408 | 1562 | #define PCI_DEVICE_ID_SERVERWORKS_HT1100LD 0x0408 |
1563 | 1563 | ||
1564 | #define PCI_VENDOR_ID_ALTERA 0x1172 | ||
1565 | |||
1564 | #define PCI_VENDOR_ID_SBE 0x1176 | 1566 | #define PCI_VENDOR_ID_SBE 0x1176 |
1565 | #define PCI_DEVICE_ID_SBE_WANXL100 0x0301 | 1567 | #define PCI_DEVICE_ID_SBE_WANXL100 0x0301 |
1566 | #define PCI_DEVICE_ID_SBE_WANXL200 0x0302 | 1568 | #define PCI_DEVICE_ID_SBE_WANXL200 0x0302 |