mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
PCI: endpoint: Support NTB transfer between RC and EP
[ Upstream commit e35f56bb03 ]
Add NTB function driver and virtual PCI Bus and Virtual NTB driver
to implement communication between PCIe Root Port and PCIe EP devices
┌────────────┐ ┌─────────────────────────────────────┐
│ │ │ │
├────────────┤ │ ┌──────────────┤
│ NTB │ │ │ NTB │
│ NetDev │ │ │ NetDev │
├────────────┤ │ ├──────────────┤
│ NTB │ │ │ NTB │
│ Transfer │ │ │ Transfer │
├────────────┤ │ ├──────────────┤
│ │ │ │ │
│ PCI NTB │ │ │ │
│ EPF │ │ │ │
│ Driver │ │ │ PCI Virtual │
│ │ ├───────────────┐ │ NTB Driver │
│ │ │ PCI EP NTB │◄────►│ │
│ │ │ FN Driver │ │ │
├────────────┤ ├───────────────┤ ├──────────────┤
│ │ │ │ │ │
│ PCI Bus │ ◄─────► │ PCI EP Bus │ │ Virtual PCI │
│ │ PCI │ │ │ Bus │
└────────────┘ └───────────────┴──────┴──────────────┘
PCIe Root Port PCI EP
This driver includes 3 parts:
1 PCI EP NTB function driver
2 Virtual PCI bus
3 PCI virtual NTB driver, which is loaded only by above virtual PCI bus
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Stable-dep-of: aebfdfe39b93 ("NTB: fix possible name leak in ntb_register_device()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
@@ -25,3 +25,14 @@ config PCI_EPF_NTB
|
||||
device tree.
|
||||
|
||||
If in doubt, say "N" to disable Endpoint NTB driver.
|
||||
|
||||
config PCI_EPF_VNTB
|
||||
tristate "PCI Endpoint NTB driver"
|
||||
depends on PCI_ENDPOINT
|
||||
select CONFIGFS_FS
|
||||
help
|
||||
Select this configuration option to enable the Non-Transparent
|
||||
Bridge (NTB) driver for PCIe Endpoint. NTB driver implements NTB
|
||||
between PCI Root Port and PCIe Endpoint.
|
||||
|
||||
If in doubt, say "N" to disable Endpoint NTB driver.
|
||||
|
||||
@@ -5,3 +5,4 @@
|
||||
|
||||
obj-$(CONFIG_PCI_EPF_TEST) += pci-epf-test.o
|
||||
obj-$(CONFIG_PCI_EPF_NTB) += pci-epf-ntb.o
|
||||
obj-$(CONFIG_PCI_EPF_VNTB) += pci-epf-vntb.o
|
||||
|
||||
1424
drivers/pci/endpoint/functions/pci-epf-vntb.c
Normal file
1424
drivers/pci/endpoint/functions/pci-epf-vntb.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user