lkml.org 
[lkml]   [2021]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] cxl/mem: Demarcate vendor specific capability IDs
Date
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 <ben.widawsky@intel.com>
---
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;
}
}
--
2.31.1
\
 
 \ /
  Last update: 2021-04-16 01:29    [W:1.054 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site