diff mbox series

[07/17] cdx: Propagate DMA configuration errors

Message ID 20261105-device-trust-core-v1-7-1e536825b4eb@nvidia.com
State New
Headers show
Series driver core: Authorize device trust before driver binding | expand

Commit Message

Leon Romanovsky Nov. 5, 2026, 11:42 a.m. UTC
From: Leon Romanovsky <leonro@nvidia.com>

CDX reports successful DMA configuration when firmware setup defers or
default-domain acquisition fails. Driver probing can then proceed without
the required DMA setup or IOMMU ownership.

Return the configuration result so driver core stops or defers probing
instead of allowing a driver to use a rejected domain.

Fixes: 2959ab247061 ("cdx: add the cdx bus driver")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/cdx/cdx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

sashiko-bot@kernel.org Nov. 6, 2026, 11:43 a.m. UTC | #1
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> CDX reports successful DMA configuration when firmware setup defers or
> default-domain acquisition fails. Driver probing can then proceed without
> the required DMA setup or IOMMU ownership.
> 
> Return the configuration result so driver core stops or defers probing
> instead of allowing a driver to use a rejected domain.
> 
> Fixes: 2959ab247061 ("cdx: add the cdx bus driver")
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

Sashiko has reviewed this patch and found no issues.
diff mbox series

Patch

diff --git a/drivers/cdx/cdx.c b/drivers/cdx/cdx.c
index a118a89a7779d..0a030bf522690 100644
--- a/drivers/cdx/cdx.c
+++ b/drivers/cdx/cdx.c
@@ -367,7 +367,7 @@  static int cdx_dma_configure(struct device *dev)
 			arch_teardown_dma_ops(dev);
 	}
 
-	return 0;
+	return ret;
 }
 
 static void cdx_dma_cleanup(struct device *dev)