Skip to content

Commit e434e54

Browse files
Shijith Thottonbjorn-helgaas
authored andcommitted
PCI: hotplug: Add OCTEON PCI hotplug controller driver
Add a PCI hotplug controller driver for the OCTEON PCIe device. The OCTEON PCIe device is a multi-function device where function 0 serves as the PCI hotplug controller. There is an out-of-band management console interface to firmware running on function 0 whereby an administrator can disable functions to save power or enable them with one of several personalities (virtio-net, virtio-crypto, NVMe, etc) for the other functions. Function 0 initiates hotplug events handled by this driver when the other functions are enabled or disabled. +--------------------------------+ | Root Port | +--------------------------------+ | PCIe | +---------------------------------------------------------------+ | OCTEON PCIe Multifunction Device | +---------------------------------------------------------------+ | | | | | | | | +---------------------+ +----------------+ +-----+ +----------------+ | Function 0 | | Function 1 | | ... | | Function 7 | | (Hotplug controller)| | (Hotplug slot) | | | | (Hotplug slot) | +---------------------+ +----------------+ +-----+ +----------------+ | | +-------------------------+ | Controller Firmware | +-------------------------+ The hotplug controller driver enables hotplugging of non-controller functions within the same device. During probing, the driver removes the non-controller functions and registers them as PCI hotplug slots. These slots are added back by the driver, only upon request from the device firmware. The controller uses MSI-X interrupts to notify the host of hotplug events initiated by the OCTEON firmware. Additionally, the driver allows users to enable or disable individual functions via sysfs slot entries, as provided by the PCI hotplug framework. Link: https://lore.kernel.org/r/20241111134523.2796699-1-sthotton@marvell.com Co-developed-by: Vamsi Attunuru <vattunuru@marvell.com> Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com> Signed-off-by: Shijith Thotton <sthotton@marvell.com> [bhelgaas: use pci_info() when possible] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 9852d85 commit e434e54

File tree

4 files changed

+444
-0
lines changed

4 files changed

+444
-0
lines changed

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13882,6 +13882,12 @@ R: schalla@marvell.com
1388213882
R: vattunuru@marvell.com
1388313883
F: drivers/vdpa/octeon_ep/
1388413884

13885+
MARVELL OCTEON HOTPLUG DRIVER
13886+
R: Shijith Thotton <sthotton@marvell.com>
13887+
R: Vamsi Attunuru <vattunuru@marvell.com>
13888+
S: Supported
13889+
F: drivers/pci/hotplug/octep_hp.c
13890+
1388513891
MATROX FRAMEBUFFER DRIVER
1388613892
L: linux-fbdev@vger.kernel.org
1388713893
S: Orphan

drivers/pci/hotplug/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,16 @@ config HOTPLUG_PCI_CPCI_GENERIC
118118

119119
When in doubt, say N.
120120

121+
config HOTPLUG_PCI_OCTEONEP
122+
bool "Marvell OCTEON PCI Hotplug driver"
123+
depends on HOTPLUG_PCI
124+
help
125+
Say Y here if you have an OCTEON PCIe device with a hotplug
126+
controller. This driver enables the non-controller functions of the
127+
device to be registered as hotplug slots.
128+
129+
When in doubt, say N.
130+
121131
config HOTPLUG_PCI_SHPC
122132
bool "SHPC PCI Hotplug driver"
123133
help

drivers/pci/hotplug/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ obj-$(CONFIG_HOTPLUG_PCI_RPA) += rpaphp.o
2020
obj-$(CONFIG_HOTPLUG_PCI_RPA_DLPAR) += rpadlpar_io.o
2121
obj-$(CONFIG_HOTPLUG_PCI_ACPI) += acpiphp.o
2222
obj-$(CONFIG_HOTPLUG_PCI_S390) += s390_pci_hpc.o
23+
obj-$(CONFIG_HOTPLUG_PCI_OCTEONEP) += octep_hp.o
2324

2425
# acpiphp_ibm extends acpiphp, so should be linked afterwards.
2526

0 commit comments

Comments
 (0)