Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1000774ybt; Fri, 19 Jun 2020 21:10:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxP4ihI9ufHQ22hizEL091DpJ8E6k3VEQP/L+lwsn9GJaTVbKEAOmeR3V/2mqZK8opjr+4e X-Received: by 2002:a17:906:7e5a:: with SMTP id z26mr6744387ejr.263.1592626231587; Fri, 19 Jun 2020 21:10:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592626231; cv=none; d=google.com; s=arc-20160816; b=HqFV8hSrEvsHByJLKQLbbRTOhM0hVSHKydBa/PWPdiBDnpUXf4rCI+zfCzuDClZHaD K/ScFIHszRoLTPniGffOe6PWHMO+MBvnxcuIJLj4G84u2LYpZX0ONrmgL76nujgrq4xl v31d0qcd12W2FBIURqKkDNezZNyT08UUNJ17AlsdCy6RQsNVor+3g3v/2Y1vX0jzX4hc S2GFOBbcQ0/rdTx9j8t2k4qzBhwS8EtdygLvYpa70DVxMKqKrnDf9hVL5/H5IUhQ9PfR 9byE6n9NqtTreJ74hrXsqrgzVSikSY2QV3BLCvcwusp3bv4ZFBLY8RTr0Y8hAcxnhxOy xySA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=wPq8YLHnNU7DDGEWplJLRckCyD5ZVV7RWgSkYH03Yag=; b=EJmRPgaaOj9B8OUHwqr8MDurpQugsMp9k4tdzgDkzIUI7ZiIPFTOLsQklSTLx2BdPD xRzd9QgaNB+c4hkUyAQGE0Cvm97ePuJL7lO5yEatTiMhK12gBGm92w7f15sXBpHXmPyG 9XNWZZzHm7iizXGFx2K6iT2Ie/C6R6B8xCQL4QvYpWqLpoAqkz3RWAoAuoy7FTYunvnY KXWxMVexgoQ8c16Sy7dtaGkg2YOQKHrYNh249z/TF4dxCNDe83p7T6zxVs2hsM5hQ6v2 EsjM8lScRifiCBFYvh4yzeWL3kXBLhXxE/VQ8eUcjmjcmopPry7ZRsZ5h22wV9g/qmIA HEUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id f6si5648980edv.356.2020.06.19.21.10.07; Fri, 19 Jun 2020 21:10:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2405912AbgFSQvh (ORCPT + 99 others); Fri, 19 Jun 2020 12:51:37 -0400 Received: from mga18.intel.com ([134.134.136.126]:45043 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405898AbgFSQvb (ORCPT ); Fri, 19 Jun 2020 12:51:31 -0400 IronPort-SDR: YU1kQpY5+mDFCcNuuTCldN1RDemrRIQBdPg7J/jsEJsMho1a9jFQBK9iFIjopXeFpDCdKwnlHY kbj2JIT+ml7A== X-IronPort-AV: E=McAfee;i="6000,8403,9657"; a="130381944" X-IronPort-AV: E=Sophos;i="5.75,256,1589266800"; d="scan'208";a="130381944" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2020 09:51:31 -0700 IronPort-SDR: e919SKyENYxgRQllorO3cVkJQ+ppxOIFTxBy+M6GkFGSjleXR+Z7YqWi+7lv+SuGlZ9f5I8er7 M1nmbeBYOkHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,256,1589266800"; d="scan'208";a="318165145" Received: from twinkler-lnx.jer.intel.com ([10.12.91.138]) by FMSMGA003.fm.intel.com with ESMTP; 19 Jun 2020 09:51:29 -0700 From: Tomas Winkler To: Greg Kroah-Hartman Cc: Alexander Usyskin , linux-kernel@vger.kernel.org, Tomas Winkler Subject: [char-misc-next 4/7] mei: me: add kdoc for mei_me_fw_type_nm() Date: Fri, 19 Jun 2020 19:51:18 +0300 Message-Id: <20200619165121.2145330-4-tomas.winkler@intel.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200619165121.2145330-1-tomas.winkler@intel.com> References: <20200619165121.2145330-1-tomas.winkler@intel.com> 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 Add kdoc for mei_me_fw_type_nm() function. Signed-off-by: Tomas Winkler --- drivers/misc/mei/hw-me.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c index 6aa522c0d910..e476995e4c56 100644 --- a/drivers/misc/mei/hw-me.c +++ b/drivers/misc/mei/hw-me.c @@ -1353,11 +1353,24 @@ static const struct mei_hw_ops mei_me_hw_ops = { .read = mei_me_read_slots }; +/** + * mei_me_fw_type_nm() - check for nm sku + * + * Read ME FW Status register to check for the Node Manager (NM) Firmware. + * The NM FW is only signaled in PCI function 0. + * __Note__: Deprecated by PCH8 and newer. + * + * @pdev: pci device + * + * Return: true in case of NM firmware + */ static bool mei_me_fw_type_nm(const struct pci_dev *pdev) { u32 reg; + unsigned int devfn; - pci_read_config_dword(pdev, PCI_CFG_HFS_2, ®); + devfn = PCI_DEVFN(PCI_SLOT(pdev->devfn), 0); + pci_bus_read_config_dword(pdev->bus, devfn, PCI_CFG_HFS_2, ®); trace_mei_pci_cfg_read(&pdev->dev, "PCI_CFG_HFS_2", PCI_CFG_HFS_2, reg); /* make sure that bit 9 (NM) is up and bit 10 (DM) is down */ return (reg & 0x600) == 0x200; -- 2.25.4