From f9a8a192300026b8729d3498fc9134ea9bf9368f Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Mon, 23 Jan 2023 20:16:29 +0100 Subject: [PATCH] staging: vchiq_arm: Improve error log for vchiq_platform_init During sending the base address of the slots to the VideoCore firmware via mailbox property, issues could happened on the ARM and on the VideoCore side. So better separate the error handling in order to provide more details. This should help to narrow down the possible cause. Signed-off-by: Stefan Wahren Reviewed-by: Umang Jain Link: https://lore.kernel.org/r/20230123191629.21019-1-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 22de23f3af02a..cddcd3c596c93 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -541,9 +541,15 @@ int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state) channelbase = slot_phys; err = rpi_firmware_property(fw, RPI_FIRMWARE_VCHIQ_INIT, &channelbase, sizeof(channelbase)); - if (err || channelbase) { - dev_err(dev, "failed to set channelbase\n"); - return err ? : -ENXIO; + if (err) { + dev_err(dev, "failed to send firmware property: %d\n", err); + return err; + } + + if (channelbase) { + dev_err(dev, "failed to set channelbase (response: %x)\n", + channelbase); + return -ENXIO; } vchiq_log_info(vchiq_arm_log_level, "vchiq_init - done (slots %pK, phys %pad)", -- 2.30.2