Skip to content

Commit 4e31843

Browse files
committed
Merge tag 'pci-v4.19-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull pci updates from Bjorn Helgaas: - Decode AER errors with names similar to "lspci" (Tyler Baicar) - Expose AER statistics in sysfs (Rajat Jain) - Clear AER status bits selectively based on the type of recovery (Oza Pawandeep) - Honor "pcie_ports=native" even if HEST sets FIRMWARE_FIRST (Alexandru Gagniuc) - Don't clear AER status bits if we're using the "Firmware-First" strategy where firmware owns the registers (Alexandru Gagniuc) - Use sysfs_match_string() to simplify ASPM sysfs parsing (Andy Shevchenko) - Remove unnecessary includes of <linux/pci-aspm.h> (Bjorn Helgaas) - Defer DPC event handling to work queue (Keith Busch) - Use threaded IRQ for DPC bottom half (Keith Busch) - Print AER status while handling DPC events (Keith Busch) - Work around IDT switch ACS Source Validation erratum (James Puthukattukaran) - Emit diagnostics for all cases of PCIe Link downtraining (Links operating slower than they're capable of) (Alexandru Gagniuc) - Skip VFs when configuring Max Payload Size (Myron Stowe) - Reduce Root Port Max Payload Size if necessary when hot-adding a device below it (Myron Stowe) - Simplify SHPC existence/permission checks (Bjorn Helgaas) - Remove hotplug sample skeleton driver (Lukas Wunner) - Convert pciehp to threaded IRQ handling (Lukas Wunner) - Improve pciehp tolerance of missed events and initially unstable links (Lukas Wunner) - Clear spurious pciehp events on resume (Lukas Wunner) - Add pciehp runtime PM support, including for Thunderbolt controllers (Lukas Wunner) - Support interrupts from pciehp bridges in D3hot (Lukas Wunner) - Mark fall-through switch cases before enabling -Wimplicit-fallthrough (Gustavo A. R. Silva) - Move DMA-debug PCI init from arch code to PCI core (Christoph Hellwig) - Fix pci_request_irq() usage of IRQF_ONESHOT when no handler is supplied (Heiner Kallweit) - Unify PCI and DMA direction #defines (Shunyong Yang) - Add PCI_DEVICE_DATA() macro (Andy Shevchenko) - Check for VPD completion before checking for timeout (Bert Kenward) - Limit Netronome NFP5000 config space size to work around erratum (Jakub Kicinski) - Set IRQCHIP_ONESHOT_SAFE for PCI MSI irqchips (Heiner Kallweit) - Document ACPI description of PCI host bridges (Bjorn Helgaas) - Add "pci=disable_acs_redir=" parameter to disable ACS redirection for peer-to-peer DMA support (we don't have the peer-to-peer support yet; this is just one piece) (Logan Gunthorpe) - Clean up devm_of_pci_get_host_bridge_resources() resource allocation (Jan Kiszka) - Fixup resizable BARs after suspend/resume (Christian König) - Make "pci=earlydump" generic (Sinan Kaya) - Fix ROM BAR access routines to stay in bounds and check for signature correctly (Rex Zhu) - Add DMA alias quirk for Microsemi Switchtec NTB (Doug Meyer) - Expand documentation for pci_add_dma_alias() (Logan Gunthorpe) - To avoid bus errors, enable PASID only if entire path supports End-End TLP prefixes (Sinan Kaya) - Unify slot and bus reset functions and remove hotplug knowledge from callers (Sinan Kaya) - Add Function-Level Reset quirks for Intel and Samsung NVMe devices to fix guest reboot issues (Alex Williamson) - Add function 1 DMA alias quirk for Marvell 88SS9183 PCIe SSD Controller (Bjorn Helgaas) - Remove Xilinx AXI-PCIe host bridge arch dependency (Palmer Dabbelt) - Remove Aardvark outbound window configuration (Evan Wang) - Fix Aardvark bridge window sizing issue (Zachary Zhang) - Convert Aardvark to use pci_host_probe() to reduce code duplication (Thomas Petazzoni) - Correct the Cadence cdns_pcie_writel() signature (Alan Douglas) - Add Cadence support for optional generic PHYs (Alan Douglas) - Add Cadence power management ops (Alan Douglas) - Remove redundant variable from Cadence driver (Colin Ian King) - Add Kirin MSI support (Xiaowei Song) - Drop unnecessary root_bus_nr setting from exynos, imx6, keystone, armada8k, artpec6, designware-plat, histb, qcom, spear13xx (Shawn Guo) - Move link notification settings from DesignWare core to individual drivers (Gustavo Pimentel) - Add endpoint library MSI-X interfaces (Gustavo Pimentel) - Correct signature of endpoint library IRQ interfaces (Gustavo Pimentel) - Add DesignWare endpoint library MSI-X callbacks (Gustavo Pimentel) - Add endpoint library MSI-X test support (Gustavo Pimentel) - Remove unnecessary GFP_ATOMIC from Hyper-V "new child" allocation (Jia-Ju Bai) - Add more devices to Broadcom PAXC quirk (Ray Jui) - Work around corrupted Broadcom PAXC config space to enable SMMU and GICv3 ITS (Ray Jui) - Disable MSI parsing to work around broken Broadcom PAXC logic in some devices (Ray Jui) - Hide unconfigured functions to work around a Broadcom PAXC defect (Ray Jui) - Lower iproc log level to reduce console output during boot (Ray Jui) - Fix mobiveil iomem/phys_addr_t type usage (Lorenzo Pieralisi) - Fix mobiveil missing include file (Lorenzo Pieralisi) - Add mobiveil Kconfig/Makefile support (Lorenzo Pieralisi) - Fix mvebu I/O space remapping issues (Thomas Petazzoni) - Use generic pci_host_bridge in mvebu instead of ARM-specific API (Thomas Petazzoni) - Whitelist VMD devices with fast interrupt handlers to avoid sharing vectors with slow handlers (Keith Busch) * tag 'pci-v4.19-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (153 commits) PCI/AER: Don't clear AER bits if error handling is Firmware-First PCI: Limit config space size for Netronome NFP5000 PCI/MSI: Set IRQCHIP_ONESHOT_SAFE for PCI-MSI irqchips PCI/VPD: Check for VPD access completion before checking for timeout PCI: Add PCI_DEVICE_DATA() macro to fully describe device ID entry PCI: Match Root Port's MPS to endpoint's MPSS as necessary PCI: Skip MPS logic for Virtual Functions (VFs) PCI: Add function 1 DMA alias quirk for Marvell 88SS9183 PCI: Check for PCIe Link downtraining PCI: Add ACS Redirect disable quirk for Intel Sunrise Point PCI: Add device-specific ACS Redirect disable infrastructure PCI: Convert device-specific ACS quirks from NULL termination to ARRAY_SIZE PCI: Add "pci=disable_acs_redir=" parameter for peer-to-peer support PCI: Allow specifying devices using a base bus and path of devfns PCI: Make specifying PCI devices in kernel parameters reusable PCI: Hide ACS quirk declarations inside PCI core PCI: Delay after FLR of Intel DC P3700 NVMe PCI: Disable Samsung SM961/PM961 NVMe before FLR PCI: Export pcie_has_flr() PCI: mvebu: Drop bogus comment above mvebu_pcie_map_registers() ...
2 parents f91e654 + fa687fb commit 4e31843

