diff options
| author | Nipun Gupta <[email protected]> | 2023-09-15 04:54:21 +0000 |
|---|---|---|
| committer | Alex Williamson <[email protected]> | 2023-09-28 18:12:07 +0000 |
| commit | a941b784b15ff65e1a3b6a259c6d6cf7fa0bb3c3 (patch) | |
| tree | 10bcc48828fc5741e1cbce64efe13916ab971288 /drivers/cdx/controller/cdx_controller.c | |
| parent | Merge branch 'mlx5-vfio' of https://git.kernel.org/pub/scm/linux/kernel/git/m... (diff) | |
| download | kernel-a941b784b15ff65e1a3b6a259c6d6cf7fa0bb3c3.tar.gz kernel-a941b784b15ff65e1a3b6a259c6d6cf7fa0bb3c3.zip | |
cdx: add support for bus mastering
Introduce cdx_set_master() and cdx_clear_master() APIs to support
enable and disable of bus mastering. Drivers need to use these APIs to
enable/disable DMAs from the CDX devices.
Signed-off-by: Nipun Gupta <[email protected]>
Reviewed-by: Pieter Jansen van Vuuren <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'drivers/cdx/controller/cdx_controller.c')
| -rw-r--r-- | drivers/cdx/controller/cdx_controller.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cdx/controller/cdx_controller.c b/drivers/cdx/controller/cdx_controller.c index bb4ae7970e21..7828dac8edb1 100644 --- a/drivers/cdx/controller/cdx_controller.c +++ b/drivers/cdx/controller/cdx_controller.c @@ -56,6 +56,10 @@ static int cdx_configure_device(struct cdx_controller *cdx, case CDX_DEV_RESET_CONF: ret = cdx_mcdi_reset_device(cdx->priv, bus_num, dev_num); break; + case CDX_DEV_BUS_MASTER_CONF: + ret = cdx_mcdi_bus_master_enable(cdx->priv, bus_num, dev_num, + dev_config->bus_master_enable); + break; default: ret = -EINVAL; } |
