diff options
author | Dan Williams <dan.j.williams@intel.com> | 2023-04-03 15:13:37 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2023-04-04 15:34:34 -0700 |
commit | 52cc48ad2a76a5fe82d239044d67944bbb928de6 (patch) | |
tree | c7c925152ca0ccad9682a25ad07bf973bc91df20 /drivers/net/ethernet/synopsys/Makefile | |
parent | 9ff3eec958cf365857ae8a630237ece4f83bb337 (diff) |
cxl/hdm: Limit emulation to the number of range registers
Recall that range register emulation seeks to treat the 2 potential
range registers as Linux CXL "decoder" objects. The number of range
registers can be 1 or 2, while HDM decoder ranges can include more than
2.
Be careful not to confuse DVSEC range count with HDM capability decoder
count. Commit to range register earlier in devm_cxl_setup_hdm().
Otherwise, a device with more HDM decoders than range registers can set
@cxlhdm->decoder_count to an invalid value.
Avoid introducing a forward declaration by just moving the definition of
should_emulate_decoders() earlier in the file. should_emulate_decoders()
is unchanged.
Tested-by: Dave Jiang <dave.jiang@intel.com>
Fixes: d7a2153762c7 ("cxl/hdm: Add emulation when HDM decoders are not committed")
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/168012574932.221280.15944705098679646436.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/net/ethernet/synopsys/Makefile')
0 files changed, 0 insertions, 0 deletions