File tree

115 files changed

+3571
-1786
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+3571
-1786
lines changed
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
==========================
2+
PCIe Device AER statistics
3+
==========================
4+
These attributes show up under all the devices that are AER capable. These
5+
statistical counters indicate the errors "as seen/reported by the device".
6+
Note that this may mean that if an endpoint is causing problems, the AER
7+
counters may increment at its link partner (e.g. root port) because the
8+
errors may be "seen" / reported by the link partner and not the
9+
problematic endpoint itself (which may report all counters as 0 as it never
10+
saw any problems).
11+
12+
Where: /sys/bus/pci/devices/<dev>/aer_dev_correctable
13+
Date: July 2018
14+
Kernel Version: 4.19.0
15+
16+
Description: List of correctable errors seen and reported by this
17+
PCI device using ERR_COR. Note that since multiple errors may
18+
be reported using a single ERR_COR message, thus
19+
TOTAL_ERR_COR at the end of the file may not match the actual
20+
total of all the errors in the file. Sample output:
21+
-------------------------------------------------------------------------
22+
localhost /sys/devices/pci0000:00/0000:00:1c.0 # cat aer_dev_correctable
23+
Receiver Error 2
24+
Bad TLP 0
25+
Bad DLLP 0
26+
RELAY_NUM Rollover 0
27+
Replay Timer Timeout 0
28+
Advisory Non-Fatal 0
29+
Corrected Internal Error 0
30+
Header Log Overflow 0
31+
TOTAL_ERR_COR 2
32+
-------------------------------------------------------------------------
33+
34+
Where: /sys/bus/pci/devices/<dev>/aer_dev_fatal
35+
Date: July 2018
36+
Kernel Version: 4.19.0
37+
38+
Description: List of uncorrectable fatal errors seen and reported by this
39+
PCI device using ERR_FATAL. Note that since multiple errors may
40+
be reported using a single ERR_FATAL message, thus
41+
TOTAL_ERR_FATAL at the end of the file may not match the actual
42+
total of all the errors in the file. Sample output:
43+
-------------------------------------------------------------------------
44+
localhost /sys/devices/pci0000:00/0000:00:1c.0 # cat aer_dev_fatal
45+
Undefined 0
46+
Data Link Protocol 0
47+
Surprise Down Error 0
48+
Poisoned TLP 0
49+
Flow Control Protocol 0
50+
Completion Timeout 0
51+
Completer Abort 0
52+
Unexpected Completion 0
53+
Receiver Overflow 0
54+
Malformed TLP 0
55+
ECRC 0
56+
Unsupported Request 0
57+
ACS Violation 0
58+
Uncorrectable Internal Error 0
59+
MC Blocked TLP 0
60+
AtomicOp Egress Blocked 0
61+
TLP Prefix Blocked Error 0
62+
TOTAL_ERR_FATAL 0
63+
-------------------------------------------------------------------------
64+
65+
Where: /sys/bus/pci/devices/<dev>/aer_dev_nonfatal
66+
Date: July 2018
67+
Kernel Version: 4.19.0
68+
69+
Description: List of uncorrectable nonfatal errors seen and reported by this
70+
PCI device using ERR_NONFATAL. Note that since multiple errors
71+
may be reported using a single ERR_FATAL message, thus
72+
TOTAL_ERR_NONFATAL at the end of the file may not match the
73+
actual total of all the errors in the file. Sample output:
74+
-------------------------------------------------------------------------
75+
localhost /sys/devices/pci0000:00/0000:00:1c.0 # cat aer_dev_nonfatal
76+
Undefined 0
77+
Data Link Protocol 0
78+
Surprise Down Error 0
79+
Poisoned TLP 0
80+
Flow Control Protocol 0
81+
Completion Timeout 0
82+
Completer Abort 0
83+
Unexpected Completion 0
84+
Receiver Overflow 0
85+
Malformed TLP 0
86+
ECRC 0
87+
Unsupported Request 0
88+
ACS Violation 0
89+
Uncorrectable Internal Error 0
90+
MC Blocked TLP 0
91+
AtomicOp Egress Blocked 0
92+
TLP Prefix Blocked Error 0
93+
TOTAL_ERR_NONFATAL 0
94+
-------------------------------------------------------------------------
95+
96+
============================
97+
PCIe Rootport AER statistics
98+
============================
99+
These attributes show up under only the rootports (or root complex event
100+
collectors) that are AER capable. These indicate the number of error messages as
101+
"reported to" the rootport. Please note that the rootports also transmit
102+
(internally) the ERR_* messages for errors seen by the internal rootport PCI
103+
device, so these counters include them and are thus cumulative of all the error
104+
messages on the PCI hierarchy originating at that root port.
105+
106+
Where: /sys/bus/pci/devices/<dev>/aer_stats/aer_rootport_total_err_cor
107+
Date: July 2018
108+
Kernel Version: 4.19.0
109+
110+
Description: Total number of ERR_COR messages reported to rootport.
111+
112+
Where: /sys/bus/pci/devices/<dev>/aer_stats/aer_rootport_total_err_fatal
113+
Date: July 2018
114+
Kernel Version: 4.19.0
115+
116+
Description: Total number of ERR_FATAL messages reported to rootport.
117+
118+
Where: /sys/bus/pci/devices/<dev>/aer_stats/aer_rootport_total_err_nonfatal
119+
Date: July 2018
120+
Kernel Version: 4.19.0
121+
122+
Description: Total number of ERR_NONFATAL messages reported to rootport.

