]> www.infradead.org Git - linux.git/commit
cxl/pci: Check Mem_info_valid bit for each applicable DVSEC
authorYanfei Xu <yanfei.xu@intel.com>
Wed, 28 Aug 2024 08:42:30 +0000 (16:42 +0800)
committerDave Jiang <dave.jiang@intel.com>
Mon, 9 Sep 2024 18:33:44 +0000 (11:33 -0700)
commit99bf0eebc75c9085440d6dca014724e7e49b5116
tree1a72d3e3899d682dc38bad0ba2d223e62b06cd5a
parent5c6e3d5a5da118be2ae074bd70d111994147c708
cxl/pci: Check Mem_info_valid bit for each applicable DVSEC

In theory a device might set the mem_info_valid bit for a first range
after it is ready but before as second range has reached that state.
Therefore, the correct approach is to check the Mem_info_valid bit for
each applicable DVSEC range against HDM_COUNT, rather than only for the
DVSEC range 1. Consequently, let's move the check into the "for loop"
that handles each DVSEC range.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Yanfei Xu <yanfei.xu@intel.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20240828084231.1378789-4-yanfei.xu@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/pci.c