Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2828235pxb; Tue, 9 Mar 2021 11:54:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5narN/sklNGoG6N7VKPIfh8rr0EaUPfbSdldHCnVKp4FvJCHKagvWFOTw6pNlHhGkqgK9 X-Received: by 2002:a17:906:1746:: with SMTP id d6mr22787805eje.36.1615319698781; Tue, 09 Mar 2021 11:54:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615319698; cv=none; d=google.com; s=arc-20160816; b=MaQ2e9+qPR2r6dQ5HrHQ0xFIUcciNiEr4ZOm33bOvxO29Zkb3SPPXxo6ns5PrLHa6S QhsadpmxUKsMtGBTj1FmAjYdjuZBMtEaBBUXa92BqTYWBCK+ZJGd9+edqXHQLr/uG5hB 8Wf38m/dwLoK1bCiA3JA4uivhmDZTdq7QmeH1eq6cpZousMUQm8BaPQ95as7TugJnrEG yWLPBoPlV5Lh45YnZoUoX3TCFpMNiwGOR6ezpBMDCzFRoPuaBOn/r0MnoSoQOJs7n0aF m37NuGhp3wB3mT5BFZdRtXOKJ8Ef/IxdWoZwaW+KWw19aZFMGOfBJ95N9C93p56jbotq LXDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=+NdBOfiyiGaguI3bCwmnxwPMUVvJZNcMRjRISzs4tng=; b=vY/+4120s9Fr02aJMXcXTEtWUe8/HdUOSTaz1pUcBfOSZIqQIKLdjge6MEz+5PrC2f LDhM6qDktanytfqODw/7SeAQPTcEz6pgcL+DGvm4oU+bng99mdsYbvqT+0nJiNrcUdjy 5G00JrTAKTxhAIIsB8z4Y3nNgzKI81WylhTKfK6kLwhABcgaKUCwQNIeQpeZuY3gv5zL MT18hSquEvmakAJXRYKvJdRn2fNW1cFoWQ3DvDYZ+sDYcqkP885H9XnTsoilSlg7zyYc 7awxKH7KrMQr88nmknFZ8TbLWb1mgzFV3hrMrz5xSFhdsEkCqIQ2EP6a6QWOdGDpY+iT IZXQ== 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 c11si2143921edw.146.2021.03.09.11.54.35; Tue, 09 Mar 2021 11:54:58 -0800 (PST) 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 S231467AbhCITxa (ORCPT + 99 others); Tue, 9 Mar 2021 14:53:30 -0500 Received: from mga04.intel.com ([192.55.52.120]:27908 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231226AbhCITxT (ORCPT ); Tue, 9 Mar 2021 14:53:19 -0500 IronPort-SDR: O7fZc3WAGbR1aLmHX5Yd0VT4LoZESm+hqQ+DetHZqtt2T0L3VgzZQ/LGUSorKZIvVYLOToLVrH VeqToUAkutqg== X-IronPort-AV: E=McAfee;i="6000,8403,9917"; a="185930765" X-IronPort-AV: E=Sophos;i="5.81,236,1610438400"; d="scan'208";a="185930765" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2021 11:53:15 -0800 IronPort-SDR: 99KnkdsPI3XGfCvZxQLKpQPf4ENJOvLLejFEbLjPQVr5NDnZyom0YTZ8WLbN6rPHP26dlmHEDs UtHc903WTmAw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,236,1610438400"; d="scan'208";a="588560712" Received: from linux.intel.com ([10.54.29.200]) by orsmga005.jf.intel.com with ESMTP; 09 Mar 2021 11:53:14 -0800 Received: from debox1-desk2.jf.intel.com (debox1-desk2.jf.intel.com [10.54.75.16]) by linux.intel.com (Postfix) with ESMTP id 57E3858088F; Tue, 9 Mar 2021 11:53:14 -0800 (PST) From: "David E. Box" To: lee.jones@linaro.org, hdegoede@redhat.com, mgross@linux.intel.com Cc: "David E. Box" , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH V3 1/2] MFD: intel_pmt: Fix nuisance messages and handling of disabled capabilities Date: Tue, 9 Mar 2021 11:52:33 -0800 Message-Id: <20210309195234.2400678-1-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210309181309.GU4931@dell> References: <20210309181309.GU4931@dell> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some products will be available that have PMT capabilities that are not supported. Remove the warnings in this instance to avoid nuisance messages and confusion. Also return an error code for capabilities that are disabled by quirk to prevent them from keeping the driver loaded if only disabled capabilities are found. Fixes: 4f8217d5b0ca ("mfd: Intel Platform Monitoring Technology support") Signed-off-by: David E. Box Reviewed-by: Hans de Goede --- No change from V2 drivers/mfd/intel_pmt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/mfd/intel_pmt.c b/drivers/mfd/intel_pmt.c index 744b230cdcca..65da2b17a204 100644 --- a/drivers/mfd/intel_pmt.c +++ b/drivers/mfd/intel_pmt.c @@ -79,19 +79,18 @@ static int pmt_add_dev(struct pci_dev *pdev, struct intel_dvsec_header *header, case DVSEC_INTEL_ID_WATCHER: if (quirks & PMT_QUIRK_NO_WATCHER) { dev_info(dev, "Watcher not supported\n"); - return 0; + return -EINVAL; } name = "pmt_watcher"; break; case DVSEC_INTEL_ID_CRASHLOG: if (quirks & PMT_QUIRK_NO_CRASHLOG) { dev_info(dev, "Crashlog not supported\n"); - return 0; + return -EINVAL; } name = "pmt_crashlog"; break; default: - dev_err(dev, "Unrecognized PMT capability: %d\n", id); return -EINVAL; } @@ -174,12 +173,8 @@ static int pmt_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) header.offset = INTEL_DVSEC_TABLE_OFFSET(table); ret = pmt_add_dev(pdev, &header, quirks); - if (ret) { - dev_warn(&pdev->dev, - "Failed to add device for DVSEC id %d\n", - header.id); + if (ret) continue; - } found_devices = true; } while (true); base-commit: a38fd8748464831584a19438cbb3082b5a2dab15 -- 2.25.1