From patchwork Tue Jan 24 05:31:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Previn X-Patchwork-Id: 13113465 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13926C54EB4 for ; Tue, 24 Jan 2023 05:32:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2EEDF10E602; Tue, 24 Jan 2023 05:32:13 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id CCAC410E5F0; Tue, 24 Jan 2023 05:31:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674538314; x=1706074314; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BC1VPP22Mlmcs01JtmOQ0m+HiBeirYHITAo7/MqCqyY=; b=eoVwKShU28HzNCwWBfiKu0t++LhRzVLZq+vUZPVbgGF192UcQltKghtC MkKENla6bxSXK6NT1IkAoiU4TojXmoyXWAa49z+vRWqap6H1sU78dt7Lx nDrH4b5DpnOc6mihk5eWPSbdxwSUCXxOU8QbS5TquPBhqrCoHMa/2kCC1 nOsATgiL0StuwGN//vbqbkVoyRsNIE1iseI6PXoJ39w48Xjnqn6lz+70v Hq4iOubE+04m7V/wLgBqpUDDFkXsRSM4A+2s3g5dc1QAPT51f43ONUPVy N7+1ZhvQQz51bRDEKfC5GmzLBt6bRZg85OXG26oTxH5PWvMhfmJxh/wsf g==; X-IronPort-AV: E=McAfee;i="6500,9779,10599"; a="324906435" X-IronPort-AV: E=Sophos;i="5.97,241,1669104000"; d="scan'208";a="324906435" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2023 21:31:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10599"; a="611921455" X-IronPort-AV: E=Sophos;i="5.97,241,1669104000"; d="scan'208";a="611921455" Received: from aalteres-desk.fm.intel.com ([10.80.57.53]) by orsmga003.jf.intel.com with ESMTP; 23 Jan 2023 21:31:53 -0800 From: Alan Previn To: intel-gfx@lists.freedesktop.org Date: Mon, 23 Jan 2023 21:31:47 -0800 Message-Id: <20230124053150.3543928-4-alan.previn.teres.alexis@intel.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230124053150.3543928-1-alan.previn.teres.alexis@intel.com> References: <20230124053150.3543928-1-alan.previn.teres.alexis@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v6 3/6] mei: clean pending read with vtag on bus X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alan Previn , Vivi@freedesktop.org, Greg Kroah-Hartman , Rodrigo , Alexander Usyskin , dri-devel@lists.freedesktop.org, Tomas Winkler Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Alexander Usyskin Client on bus have only one vtag map slot and should disregard the vtag value when cleaning pending read flag. Fixes read flow control message unexpectedly generated when clent on bus send messages with different vtags. Signed-off-by: Alexander Usyskin Reviewed-by: Tomas Winkler --- drivers/misc/mei/client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 9ddb854b8155..5c19097266fe 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -1343,7 +1343,9 @@ static void mei_cl_reset_read_by_vtag(const struct mei_cl *cl, u8 vtag) struct mei_cl_vtag *vtag_l; list_for_each_entry(vtag_l, &cl->vtag_map, list) { - if (vtag_l->vtag == vtag) { + /* The client on bus has one fixed vtag map */ + if ((cl->cldev && mei_cldev_enabled(cl->cldev)) || + vtag_l->vtag == vtag) { vtag_l->pending_read = false; break; }