Skip to content

Commit

Permalink
cxl/pci: Rename CXL REGLOC ID
Browse files Browse the repository at this point in the history
The current naming is confusing and wrong. The Register Locator is
identified by the DSVSEC identifier, not an offset.

Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
Link: https://lore.kernel.org/r/20210618003009.956929-1-ben.widawsky@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Ben Widawsky authored and Dan Williams committed Jun 18, 2021
1 parent 3e23d17 commit 4ad6181
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/cxl/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ static int cxl_mem_setup_regs(struct cxl_mem *cxlm)
LIST_HEAD(register_maps);
int ret = 0;

regloc = cxl_mem_dvsec(pdev, PCI_DVSEC_ID_CXL_REGLOC_OFFSET);
regloc = cxl_mem_dvsec(pdev, PCI_DVSEC_ID_CXL_REGLOC_DVSEC_ID);
if (!regloc) {
dev_err(dev, "register location dvsec not found\n");
return -ENXIO;
Expand Down
2 changes: 1 addition & 1 deletion drivers/cxl/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define PCI_DVSEC_VENDOR_ID_CXL 0x1E98
#define PCI_DVSEC_ID_CXL 0x0

#define PCI_DVSEC_ID_CXL_REGLOC_OFFSET 0x8
#define PCI_DVSEC_ID_CXL_REGLOC_DVSEC_ID 0x8
#define PCI_DVSEC_ID_CXL_REGLOC_BLOCK1_OFFSET 0xC

/* BAR Indicator Register (BIR) */
Expand Down

0 comments on commit 4ad6181

Please sign in to comment.