Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp608711imp; Wed, 20 Feb 2019 06:03:49 -0800 (PST) X-Google-Smtp-Source: AHgI3IZvwkOl12B6g7PJB4YtiniG1a8kySi2afc9mySPwcKXm2JPUrunjqQIWSijCRnm3YvB3z3e X-Received: by 2002:a17:902:9008:: with SMTP id a8mr37045958plp.38.1550671429561; Wed, 20 Feb 2019 06:03:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550671429; cv=none; d=google.com; s=arc-20160816; b=ylepdAdech38c7tgdqbTe9TQszNfzcOad4fpvbjP0XQ5n1DVWkvoSeqiNciMz6PIIs i6eOsD08+B/aBTP93gFL+5BC5OXBLm/KGaxRnAa/NJnStqJtB80h8Ws9uAmc03P6C6zW 0+LYiYiDqIwzlWMrZzfQMK8cJypO91fWZek9urMWGY8uakz2DWQdrozwaJyvrG2XbwYb FmOBvuFeQTTSLi2JmnwoEquWKddMA4YKNLol21v2qy5y9EX6E0UETbEvYGFADwvd+Rys Ripf0yP6z+jvEMFydKwwIKnavQI7JVNhr9L/3r/MeJPm7FuU7JE1WDpSTQKvoz1DMj+4 CBVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=9gl83vd7ne7JIiPIAOhlHAN/W1p1m1onDU3LrXAjmx8=; b=pOOGE+Ijl0Xr5gQ4wXKZ/M1k0uiM1lL32Tf7IqnLBivxnqfsyZr7ktTCWbCj9Jeyr5 WRKuSdl+CyS8Bt6F+UdHuNUqW5RB2Ei/j5Lpmhgsuuta4rBWytM81wOxZqC/5qKO0ZJO fb/4igM5rzSwC3RsiO0anuiwTXdVaVPItqxwpM9Mn9S2dkWdfuYYWqLOvpxn4PhMMGQA G2qRAmCv8tSe5UylL6MaX8H+PlTm5+Nb9CuA1NVr9cQpqloATWvKaj9sVxyDEzWxXoY4 dsGYyYQhhqwCAd8v54mN22OZyWOzxDkcfwLcTbMGIJjtPmZ2rEkmwu3oD1gICpcrxBBD KFPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si19938229pli.417.2019.02.20.06.03.32; Wed, 20 Feb 2019 06:03:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726527AbfBTODC (ORCPT + 99 others); Wed, 20 Feb 2019 09:03:02 -0500 Received: from mga05.intel.com ([192.55.52.43]:28917 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726219AbfBTODB (ORCPT ); Wed, 20 Feb 2019 09:03:01 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2019 06:03:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,391,1544515200"; d="scan'208";a="321900369" Received: from twinkler-lnx.jer.intel.com ([10.12.91.48]) by fmsmga005.fm.intel.com with ESMTP; 20 Feb 2019 06:02:59 -0800 From: Tomas Winkler To: Greg Kroah-Hartman Cc: Alexander Usyskin , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Tomas Winkler Subject: [char-misc] mei: hbm: clean the feature flags on link reset Date: Wed, 20 Feb 2019 16:55:37 +0200 Message-Id: <20190220145537.361-1-tomas.winkler@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Usyskin The list of supported functions can be altered upon link reset, clean the flags to allow correct selections of supported features. Cc: v4.19+ Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler --- drivers/misc/mei/hbm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c index 8f7616557c97..e6207f614816 100644 --- a/drivers/misc/mei/hbm.c +++ b/drivers/misc/mei/hbm.c @@ -1029,29 +1029,36 @@ static void mei_hbm_config_features(struct mei_device *dev) dev->version.minor_version >= HBM_MINOR_VERSION_PGI) dev->hbm_f_pg_supported = 1; + dev->hbm_f_dc_supported = 0; if (dev->version.major_version >= HBM_MAJOR_VERSION_DC) dev->hbm_f_dc_supported = 1; + dev->hbm_f_ie_supported = 0; if (dev->version.major_version >= HBM_MAJOR_VERSION_IE) dev->hbm_f_ie_supported = 1; /* disconnect on connect timeout instead of link reset */ + dev->hbm_f_dot_supported = 0; if (dev->version.major_version >= HBM_MAJOR_VERSION_DOT) dev->hbm_f_dot_supported = 1; /* Notification Event Support */ + dev->hbm_f_ev_supported = 0; if (dev->version.major_version >= HBM_MAJOR_VERSION_EV) dev->hbm_f_ev_supported = 1; /* Fixed Address Client Support */ + dev->hbm_f_fa_supported = 0; if (dev->version.major_version >= HBM_MAJOR_VERSION_FA) dev->hbm_f_fa_supported = 1; /* OS ver message Support */ + dev->hbm_f_os_supported = 0; if (dev->version.major_version >= HBM_MAJOR_VERSION_OS) dev->hbm_f_os_supported = 1; /* DMA Ring Support */ + dev->hbm_f_dr_supported = 0; if (dev->version.major_version > HBM_MAJOR_VERSION_DR || (dev->version.major_version == HBM_MAJOR_VERSION_DR && dev->version.minor_version >= HBM_MINOR_VERSION_DR)) -- 2.20.1