Documentation/PCI/00-INDEX

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
00-INDEX
22
- this file
3+
acpi-info.txt
4+
- info on how PCI host bridges are represented in ACPI
35
MSI-HOWTO.txt
46
- the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ.
57
PCIEBUS-HOWTO.txt

Documentation/PCI/acpi-info.txt

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
ACPI considerations for PCI host bridges
2+
3+
The general rule is that the ACPI namespace should describe everything the
4+
OS might use unless there's another way for the OS to find it [1, 2].
5+
6+
For example, there's no standard hardware mechanism for enumerating PCI
7+
host bridges, so the ACPI namespace must describe each host bridge, the
8+
method for accessing PCI config space below it, the address space windows
9+
the host bridge forwards to PCI (using _CRS), and the routing of legacy
10+
INTx interrupts (using _PRT).
11+
12+
PCI devices, which are below the host bridge, generally do not need to be
13+
described via ACPI. The OS can discover them via the standard PCI
14+
enumeration mechanism, using config accesses to discover and identify
15+
devices and read and size their BARs. However, ACPI may describe PCI
16+
devices if it provides power management or hotplug functionality for them
17+
or if the device has INTx interrupts connected by platform interrupt
18+
controllers and a _PRT is needed to describe those connections.
19+
20+
ACPI resource description is done via _CRS objects of devices in the ACPI
21+
namespace [2].   The _CRS is like a generalized PCI BAR: the OS can read
22+
_CRS and figure out what resource is being consumed even if it doesn't have
23+
a driver for the device [3].  That's important because it means an old OS
24+
can work correctly even on a system with new devices unknown to the OS.
25+
The new devices might not do anything, but the OS can at least make sure no
26+
resources conflict with them.
27+
28+
Static tables like MCFG, HPET, ECDT, etc., are *not* mechanisms for
29+
reserving address space. The static tables are for things the OS needs to
30+
know early in boot, before it can parse the ACPI namespace. If a new table
31+
is defined, an old OS needs to operate correctly even though it ignores the
32+
table. _CRS allows that because it is generic and understood by the old
33+
OS; a static table does not.
34+
35+
If the OS is expected to manage a non-discoverable device described via
36+
ACPI, that device will have a specific _HID/_CID that tells the OS what
37+
driver to bind to it, and the _CRS tells the OS and the driver where the
38+
device's registers are.
39+
40+
PCI host bridges are PNP0A03 or PNP0A08 devices.  Their _CRS should
41+
describe all the address space they consume.  This includes all the windows
42+
they forward down to the PCI bus, as well as registers of the host bridge
43+
itself that are not forwarded to PCI.  The host bridge registers include
44+
things like secondary/subordinate bus registers that determine the bus
45+
range below the bridge, window registers that describe the apertures, etc.
46+
These are all device-specific, non-architected things, so the only way a
47+
PNP0A03/PNP0A08 driver can manage them is via _PRS/_CRS/_SRS, which contain
48+
the device-specific details.  The host bridge registers also include ECAM
49+
space, since it is consumed by the host bridge.
50+
51+
ACPI defines a Consumer/Producer bit to distinguish the bridge registers
52+
("Consumer") from the bridge apertures ("Producer") [4, 5], but early
53+
BIOSes didn't use that bit correctly. The result is that the current ACPI
54+
spec defines Consumer/Producer only for the Extended Address Space
55+
descriptors; the bit should be ignored in the older QWord/DWord/Word
56+
Address Space descriptors. Consequently, OSes have to assume all
57+
QWord/DWord/Word descriptors are windows.
58+
59+
Prior to the addition of Extended Address Space descriptors, the failure of
60+
Consumer/Producer meant there was no way to describe bridge registers in
61+
the PNP0A03/PNP0A08 device itself. The workaround was to describe the
62+
bridge registers (including ECAM space) in PNP0C02 catch-all devices [6].
63+
With the exception of ECAM, the bridge register space is device-specific
64+
anyway, so the generic PNP0A03/PNP0A08 driver (pci_root.c) has no need to
65+
know about it.  
66+
67+
New architectures should be able to use "Consumer" Extended Address Space
68+
descriptors in the PNP0A03 device for bridge registers, including ECAM,
69+
although a strict interpretation of [6] might prohibit this. Old x86 and
70+
ia64 kernels assume all address space descriptors, including "Consumer"
71+
Extended Address Space ones, are windows, so it would not be safe to
72+
describe bridge registers this way on those architectures.
73+
74+
PNP0C02 "motherboard" devices are basically a catch-all.  There's no
75+
programming model for them other than "don't use these resources for
76+
anything else."  So a PNP0C02 _CRS should claim any address space that is
77+
(1) not claimed by _CRS under any other device object in the ACPI namespace
78+
and (2) should not be assigned by the OS to something else.
79+
80+
The PCIe spec requires the Enhanced Configuration Access Method (ECAM)
81+
unless there's a standard firmware interface for config access, e.g., the
82+
ia64 SAL interface [7]. A host bridge consumes ECAM memory address space
83+
and converts memory accesses into PCI configuration accesses. The spec
84+
defines the ECAM address space layout and functionality; only the base of
85+
the address space is device-specific. An ACPI OS learns the base address
86+
from either the static MCFG table or a _CBA method in the PNP0A03 device.
87+
88+
The MCFG table must describe the ECAM space of non-hot pluggable host
89+
bridges [8]. Since MCFG is a static table and can't be updated by hotplug,
90+
a _CBA method in the PNP0A03 device describes the ECAM space of a
91+
hot-pluggable host bridge [9]. Note that for both MCFG and _CBA, the base
92+
address always corresponds to bus 0, even if the bus range below the bridge
93+
(which is reported via _CRS) doesn't start at 0.
94+
95+
96+
[1] ACPI 6.2, sec 6.1:
97+
For any device that is on a non-enumerable type of bus (for example, an
98+
ISA bus), OSPM enumerates the devices' identifier(s) and the ACPI
99+
system firmware must supply an _HID object ... for each device to
100+
enable OSPM to do that.
101+
102+
[2] ACPI 6.2, sec 3.7:
103+
The OS enumerates motherboard devices simply by reading through the
104+
ACPI Namespace looking for devices with hardware IDs.
105+
106+
Each device enumerated by ACPI includes ACPI-defined objects in the
107+
ACPI Namespace that report the hardware resources the device could
108+
occupy [_PRS], an object that reports the resources that are currently
109+
used by the device [_CRS], and objects for configuring those resources
110+
[_SRS]. The information is used by the Plug and Play OS (OSPM) to
111+
configure the devices.
112+
113+
[3] ACPI 6.2, sec 6.2:
114+
OSPM uses device configuration objects to configure hardware resources
115+
for devices enumerated via ACPI. Device configuration objects provide
116+
information about current and possible resource requirements, the
117+
relationship between shared resources, and methods for configuring
118+
hardware resources.
119+
120+
When OSPM enumerates a device, it calls _PRS to determine the resource
121+
requirements of the device. It may also call _CRS to find the current
122+
resource settings for the device. Using this information, the Plug and
123+
Play system determines what resources the device should consume and
124+
sets those resources by calling the device’s _SRS control method.
125+
126+
In ACPI, devices can consume resources (for example, legacy keyboards),
127+
provide resources (for example, a proprietary PCI bridge), or do both.
128+
Unless otherwise specified, resources for a device are assumed to be
129+
taken from the nearest matching resource above the device in the device
130+
hierarchy.
131+
132+
[4] ACPI 6.2, sec 6.4.3.5.1, 2, 3, 4:
133+
QWord/DWord/Word Address Space Descriptor (.1, .2, .3)
134+
General Flags: Bit [0] Ignored
135+
136+
Extended Address Space Descriptor (.4)
137+
General Flags: Bit [0] Consumer/Producer:
138+
1–This device consumes this resource
139+
0–This device produces and consumes this resource
140+
141+
[5] ACPI 6.2, sec 19.6.43:
142+
ResourceUsage specifies whether the Memory range is consumed by
143+
this device (ResourceConsumer) or passed on to child devices
144+
(ResourceProducer). If nothing is specified, then
145+
ResourceConsumer is assumed.
146+
147+
[6] PCI Firmware 3.2, sec 4.1.2:
148+
If the operating system does not natively comprehend reserving the
149+
MMCFG region, the MMCFG region must be reserved by firmware. The
150+
address range reported in the MCFG table or by _CBA method (see Section
151+
4.1.3) must be reserved by declaring a motherboard resource. For most
152+
systems, the motherboard resource would appear at the root of the ACPI
153+
namespace (under \_SB) in a node with a _HID of EISAID (PNP0C02), and
154+
the resources in this case should not be claimed in the root PCI bus’s
155+
_CRS. The resources can optionally be returned in Int15 E820 or
156+
EFIGetMemoryMap as reserved memory but must always be reported through
157+
ACPI as a motherboard resource.
158+
159+
[7] PCI Express 4.0, sec 7.2.2:
160+
For systems that are PC-compatible, or that do not implement a
161+
processor-architecture-specific firmware interface standard that allows
162+
access to the Configuration Space, the ECAM is required as defined in
163+
this section.
164+
165+
[8] PCI Firmware 3.2, sec 4.1.2:
166+
The MCFG table is an ACPI table that is used to communicate the base
167+
addresses corresponding to the non-hot removable PCI Segment Groups
168+
range within a PCI Segment Group available to the operating system at
169+
boot. This is required for the PC-compatible systems.
170+
171+
The MCFG table is only used to communicate the base addresses
172+
corresponding to the PCI Segment Groups available to the system at
173+
boot.
174+
175+
[9] PCI Firmware 3.2, sec 4.1.3:
176+
The _CBA (Memory mapped Configuration Base Address) control method is
177+
an optional ACPI object that returns the 64-bit memory mapped
178+
configuration base address for the hot plug capable host bridge. The
179+
base address returned by _CBA is processor-relative address. The _CBA
180+
control method evaluates to an Integer.
181+
182+
This control method appears under a host bridge object. When the _CBA
183+
method appears under an active host bridge object, the operating system
184+
evaluates this structure to identify the memory mapped configuration
185+
base address corresponding to the PCI Segment Group for the bus number
186+
range specified in _CRS method. An ACPI name space object that contains
187+
the _CBA method must also contain a corresponding _SEG method.

Documentation/PCI/endpoint/function/binding/pci-test.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ subsys_id : don't care
1515
interrupt_pin : Should be 1 - INTA, 2 - INTB, 3 - INTC, 4 -INTD
1616
msi_interrupts : Should be 1 to 32 depending on the number of MSI interrupts
1717
to test
18+
msix_interrupts : Should be 1 to 2048 depending on the number of MSI-X
19+
interrupts to test

Documentation/PCI/endpoint/pci-endpoint.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ by the PCI controller driver.
4444
* clear_bar: ops to reset the BAR
4545
* alloc_addr_space: ops to allocate in PCI controller address space
4646
* free_addr_space: ops to free the allocated address space
47-
* raise_irq: ops to raise a legacy or MSI interrupt
47+
* raise_irq: ops to raise a legacy, MSI or MSI-X interrupt
4848
* start: ops to start the PCI link
4949
* stop: ops to stop the PCI link
5050

@@ -96,7 +96,7 @@ by the PCI endpoint function driver.
9696
*) pci_epc_raise_irq()
9797

9898
The PCI endpoint function driver should use pci_epc_raise_irq() to raise
99-
Legacy Interrupt or MSI Interrupt.
99+
Legacy Interrupt, MSI or MSI-X Interrupt.
100100

101101
*) pci_epc_mem_alloc_addr()
102102

