From patchwork Thu Apr 15 23:27:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 12206319 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77742C433B4 for ; Thu, 15 Apr 2021 23:27:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2F4FA61153 for ; Thu, 15 Apr 2021 23:27:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237181AbhDOX2Q (ORCPT ); Thu, 15 Apr 2021 19:28:16 -0400 Received: from mga07.intel.com ([134.134.136.100]:63017 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236110AbhDOX2Q (ORCPT ); Thu, 15 Apr 2021 19:28:16 -0400 IronPort-SDR: e9RuKekVJzq/1/HPCBcamLsPb6oiFwLNqMBxsi2DAahuqo5hm+o+Qb85AvJZJdorMtB0DvhEaC eUwJsSgCedfg== X-IronPort-AV: E=McAfee;i="6200,9189,9955"; a="258921729" X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="258921729" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2021 16:27:52 -0700 IronPort-SDR: O+onytXJdxoOEut7qKpviMqTHCGxcMAqXTitO+jqIckvLpLWMqG54fmDwZOdqAJAS/+96ZK4UU 8XGdvONCaumw== X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="461789830" Received: from oamoninu-mobl1.amr.corp.intel.com (HELO bwidawsk-mobl5.local) ([10.252.130.91]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2021 16:27:51 -0700 From: Ben Widawsky To: linux-cxl@vger.kernel.org Cc: Ben Widawsky , linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, ira.weiny@intel.com, vishal.l.verma@intel.com, alison.schofield@intel.com, dan.j.williams@intel.com, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] cxl/mem: Demarcate vendor specific capability IDs Date: Thu, 15 Apr 2021 16:27:50 -0700 Message-Id: <20210415232750.604112-1-ben.widawsky@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415232610.603273-3-ben.widawsky@intel.com> References: <20210415232610.603273-3-ben.widawsky@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org Vendor capabilities occupy 0x8000 to 0xFFFF according to CXL 2.0 spec 8.2.8.2.1 CXL Device Capabilities. While they are not defined by the spec, they are allowed and not "unknown". Call this detail out in the logs to let users easily distinguish the difference. v2: Should be greater than or equal to (Ben) Fixes: 8adaf747c9f0b ("cxl/mem: Find device capabilities") Signed-off-by: Ben Widawsky --- drivers/cxl/mem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c index c05617b0ba4b..28c7c29567b3 100644 --- a/drivers/cxl/mem.c +++ b/drivers/cxl/mem.c @@ -939,7 +939,10 @@ static int cxl_mem_setup_regs(struct cxl_mem *cxlm) cxlm->memdev_regs = register_block; break; default: - dev_dbg(dev, "Unknown cap ID: %x (0x%x)\n", cap_id, offset); + if (cap_id >= 0x8000) + dev_dbg(dev, "Vendor cap ID: %x (0x%x)\n", cap_id, offset); + else + dev_dbg(dev, "Unknown cap ID: %x (0x%x)\n", cap_id, offset); break; } }