From patchwork Wed Dec 21 23:06:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Teres Alexis, Alan Previn" X-Patchwork-Id: 13079291 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 9242FC4332F for ; Wed, 21 Dec 2022 23:04:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7D55D10E14B; Wed, 21 Dec 2022 23:03:46 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id E220B10E135; Wed, 21 Dec 2022 23:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671663820; x=1703199820; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dihkVAdrcYCS+uehz9anhQl84xJdTATy6LvWhxUMWQY=; b=jH2AY/6gLC5UhmouZMm8ENAJnFsKYOVT8YS/4OpMHcKTUneYizjs9GzP wHRz0QnDfRx+ouQMkTTW71tEmxGYq2XtgHgSn2iHZmEY74cixjMm5/XiG WrbDpzHcPnC3rXXS+h8DRSINZvkiBG8mWF0kBcOGaHaKnFWfqirbQO8PQ m7BYfRRqJ3YZmAsMuvStZpwL8uTKLoem0dpLCjGRS/54EKksicnv22nOx IG+uorI0HBs7f1shGNLSrxOoiINuSjeYktA2oddm8G5+PwGy8hHWe3dEb 3Bp65JhmQ3EnVYXEZuZmb9heSIxZGe+aFsfQqJM89Ru9Pj3wcxeNSBpo0 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10568"; a="321905530" X-IronPort-AV: E=Sophos;i="5.96,263,1665471600"; d="scan'208";a="321905530" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2022 15:03:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10568"; a="793864422" X-IronPort-AV: E=Sophos;i="5.96,263,1665471600"; d="scan'208";a="793864422" Received: from aalteres-desk.fm.intel.com ([10.80.57.53]) by fmsmga001.fm.intel.com with ESMTP; 21 Dec 2022 15:03:40 -0800 From: Alan Previn To: intel-gfx@lists.freedesktop.org Subject: [PATCH v3 3/7] mei: clean pending read with vtag on bus Date: Wed, 21 Dec 2022 15:06:24 -0800 Message-Id: <20221221230628.2715916-4-alan.previn.teres.alexis@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221221230628.2715916-1-alan.previn.teres.alexis@intel.com> References: <20221221230628.2715916-1-alan.previn.teres.alexis@intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - 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, Daniele Ceraolo Spurio , Juston Li , Tomas Winkler Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- 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; }