Linux Media Controller development
 help / color / mirror / Atom feed
From: "Sidharth (Siddhi) Sharma" <wednisegit@gmail.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Bingbu Cao <bingbu.cao@intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	"Sidharth (Siddhi) Sharma" <wednisegit@gmail.com>
Subject: [PATCH] media: staging/ipu7: return 0 for IPC messages that expect no response
Date: Tue, 11 Aug 2026 06:47:18 +0530	[thread overview]
Message-ID: <20260811011718.274510-1-wednisegit@gmail.com> (raw)

ipu_buttress_ipc_send_msg() sends a command to the CSE and waits for the
send_complete completion, which the interrupt handler raises once the CSE
has executed the command. When a message does not ask for a response,
that completion is the whole story: the command went through, and the
caller should be told it succeeded.

The no-response path does the opposite. Right after the command completes
successfully it returns -EIO, turning a good send into an error. The IPU6
driver this code was derived from gets it right, since there the
no-response case simply moves on to the next message. This looks like a
slip made when the bulk loop was collapsed into a single-message helper.

Every caller today passes require_resp = true, so nothing is broken in
practice yet, but the return value is wrong and will trip up the first
no-response command that comes along. Return 0 instead.

Fixes: b7fe4c0019b1 ("media: staging/ipu7: add Intel IPU7 PCI device driver")
Signed-off-by: Sidharth (Siddhi) Sharma <wednisegit@gmail.com>
---
 drivers/staging/media/ipu7/ipu7-buttress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/ipu7/ipu7-buttress.c b/drivers/staging/media/ipu7/ipu7-buttress.c
index 40c6c8473..8b57c7c1a 100644
--- a/drivers/staging/media/ipu7/ipu7-buttress.c
+++ b/drivers/staging/media/ipu7/ipu7-buttress.c
@@ -265,7 +265,7 @@ static int ipu_buttress_ipc_send_msg(struct ipu7_device *isp,
 	}
 
 	if (!msg->require_resp) {
-		ret = -EIO;
+		ret = 0;
 		goto out;
 	}
 
-- 
2.55.0


             reply	other threads:[~2026-08-11  1:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11  1:17 Sidharth (Siddhi) Sharma [this message]
2026-08-11  5:28 ` [PATCH] media: staging/ipu7: return 0 for IPC messages that expect no response Sakari Ailus

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=20260811011718.274510-1-wednisegit@gmail.com \
    --to=wednisegit@gmail.com \
    --cc=bingbu.cao@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --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