]> mj.ucw.cz Git - pciutils.git/commit
Constants for CXL capability should not change
authorMartin Mares <mj@ucw.cz>
Fri, 29 Dec 2023 14:16:03 +0000 (15:16 +0100)
committerMartin Mares <mj@ucw.cz>
Fri, 29 Dec 2023 14:16:03 +0000 (15:16 +0100)
commit944bb1df9fc9f4280f2c9c8e87b5954e8e700c2c
treed4cc42821158fd6793d745ac7455787790c8dcca
parent93c1c6bcc9e2b52652b859986354ddd54ef34058
Constants for CXL capability should not change

When CXL capability decoding was upgraded to revision 2 by commit
c0ccce1b4cd5b42b17f2e8f7bae4031c311677ff, the value of PCI_CXL_DEV_LEN
in lib/header.h has changed.

This is probably not a good idea - programs using libpci can depend
on the exact value of this constant.

Let us revert PCI_CXL_DEV_LEN to the original value for revision 1
and add PCI_CXL_DEV_LEN_REV2 for the next revision.

Also, fixed a bug in the decoder which caused it to read past the
end of the buffer for a capability which is declared as revision 2,
but too short.
lib/header.h
ls-ecaps.c