From patchwork Sat Oct 5 12:15:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 13823260 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E33A1F9FE for ; Sat, 5 Oct 2024 12:15:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728130542; cv=none; b=MK8cGCI/iW+TVbACjhnMh9h2wjl2oMPhuynw3dDM337/L6JSMWKX4aSJMkWUnlC9Jvdgs/VaOHUWS8/2EX26j7ZrfKZWjgIAZpCvWS9pKiRhoWXZNWP2bjRv4KglZtoO8+ZEwzCVsqzrymRYhrZYJ1E1QzFCvRJhnUzK4QNXEbI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728130542; c=relaxed/simple; bh=ZQbZcseiitw8pn+pvtGFrneWG6SeI2Z9oJ6omr4f+xo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OnNbt/WsqTwRpGwj1uxvk4vWIkm+SDCI1V5hK6AzQXZ2KY2PkNdscrFbBB4z5npCImCGL/J1aMOjYvKY3oUl8UHJZkAVFz0B+PoMe8bDomdWiczG1DnEhvC/v6670siXPRPYSNzSvAPSehDKrhNnUA4Vj1viqB8QL+7DbRNXYUA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=jVrFhStt; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="jVrFhStt" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728130538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Stm0EThDg453Kob8CSJ3gVpq6fshLRYK7wyGY/FLF3s=; b=jVrFhStt2BPMjMz95PVB4tMFzFNvWZGG/aRTzt6RCfZC+L88MKqGo3KNPwBaSsIuanjlOU yklpoBk5VUqEUid1WaDx+NwnaVkVYWettCSoeWJpN6aOMFLRm6G8Y76g8mH6oRN6jZRx9Z r/GkSVFlbH6OYnQbRzkr8UHE2g17ems= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-133-4HFyFn8ANiGCl8XFyZqzew-1; Sat, 05 Oct 2024 08:15:35 -0400 X-MC-Unique: 4HFyFn8ANiGCl8XFyZqzew-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0605619560B0; Sat, 5 Oct 2024 12:15:34 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.19]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2F05F19560A3; Sat, 5 Oct 2024 12:15:31 +0000 (UTC) From: Hans de Goede To: Daniel Scally , Sakari Ailus Cc: Hans de Goede , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 1/4] media: ov5693: Improve error logging when fwnode is not found Date: Sat, 5 Oct 2024 14:15:22 +0200 Message-ID: <20241005121525.32172-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 The ov5693 driver waits for the endpoint fwnode to show up in case this fwnode is created by a bridge-driver. 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] i2c i2c-INT33BE:00: 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 fwnode graph endpoint Also update the comment to not refer to the no longer existing cio2-bridge code. Signed-off-by: Hans de Goede --- drivers/media/i2c/ov5693.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index 46b9ce111676..485efd15257e 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -1222,9 +1222,14 @@ static int ov5693_check_hwcfg(struct ov5693_device *ov5693) unsigned int i; int ret; + /* + * Sometimes the fwnode graph is initialized by the bridge driver + * Bridge drivers doing this may also add GPIO mappings, wait for this. + */ endpoint = fwnode_graph_get_next_endpoint(fwnode, NULL); if (!endpoint) - return -EPROBE_DEFER; /* Could be provided by cio2-bridge */ + return dev_err_probe(ov5693->dev, -EPROBE_DEFER, + "waiting for fwnode graph endpoint\n"); ret = v4l2_fwnode_endpoint_alloc_parse(endpoint, &bus_cfg); fwnode_handle_put(endpoint); From patchwork Sat Oct 5 12:15:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 13823259 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E33CF22318 for ; Sat, 5 Oct 2024 12:15:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728130541; cv=none; b=uytS0NKzEFO7XS8nymNA/5lZSL7pU7ZUrNRKktGpc6g1hnrdOXgkwM5pntvbmDta0/dfmQ5hBw4D7BDD/U35K1e9HiGjCbHco7H34hva5pEixrsnjED6bZby0JfdP5V7FOJronqLEWu+XBUDokhibJRFKVXJ7t+vjO3vxc3s9m8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728130541; c=relaxed/simple; bh=Wjz3P/Z8uXiamuWAV3rU8kHL11hfIRgMzalR8gKIKKE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iuaVKcXrkPhG74u0rH2Mq7uNSw4WpIPQMwUIgCcYShzZmj9KPDUE+Yh6lYtF/RkkP7tWxIsBBaJl0bWil7akj4S8z48Ql1uhOg6tTBq4tH5W9GKkfrNwKwQ/ZqmaTSd2Offv1Obqjt/oZ9ymnYjLLohpoqroonugpBBfERbaNKg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=XZEbJ5KV; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XZEbJ5KV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728130538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qBb7pxcFZznXYVyh1jtZaUCQQPBm9CrNZYxR0moz+/Q=; b=XZEbJ5KV7pOnee2mOT1PjofOfbDulrKqP8G1ZpcaZ6tPc86gQcZZVNMz5Yl6q2LvLwjsrU 6tQHiPamxQ4BEwJ6xnoG9cWuBNd1BgaLTUfvzfqVXxkZUNnI9osNTAt5lqGT7Eeni4HCrP 77GCk1r8IBsaqZLmh573ox+POI0NHko= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-497-h4rNNykDM1uGhxN6m0LB8A-1; Sat, 05 Oct 2024 08:15:37 -0400 X-MC-Unique: h4rNNykDM1uGhxN6m0LB8A-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 014451954B16; Sat, 5 Oct 2024 12:15:36 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.19]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6AFC219560A3; Sat, 5 Oct 2024 12:15:34 +0000 (UTC) From: Hans de Goede To: Daniel Scally , Sakari Ailus Cc: Hans de Goede , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 2/4] media: ov7251: Improve error logging when fwnode is not found Date: Sat, 5 Oct 2024 14:15:23 +0200 Message-ID: <20241005121525.32172-2-hdegoede@redhat.com> In-Reply-To: <20241005121525.32172-1-hdegoede@redhat.com> References: <20241005121525.32172-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 The ov7251 driver waits for the endpoint fwnode to show up in case this fwnode is created by a bridge-driver. 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.952052] i2c i2c-INT347E:00: 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 fwnode graph endpoint Also update the comment to not refer to the no longer existing cio2-bridge code. Signed-off-by: Hans de Goede --- drivers/media/i2c/ov7251.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov7251.c b/drivers/media/i2c/ov7251.c index 30f61e04ecaf..c417af01f194 100644 --- a/drivers/media/i2c/ov7251.c +++ b/drivers/media/i2c/ov7251.c @@ -1484,9 +1484,14 @@ static int ov7251_check_hwcfg(struct ov7251 *ov7251) unsigned int i, j; int ret; + /* + * Sometimes the fwnode graph is initialized by the bridge driver + * Bridge drivers doing this may also add GPIO mappings, wait for this. + */ endpoint = fwnode_graph_get_next_endpoint(fwnode, NULL); if (!endpoint) - return -EPROBE_DEFER; /* could be provided by cio2-bridge */ + return dev_err_probe(ov7251->dev, -EPROBE_DEFER, + "waiting for fwnode graph endpoint\n"); ret = v4l2_fwnode_endpoint_alloc_parse(endpoint, &bus_cfg); fwnode_handle_put(endpoint); From patchwork Sat Oct 5 12:15:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 13823261 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EC0614D29B for ; Sat, 5 Oct 2024 12:15:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728130544; cv=none; b=IeMCvg5EUf9b9MXXt8pZB+IXI7fhQ6/Qf1JIbnH8KqOiCeA9vRGnQbpAXfsgN31Ft6PaVOsl4ej5ZLhEka/UrAk9tHlUWMdfOK6Y0hbk35Vl56W+M1jKB1g4xlSvYQJyBXByKwd5NxCs40X7z2VZai3cA4bAUMLRSu8N6YFYxdc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728130544; c=relaxed/simple; bh=QHeY0DgU6pspc693fQ+brZOVlDNysirnRA9d8w5aBBU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XY+N9Zqo0hi8bzzCmB9plWZ9taUj7ZYPOHvLYCVnWB1Te+WV1Djl17UwH56hs2VkflLAg90/Gubx9hX+5we7CN4hxK62RiZFyxoKbD2Yq72QlqHOC0J4zJ6pkxbuYxUYztJ3RSbWNvNKLljO/STbRwogBfs0Hd/9KCbLUwSit9Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GL/TJEcP; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GL/TJEcP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728130542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xVXRb+uEhzo9kXQGOqfkyVC7wOiR5i8jgQD7Bg4jx2k=; b=GL/TJEcP+icAYfLFTEdSMqy8Cf8B+ASU+Cw+bLJ70Dkz7Tx9yOfRLRLbSZ7hXrBZbdxMgT ADcED0j23lVP2G837V/s9UilVyz4ShSbE0ERF9/euhylTB/u6f6H3O0cSC2NxFCRryCYbw 26x4SN3ly/9JCExamC7BeAWF6WONqtk= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-444-r7vCC_CFMHOD_jytsD096Q-1; Sat, 05 Oct 2024 08:15:39 -0400 X-MC-Unique: r7vCC_CFMHOD_jytsD096Q-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 09AD61954B10; Sat, 5 Oct 2024 12:15:38 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.19]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6777E19560A3; Sat, 5 Oct 2024 12:15:36 +0000 (UTC) From: Hans de Goede To: Daniel Scally , Sakari Ailus Cc: Hans de Goede , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 3/4] media: ov8865: Improve error logging when fwnode is not found Date: Sat, 5 Oct 2024 14:15:24 +0200 Message-ID: <20241005121525.32172-3-hdegoede@redhat.com> In-Reply-To: <20241005121525.32172-1-hdegoede@redhat.com> References: <20241005121525.32172-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 The ov8865 driver waits for the endpoint fwnode to show up in case this fwnode is created by a bridge-driver. 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.952061] i2c i2c-INT347A:00: 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 fwnode graph endpoint Signed-off-by: Hans de Goede --- drivers/media/i2c/ov8865.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c index 95ffe7536aa6..a2138f7988aa 100644 --- a/drivers/media/i2c/ov8865.c +++ b/drivers/media/i2c/ov8865.c @@ -2991,7 +2991,8 @@ static int ov8865_probe(struct i2c_client *client) handle = fwnode_graph_get_next_endpoint(dev_fwnode(dev), NULL); if (!handle) - return -EPROBE_DEFER; + return dev_err_probe(dev, -EPROBE_DEFER, + "waiting for fwnode graph endpoint\n"); sensor->endpoint.bus_type = V4L2_MBUS_CSI2_DPHY; From patchwork Sat Oct 5 12:15:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 13823262 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A064F9FE for ; Sat, 5 Oct 2024 12:15:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728130549; cv=none; b=O0h9nkhBYGuzO0ViPhtZI0HlUnl6EOD9x0sLlWgQRaUf2TCdIMYdrLS3DLZNyfTxJg2ErKGW/b0GlbtWYtP7EQcpjcWhCEa572YcJcO2VM+S9toZEoG2c5ldMpKRki4c9Jd9j3S+s8yLzn64bj7p+Z6u3SqrtktUyn88iLr9BO4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728130549; c=relaxed/simple; bh=55xKlebQmAQD9O5DwwakVls8b6FB0PCpWVNge4qv2QA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M5hb8L+mtbWPSENLrgJpWYN5Tt0vekCrjaBfauNkgCZjA/VtBr3NTby0bW44zC2R/gL0w3o3IIqSrmlMhi//btm6Qc8qAFQT1efm1IvmV+jK6ZlNYXJD6xyi9jLzOsbkCBZWRXfXQboeLgZkxN3gboymcskjtbvg9t978I6rOe4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=gdNMJzV8; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gdNMJzV8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728130546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GuSgnSZKSa9itvSE8UBeDCFnA0Ej89e3fgSNkR5Nw20=; b=gdNMJzV8jvYbGDgZTJU+31Xioqt/pbyDEnjxXLcxt7qJXrwa3hCwcId5nuIpor95qqp+da bwDIqcL6v2oEAKFDvxx9qaqMSbDg6zGF20WTtNhAwHimezRPtQolnrC6bRgrggtGheVQJZ RDNnU1kPWE2HWysJHEdRBAnrGD8ySj4= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-594-It8sPO5fMk20X3XQE-AnNw-1; Sat, 05 Oct 2024 08:15:41 -0400 X-MC-Unique: It8sPO5fMk20X3XQE-AnNw-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 39DEB1954B07; Sat, 5 Oct 2024 12:15:40 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.19]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6E4F819560A3; Sat, 5 Oct 2024 12:15:38 +0000 (UTC) From: Hans de Goede To: Daniel Scally , Sakari Ailus Cc: Hans de Goede , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 4/4] media: ipu-bridge: Improve error logging when waiting for IVSC to become ready Date: Sat, 5 Oct 2024 14:15:25 +0200 Message-ID: <20241005121525.32172-4-hdegoede@redhat.com> In-Reply-To: <20241005121525.32172-1-hdegoede@redhat.com> References: <20241005121525.32172-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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 --- 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 e407c69bfcdc..35088601ed20 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -830,7 +830,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)