Documentation/PCI/endpoint/pci-test-function.txt

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ The PCI endpoint test device has the following registers:
2020
5) PCI_ENDPOINT_TEST_DST_ADDR
2121
6) PCI_ENDPOINT_TEST_SIZE
2222
7) PCI_ENDPOINT_TEST_CHECKSUM
23+
8) PCI_ENDPOINT_TEST_IRQ_TYPE
24+
9) PCI_ENDPOINT_TEST_IRQ_NUMBER
2325

2426
*) PCI_ENDPOINT_TEST_MAGIC
2527

@@ -34,10 +36,10 @@ that the endpoint device must perform.
3436
Bitfield Description:
3537
Bit 0 : raise legacy IRQ
3638
Bit 1 : raise MSI IRQ
37-
Bit 2 - 7 : MSI interrupt number
38-
Bit 8 : read command (read data from RC buffer)
39-
Bit 9 : write command (write data to RC buffer)
40-
Bit 10 : copy command (copy data from one RC buffer to another
39+
Bit 2 : raise MSI-X IRQ
40+
Bit 3 : read command (read data from RC buffer)
41+
Bit 4 : write command (write data to RC buffer)
42+
Bit 5 : copy command (copy data from one RC buffer to another
4143
RC buffer)
4244

4345
*) PCI_ENDPOINT_TEST_STATUS
@@ -64,3 +66,22 @@ COPY/READ command.
6466

6567
This register contains the destination address (RC buffer address) for
6668
the COPY/WRITE command.
69+
70+
*) PCI_ENDPOINT_TEST_IRQ_TYPE
71+
72+
This register contains the interrupt type (Legacy/MSI) triggered
73+
for the READ/WRITE/COPY and raise IRQ (Legacy/MSI) commands.
74+
75+
Possible types:
76+
- Legacy : 0
77+
- MSI : 1
78+
- MSI-X : 2
79+
80+
*) PCI_ENDPOINT_TEST_IRQ_NUMBER
81+
82+
This register contains the triggered ID interrupt.
83+
84+
Admissible values:
85+
- Legacy : 0
86+
- MSI : [1 .. 32]
87+
- MSI-X : [1 .. 2048]

0 commit comments

Comments
 (0)