Skip to content

Commit 6e12917

Browse files
committed
Merge branch 'remotes/lorenzo/pci/endpoint'
- Add max-virtual-functions to endpoint binding (Kishon Vijay Abraham I) - Add pci_epf_add_vepf() API to add virtual function to endpoint (Kishon Vijay Abraham I) - Add pci_epf_vepf_link() to link virtual function to endpoint physical function (Kishon Vijay Abraham I) - Add virtual function number to pci_epc_ops endpoint ops interfaces (Kishon Vijay Abraham I) - Simplify register base address computation for endpoint BAR configuration (Kishon Vijay Abraham I) - Add support to configure virtual functions in cadence endpoint driver (Kishon Vijay Abraham I) - Add SR-IOV configuration to endpoint test driver (Kishon Vijay Abraham I) - Document configfs usage to create virtual functions for endpoints (Kishon Vijay Abraham I) * remotes/lorenzo/pci/endpoint: Documentation: PCI: endpoint/pci-endpoint-cfs: Guide to use SR-IOV misc: pci_endpoint_test: Populate sriov_configure ops to configure SR-IOV device PCI: cadence: Add support to configure virtual functions PCI: cadence: Simplify code to get register base address for configuring BAR PCI: endpoint: Add virtual function number in pci_epc ops PCI: endpoint: Add support to link a physical function to a virtual function PCI: endpoint: Add support to add virtual function in endpoint core dt-bindings: PCI: pci-ep: Add binding to specify virtual function
2 parents eccefc7 + 0c84f5b commit 6e12917

File tree

15 files changed

+616
-225
lines changed

15 files changed

+616
-225
lines changed

Documentation/PCI/endpoint/pci-endpoint-cfs.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ entries corresponding to EPF driver will be created by the EPF core.
4343
.. <EPF Driver1>/
4444
... <EPF Device 11>/
4545
... <EPF Device 21>/
46+
... <EPF Device 31>/
4647
.. <EPF Driver2>/
4748
... <EPF Device 12>/
4849
... <EPF Device 22>/
@@ -68,6 +69,7 @@ created)
6869
... subsys_vendor_id
6970
... subsys_id
7071
... interrupt_pin
72+
... <Symlink EPF Device 31>/
7173
... primary/
7274
... <Symlink EPC Device1>/
7375
... secondary/
@@ -79,6 +81,13 @@ interface should be added in 'primary' directory and symlink of endpoint
7981
controller connected to secondary interface should be added in 'secondary'
8082
directory.
8183

84+
The <EPF Device> directory can have a list of symbolic links
85+
(<Symlink EPF Device 31>) to other <EPF Device>. These symbolic links should
86+
be created by the user to represent the virtual functions that are bound to
87+
the physical function. In the above directory structure <EPF Device 11> is a
88+
physical function and <EPF Device 31> is a virtual function. An EPF device once
89+
it's linked to another EPF device, cannot be linked to a EPC device.
90+
8291
EPC Device
8392
==========
8493

@@ -98,7 +107,8 @@ entries corresponding to EPC device will be created by the EPC core.
98107

99108
The <EPC Device> directory will have a list of symbolic links to
100109
<EPF Device>. These symbolic links should be created by the user to
101-
represent the functions present in the endpoint device.
110+
represent the functions present in the endpoint device. Only <EPF Device>
111+
that represents a physical function can be linked to a EPC device.
102112

103113
The <EPC Device> directory will also have a *start* field. Once
104114
"1" is written to this field, the endpoint device will be ready to

Documentation/devicetree/bindings/pci/pci-ep.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ properties:
2323
default: 1
2424
maximum: 255
2525

26+
max-virtual-functions:
27+
description: Array representing the number of virtual functions corresponding to each physical
28+
function
29+
$ref: /schemas/types.yaml#/definitions/uint8-array
30+
minItems: 1
31+
maxItems: 255
32+
2633
max-link-speed:
2734
$ref: /schemas/types.yaml#/definitions/uint32
2835
enum: [ 1, 2, 3, 4 ]

drivers/misc/pci_endpoint_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,7 @@ static struct pci_driver pci_endpoint_test_driver = {
986986
.id_table = pci_endpoint_test_tbl,
987987
.probe = pci_endpoint_test_probe,
988988
.remove = pci_endpoint_test_remove,
989+
.sriov_configure = pci_sriov_configure_simple,
989990
};
990991
module_pci_driver(pci_endpoint_test_driver);
991992

0 commit comments

Comments
 (0)