From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17695EB64D9 for ; Thu, 15 Jun 2023 11:42:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344378AbjFOLmh (ORCPT ); Thu, 15 Jun 2023 07:42:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344241AbjFOLls (ORCPT ); Thu, 15 Jun 2023 07:41:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF4FB4209; Thu, 15 Jun 2023 04:39:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C09916391A; Thu, 15 Jun 2023 11:39:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95763C433C8; Thu, 15 Jun 2023 11:39:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686829172; bh=6ZdsxUTZElnUIX2In0sqe3VToJpb/0owUcP8EWfTa2U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kbRrkEUcOLx7IHcVy0KsUxHqaRUeujumPJq+qYi7mCb6OX99nuN4nC6g0AUfwe+Ji VJGSIRK3PkTySi9P5wzTCGbb9TIW5P0OLF9FPRNZq5JzOAFu6N2iTfQY6ZW6yC7Wj7 2iweZ0rsRR6OUvUpK6F8xNxTi2JHI/QIXdyifxtn8Q0P2h2DJDfIbSWWQgdvyfye/j tKcAhxwKW4HL4wbsIzR7Z93YgZo2i9liSpWLjbR4pDMEjqSQTnX35qW4bfVItpJk7E Zi/4F1E3BHuJGRHOtoVC2npJEpOf1OPWpBUU9TKg3fhLT5mErbQJY4Dj5ViIcL7aRJ 9aM1Zra5Y7LDw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 5.10 6/9] media: cec: core: don't set last_initiator if tx in progress Date: Thu, 15 Jun 2023 07:39:14 -0400 Message-Id: <20230615113917.649505-6-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230615113917.649505-1-sashal@kernel.org> References: <20230615113917.649505-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.10.184 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans Verkuil [ Upstream commit 73af6c7511038249cad3d5f3b44bf8d78ac0f499 ] When a message was received the last_initiator is set to 0xff. This will force the signal free time for the next transmit to that for a new initiator. However, if a new transmit is already in progress, then don't set last_initiator, since that's the initiator of the current transmit. Overwriting this would cause the signal free time of a following transmit to be that of the new initiator instead of a next transmit. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/cec/core/cec-adap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/cec/core/cec-adap.c b/drivers/media/cec/core/cec-adap.c index e23aa608f66f6..97b479223fe52 100644 --- a/drivers/media/cec/core/cec-adap.c +++ b/drivers/media/cec/core/cec-adap.c @@ -1085,7 +1085,8 @@ void cec_received_msg_ts(struct cec_adapter *adap, mutex_lock(&adap->lock); dprintk(2, "%s: %*ph\n", __func__, msg->len, msg->msg); - adap->last_initiator = 0xff; + if (!adap->transmit_in_progress) + adap->last_initiator = 0xff; /* Check if this message was for us (directed or broadcast). */ if (!cec_msg_is_broadcast(msg)) -- 2.39.2