public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hansg@kernel.org>
To: Daniel Scally <djrscally@gmail.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Hans de Goede <hansg@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>
Subject: [PATCH 4/4] media: ipu-bridge: Improve error logging when waiting for IVSC to become ready
Date: Mon, 23 Jun 2025 13:00:35 +0200	[thread overview]
Message-ID: <20250623110035.18340-5-hansg@kernel.org> (raw)
In-Reply-To: <20250623110035.18340-1-hansg@kernel.org>

From: Hans de Goede <hdegoede@redhat.com>

The ipu-bridge code waits for the IVSC to become ready (on platforms with
an IVSC chip).

It does this by returning -EPROBE_DEFER, but it does not use
dev_err_probe() so no reason for deferring gets registered.

After 30 seconds the kernel logs a warning that the probe is still
deferred, which looks like this:

[   33.951709] pci 0000:00:14.3: deferred probe pending: (reason unknown)

Use dev_err_probe() when returning -EPROBE_DEFER to register the probe
deferral reason changing the error to:

deferred probe pending: waiting for IVSC to become ready

to help with debugging why drivers are not binding if the iVSC does
not become ready for some reason.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/media/pci/intel/ipu-bridge.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
index c80af394ce18..dbb847a104e0 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -811,7 +811,8 @@ int ipu_bridge_init(struct device *dev,
 		return 0;
 
 	if (!ipu_bridge_ivsc_is_ready())
-		return -EPROBE_DEFER;
+		return dev_err_probe(dev, -EPROBE_DEFER,
+				     "waiting for IVSC to become ready\n");
 
 	bridge = kzalloc(sizeof(*bridge), GFP_KERNEL);
 	if (!bridge)
-- 
2.49.0


  parent reply	other threads:[~2025-06-23 11:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23 11:00 [PATCH 0/4] media: i2c/pci: Various error logging improvements Hans de Goede
2025-06-23 11:00 ` [PATCH 1/4] media: ov5693: Improve error logging when fwnode is not found Hans de Goede
2025-06-24 12:43   ` Daniel Scally
2025-06-23 11:00 ` [PATCH 2/4] media: ov7251: " Hans de Goede
2025-06-24 12:44   ` Daniel Scally
2025-06-23 11:00 ` [PATCH 3/4] media: ov8865: " Hans de Goede
2025-06-24 12:44   ` Daniel Scally
2025-06-23 11:00 ` Hans de Goede [this message]
2025-06-24 12:44   ` [PATCH 4/4] media: ipu-bridge: Improve error logging when waiting for IVSC to become ready Daniel Scally
  -- strict thread matches above, loose matches on Subject: below --
2024-10-05 12:15 [PATCH 1/4] media: ov5693: Improve error logging when fwnode is not found Hans de Goede
2024-10-05 12:15 ` [PATCH 4/4] media: ipu-bridge: Improve error logging when waiting for IVSC to become ready Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250623110035.18340-5-hansg@kernel.org \
    --to=hansg@kernel.org \
    --cc=djrscally@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox