Received: from linuxtv.org (140-211-166-241-openstack.osuosl.org [140.211.166.241]) (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 D4FA61BC40 for ; Sat, 15 Jun 2024 09:28:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.211.166.241 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718443727; cv=none; b=sbPQB8vvocCOuiCk7PIRQnef4piepFftnbbg8pKAMioyabB3T15QvyLIoKlXsr1vXU42xvzY/QdLPfyoxvVk2Qk8/9ikvolQo3hp97ivy/CZ/r9nkoLOzL2GkjwJc5fG++LfA85zcL/YF/rhrLeC5I+Kcoc9UL/thev50tkJ0JY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718443727; c=relaxed/simple; bh=8CPTRfwOlWiu0qHx6YL6s//GG92U8jfjJpL+SppXr3E=; h=From:Date:Subject:To:Cc:Message-Id; b=K1qyJ5dD0vUfdasL0lxtpktZMqNiR1cEZKYRkE8/GeLtWBeh0x9OHBVn1m+DIZD0+gvI5FVCa+ibBbJ04DtuPqeoI/zmj73zjin2qA9ap1RJAL1wHpgEbDGxzO6rO5j+zaDVpIb1EuDFjaehLRGddIj17+zEStwLrJq4FmSanb4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=xs4all.nl; spf=pass smtp.mailfrom=linuxtv.org; arc=none smtp.client-ip=140.211.166.241 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=xs4all.nl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxtv.org Received: from hverkuil by linuxtv.org with local (Exim 4.96) (envelope-from ) id 1sIPYX-0005lX-1s; Sat, 15 Jun 2024 09:18:41 +0000 From: Hans Verkuil Date: Sat, 15 Jun 2024 09:16:39 +0000 Subject: [git:media_stage/master] media: ivsc: csi: don't count privacy on as error To: linuxtv-commits@linuxtv.org Cc: stable@vger.kernel.org, Sakari Ailus , Wentong Wu , Jason Chen Mail-followup-to: linux-media@vger.kernel.org Forward-to: linux-media@vger.kernel.org Reply-to: linux-media@vger.kernel.org Message-Id: Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: This is an automatic generated email to let you know that the following patch were queued: Subject: media: ivsc: csi: don't count privacy on as error Author: Wentong Wu Date: Fri Jun 7 21:25:45 2024 +0800 Prior to the ongoing command privacy is on, it would return -1 to indicate the current privacy status, and the ongoing command would be well executed by firmware as well, so this is not error. This patch changes its behavior to notify privacy on directly by V4L2 privacy control instead of reporting error. Fixes: 29006e196a56 ("media: pci: intel: ivsc: Add CSI submodule") Cc: stable@vger.kernel.org # for 6.6 and later Reported-by: Hao Yao Signed-off-by: Wentong Wu Tested-by: Jason Chen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil drivers/media/pci/intel/ivsc/mei_csi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- diff --git a/drivers/media/pci/intel/ivsc/mei_csi.c b/drivers/media/pci/intel/ivsc/mei_csi.c index c6d8f72e4eec..16791a7f4f15 100644 --- a/drivers/media/pci/intel/ivsc/mei_csi.c +++ b/drivers/media/pci/intel/ivsc/mei_csi.c @@ -192,7 +192,11 @@ static int mei_csi_send(struct mei_csi *csi, u8 *buf, size_t len) /* command response status */ ret = csi->cmd_response.status; - if (ret) { + if (ret == -1) { + /* notify privacy on instead of reporting error */ + ret = 0; + v4l2_ctrl_s_ctrl(csi->privacy_ctrl, 1); + } else if (ret) { ret = -EINVAL; goto out; }