From 3d5fe966d3980301211ffbee8a2e46082b9862aa Mon Sep 17 00:00:00 2001 From: fslongjin Date: Sat, 27 Aug 2022 12:41:42 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20pci=E9=81=8D=E5=8E=86capability=20lis?= =?UTF-8?q?t=E6=97=B6=E6=97=A0=E6=B3=95=E6=AD=A3=E7=A1=AE=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E4=B8=8B=E4=B8=80=E4=B8=AAlist=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/driver/pci/pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/driver/pci/pci.c b/kernel/driver/pci/pci.c index e2ca3644..a1538493 100644 --- a/kernel/driver/pci/pci.c +++ b/kernel/driver/pci/pci.c @@ -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