VFIO: platform: reset: AMD xgbe reset module
Subsystems (4)
PATCH v5 1/1 VFIO: platform: reset: AMD xgbe reset module
This patch introduces a module that registers and implements a low-level reset function for the AMD XGBE device.
it performs the following actions:
- reset the PHY
- disable auto-negotiation
- disable & clear auto-negotiation IRQ
- soft-reset the MAC
Those tiny pieces of code are inherited from the native xgbe driver.
---
Applies on top of [PATCH v6 0/8] VFIO platform reset module rework
v4 -> v5:
- fix ioaddr leak
iounmap is done in vfio platform driver (vfio_platform_regions_cleanup) after reset (vfio_platform_release)
v3 -> v4:
- add Arnd's R-b
v2 -> v3:
- in Kconfig, add empty line between the 2 options
- remove DRIVER_VERSION, DRIVER_AUTHOR and DRIVER_DESC and put strings directly in MODULE macros
v1 -> v2:
- uses module_vfio_reset_handler macro
--- drivers/vfio/platform/reset/Kconfig | 8 ++ drivers/vfio/platform/reset/Makefile | 2 + .../vfio/platform/reset/vfio_platform_amdxgbe.c | 127 +++++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 100644 drivers/vfio/platform/reset/vfio_platform_amdxgbe.c
drivers/vfio/platform/reset/Kconfig +8 -0
@@ -5,3 +5,11 @@ config VFIO_PLATFORM_CALXEDAXGMAC_RESET Enables the VFIO platform driver to handle reset for Calxeda xgmac If you don't know what to do here, say N. + +config VFIO_PLATFORM_AMDXGBE_RESET + tristate "VFIO support for AMD XGBE reset" + depends on VFIO_PLATFORM + help + Enables the VFIO platform driver to handle reset for AMD XGBE + + If you don't know what to do here, say N.
drivers/vfio/platform/reset/Makefile +2 -0
@@ -1,5 +1,7 @@ vfio-platform-calxedaxgmac-y := vfio_platform_calxedaxgmac.o +vfio-platform-amdxgbe-y := vfio_platform_amdxgbe.o ccflags-y += -Idrivers/vfio/platform obj-$(CONFIG_VFIO_PLATFORM_CALXEDAXGMAC_RESET) += vfio-platform-calxedaxgmac.o +obj-$(CONFIG_VFIO_PLATFORM_AMDXGBE_RESET) += vfio-platform-amdxgbe.o
drivers/vfio/platform/reset/vfio_platform_amdxgbe.c new file +127 -0
127 lines not on this page · raw message
Signature · 1 line
1.9.1