forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'pci-v4.12-changes' of git://git.kernel.org/pub/scm/linux/k…
…ernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: - add framework for supporting PCIe devices in Endpoint mode (Kishon Vijay Abraham I) - use non-postable PCI config space mappings when possible (Lorenzo Pieralisi) - clean up and unify mmap of PCI BARs (David Woodhouse) - export and unify Function Level Reset support (Christoph Hellwig) - avoid FLR for Intel 82579 NICs (Sasha Neftin) - add pci_request_irq() and pci_free_irq() helpers (Christoph Hellwig) - short-circuit config access failures for disconnected devices (Keith Busch) - remove D3 sleep delay when possible (Adrian Hunter) - freeze PME scan before suspending devices (Lukas Wunner) - stop disabling MSI/MSI-X in pci_device_shutdown() (Prarit Bhargava) - disable boot interrupt quirk for ASUS M2N-LR (Stefan Assmann) - add arch-specific alignment control to improve device passthrough by avoiding multiple BARs in a page (Yongji Xie) - add sysfs sriov_drivers_autoprobe to control VF driver binding (Bodong Wang) - allow slots below PCI-to-PCIe "reverse bridges" (Bjorn Helgaas) - fix crashes when unbinding host controllers that don't support removal (Brian Norris) - add driver for MicroSemi Switchtec management interface (Logan Gunthorpe) - add driver for Faraday Technology FTPCI100 host bridge (Linus Walleij) - add i.MX7D support (Andrey Smirnov) - use generic MSI support for Aardvark (Thomas Petazzoni) - make Rockchip driver modular (Brian Norris) - advertise 128-byte Read Completion Boundary support for Rockchip (Shawn Lin) - advertise PCI_EXP_LNKSTA_SLC for Rockchip root port (Shawn Lin) - convert atomic_t to refcount_t in HV driver (Elena Reshetova) - add CPU IRQ affinity in HV driver (K. Y. Srinivasan) - fix PCI bus removal in HV driver (Long Li) - add support for ThunderX2 DMA alias topology (Jayachandran C) - add ThunderX pass2.x 2nd node MCFG quirk (Tomasz Nowicki) - add ITE 8893 bridge DMA alias quirk (Jarod Wilson) - restrict Cavium ACS quirk only to CN81xx/CN83xx/CN88xx devices (Manish Jaggi) * tag 'pci-v4.12-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (146 commits) PCI: Don't allow unbinding host controllers that aren't prepared ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP MAINTAINERS: Add PCI Endpoint maintainer Documentation: PCI: Add userguide for PCI endpoint test function tools: PCI: Add sample test script to invoke pcitest tools: PCI: Add a userspace tool to test PCI endpoint Documentation: misc-devices: Add Documentation for pci-endpoint-test driver misc: Add host side PCI driver for PCI test function device PCI: Add device IDs for DRA74x and DRA72x dt-bindings: PCI: dra7xx: Add DT bindings to enable unaligned access PCI: dwc: dra7xx: Workaround for errata id i870 dt-bindings: PCI: dra7xx: Add DT bindings for PCI dra7xx EP mode PCI: dwc: dra7xx: Add EP mode support PCI: dwc: dra7xx: Facilitate wrapper and MSI interrupts to be enabled independently dt-bindings: PCI: Add DT bindings for PCI designware EP mode PCI: dwc: designware: Add EP mode support Documentation: PCI: Add binding documentation for pci-test endpoint function ixgbe: Use pcie_flr() instead of duplicating it IB/hfi1: Use pcie_flr() instead of duplicating it PCI: imx6: Fix spelling mistake: "contol" -> "control" ...
- Loading branch information
Showing
148 changed files
with
8,937 additions
and
1,004 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -301,3 +301,25 @@ Contact: Emil Velikov <[email protected]> | |
Description: | ||
This file contains the revision field of the PCI device. | ||
The value comes from device config space. The file is read only. | ||
|
||
What: /sys/bus/pci/devices/.../sriov_drivers_autoprobe | ||
Date: April 2017 | ||
Contact: Bodong Wang<[email protected]> | ||
Description: | ||
This file is associated with the PF of a device that | ||
supports SR-IOV. It determines whether newly-enabled VFs | ||
are immediately bound to a driver. It initially contains | ||
1, which means the kernel automatically binds VFs to a | ||
compatible driver immediately after they are enabled. If | ||
an application writes 0 to the file before enabling VFs, | ||
the kernel will not bind VFs to a driver. | ||
|
||
A typical use case is to write 0 to this file, then enable | ||
VFs, then assign the newly-created VFs to virtual machines. | ||
Note that changing this file does not affect already- | ||
enabled VFs. In this scenario, the user must first disable | ||
the VFs, write 0 to sriov_drivers_autoprobe, then re-enable | ||
the VFs. | ||
|
||
This is similar to /sys/bus/pci/drivers_autoprobe, but | ||
affects only the VFs associated with a specific PF. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
switchtec - Microsemi Switchtec PCI Switch Management Endpoint | ||
|
||
For details on this subsystem look at Documentation/switchtec.txt. | ||
|
||
What: /sys/class/switchtec | ||
Date: 05-Jan-2017 | ||
KernelVersion: v4.11 | ||
Contact: Logan Gunthorpe <[email protected]> | ||
Description: The switchtec class subsystem folder. | ||
Each registered switchtec driver is represented by a switchtecX | ||
subfolder (X being an integer >= 0). | ||
|
||
|
||
What: /sys/class/switchtec/switchtec[0-9]+/component_id | ||
Date: 05-Jan-2017 | ||
KernelVersion: v4.11 | ||
Contact: Logan Gunthorpe <[email protected]> | ||
Description: Component identifier as stored in the hardware (eg. PM8543) | ||
(read only) | ||
Values: arbitrary string. | ||
|
||
|
||
What: /sys/class/switchtec/switchtec[0-9]+/component_revision | ||
Date: 05-Jan-2017 | ||
KernelVersion: v4.11 | ||
Contact: Logan Gunthorpe <[email protected]> | ||
Description: Component revision stored in the hardware (read only) | ||
Values: integer. | ||
|
||
|
||
What: /sys/class/switchtec/switchtec[0-9]+/component_vendor | ||
Date: 05-Jan-2017 | ||
KernelVersion: v4.11 | ||
Contact: Logan Gunthorpe <[email protected]> | ||
Description: Component vendor as stored in the hardware (eg. MICROSEM) | ||
(read only) | ||
Values: arbitrary string. | ||
|
||
|
||
What: /sys/class/switchtec/switchtec[0-9]+/device_version | ||
Date: 05-Jan-2017 | ||
KernelVersion: v4.11 | ||
Contact: Logan Gunthorpe <[email protected]> | ||
Description: Device version as stored in the hardware (read only) | ||
Values: integer. | ||
|
||
|
||
What: /sys/class/switchtec/switchtec[0-9]+/fw_version | ||
Date: 05-Jan-2017 | ||
KernelVersion: v4.11 | ||
Contact: Logan Gunthorpe <[email protected]> | ||
Description: Currently running firmware version (read only) | ||
Values: integer (in hexadecimal). | ||
|
||
|
||
What: /sys/class/switchtec/switchtec[0-9]+/partition | ||
Date: 05-Jan-2017 | ||
KernelVersion: v4.11 | ||
Contact: Logan Gunthorpe <[email protected]> | ||
Description: Partition number for this device in the switch (read only) | ||
Values: integer. | ||
|
||
|
||
What: /sys/class/switchtec/switchtec[0-9]+/partition_count | ||
Date: 05-Jan-2017 | ||
KernelVersion: v4.11 | ||
Contact: Logan Gunthorpe <[email protected]> | ||
Description: Total number of partitions in the switch (read only) | ||
Values: integer. | ||
|
||
|
||
What: /sys/class/switchtec/switchtec[0-9]+/product_id | ||
Date: 05-Jan-2017 | ||
KernelVersion: v4.11 | ||
Contact: Logan Gunthorpe <[email protected]> | ||
Description: Product identifier as stored in the hardware (eg. PSX 48XG3) | ||
(read only) | ||
Values: arbitrary string. | ||
|
||
|
||
What: /sys/class/switchtec/switchtec[0-9]+/product_revision | ||
Date: 05-Jan-2017 | ||
KernelVersion: v4.11 | ||
Contact: Logan Gunthorpe <[email protected]> | ||
Description: Product revision stored in the hardware (eg. RevB) | ||
(read only) | ||
Values: arbitrary string. | ||
|
||
|
||
What: /sys/class/switchtec/switchtec[0-9]+/product_vendor | ||
Date: 05-Jan-2017 | ||
KernelVersion: v4.11 | ||
Contact: Logan Gunthorpe <[email protected]> | ||
Description: Product vendor as stored in the hardware (eg. MICROSEM) | ||
(read only) | ||
Values: arbitrary string. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
PCI TEST ENDPOINT FUNCTION | ||
|
||
name: Should be "pci_epf_test" to bind to the pci_epf_test driver. | ||
|
||
Configurable Fields: | ||
vendorid : should be 0x104c | ||
deviceid : should be 0xb500 for DRA74x and 0xb501 for DRA72x | ||
revid : don't care | ||
progif_code : don't care | ||
subclass_code : don't care | ||
baseclass_code : should be 0xff | ||
cache_line_size : don't care | ||
subsys_vendor_id : don't care | ||
subsys_id : don't care | ||
interrupt_pin : Should be 1 - INTA, 2 - INTB, 3 - INTC, 4 -INTD | ||
msi_interrupts : Should be 1 to 32 depending on the number of MSI interrupts | ||
to test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
CONFIGURING PCI ENDPOINT USING CONFIGFS | ||
Kishon Vijay Abraham I <[email protected]> | ||
|
||
The PCI Endpoint Core exposes configfs entry (pci_ep) to configure the | ||
PCI endpoint function and to bind the endpoint function | ||
with the endpoint controller. (For introducing other mechanisms to | ||
configure the PCI Endpoint Function refer to [1]). | ||
|
||
*) Mounting configfs | ||
|
||
The PCI Endpoint Core layer creates pci_ep directory in the mounted configfs | ||
directory. configfs can be mounted using the following command. | ||
|
||
mount -t configfs none /sys/kernel/config | ||
|
||
*) Directory Structure | ||
|
||
The pci_ep configfs has two directories at its root: controllers and | ||
functions. Every EPC device present in the system will have an entry in | ||
the *controllers* directory and and every EPF driver present in the system | ||
will have an entry in the *functions* directory. | ||
|
||
/sys/kernel/config/pci_ep/ | ||
.. controllers/ | ||
.. functions/ | ||
|
||
*) Creating EPF Device | ||
|
||
Every registered EPF driver will be listed in controllers directory. The | ||
entries corresponding to EPF driver will be created by the EPF core. | ||
|
||
/sys/kernel/config/pci_ep/functions/ | ||
.. <EPF Driver1>/ | ||
... <EPF Device 11>/ | ||
... <EPF Device 21>/ | ||
.. <EPF Driver2>/ | ||
... <EPF Device 12>/ | ||
... <EPF Device 22>/ | ||
|
||
In order to create a <EPF device> of the type probed by <EPF Driver>, the | ||
user has to create a directory inside <EPF DriverN>. | ||
|
||
Every <EPF device> directory consists of the following entries that can be | ||
used to configure the standard configuration header of the endpoint function. | ||
(These entries are created by the framework when any new <EPF Device> is | ||
created) | ||
|
||
.. <EPF Driver1>/ | ||
... <EPF Device 11>/ | ||
... vendorid | ||
... deviceid | ||
... revid | ||
... progif_code | ||
... subclass_code | ||
... baseclass_code | ||
... cache_line_size | ||
... subsys_vendor_id | ||
... subsys_id | ||
... interrupt_pin | ||
|
||
*) EPC Device | ||
|
||
Every registered EPC device will be listed in controllers directory. The | ||
entries corresponding to EPC device will be created by the EPC core. | ||
|
||
/sys/kernel/config/pci_ep/controllers/ | ||
.. <EPC Device1>/ | ||
... <Symlink EPF Device11>/ | ||
... <Symlink EPF Device12>/ | ||
... start | ||
.. <EPC Device2>/ | ||
... <Symlink EPF Device21>/ | ||
... <Symlink EPF Device22>/ | ||
... start | ||
|
||
The <EPC Device> directory will have a list of symbolic links to | ||
<EPF Device>. These symbolic links should be created by the user to | ||
represent the functions present in the endpoint device. | ||
|
||
The <EPC Device> directory will also have a *start* field. Once | ||
"1" is written to this field, the endpoint device will be ready to | ||
establish the link with the host. This is usually done after | ||
all the EPF devices are created and linked with the EPC device. | ||
|
||
|
||
| controllers/ | ||
| <Directory: EPC name>/ | ||
| <Symbolic Link: Function> | ||
| start | ||
| functions/ | ||
| <Directory: EPF driver>/ | ||
| <Directory: EPF device>/ | ||
| vendorid | ||
| deviceid | ||
| revid | ||
| progif_code | ||
| subclass_code | ||
| baseclass_code | ||
| cache_line_size | ||
| subsys_vendor_id | ||
| subsys_id | ||
| interrupt_pin | ||
| function | ||
|
||
[1] -> Documentation/PCI/endpoint/pci-endpoint.txt |
Oops, something went wrong.