mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 07:06:47 +00:00
bugfix: pci遍历capability list时无法正确访问下一个list的bug
This commit is contained in:
parent
1f30417ec1
commit
3d5fe966d3
@ -525,12 +525,11 @@ int32_t pci_enumerate_capability_list(struct pci_device_structure_header_t *pci_
|
|||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
tmp = pci_read_config(pci_dev->bus, pci_dev->device, pci_dev->func, cap_offset);
|
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 & 0xff) != cap_type)
|
||||||
{
|
{
|
||||||
if ((tmp & 0xff00) >> 8)
|
if (((tmp & 0xff00) >> 8))
|
||||||
{
|
{
|
||||||
cap_offset = (tmp & 0xff00);
|
cap_offset = (tmp & 0xff00)>>8;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user