bugfix: pci遍历capability list时无法正确访问下一个list的bug

This commit is contained in:
fslongjin 2022-08-27 12:41:42 +08:00
parent 1f30417ec1
commit 3d5fe966d3

View File

@ -525,12 +525,11 @@ int32_t pci_enumerate_capability_list(struct pci_device_structure_header_t *pci_
while (1)
{
tmp = pci_read_config(pci_dev->bus, pci_dev->device, pci_dev->func, cap_offset);
kdebug("tmp & 0xff=%#010lx",tmp & 0xff);
if ((tmp & 0xff) != cap_type)
{
if ((tmp & 0xff00) >> 8)
if (((tmp & 0xff00) >> 8))
{
cap_offset = (tmp & 0xff00);
cap_offset = (tmp & 0xff00)>>8;
continue;
}
else