From 9ed3eb2ae2ece2e85dda8b33710accad2bdac48d Mon Sep 17 00:00:00 2001 From: fslongjin Date: Sun, 17 Jul 2022 16:53:00 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8Dpci=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E8=AE=BE=E5=A4=87=E7=BB=93=E6=9E=84=E4=BD=93=E6=97=B6?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/driver/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/driver/pci/pci.c b/kernel/driver/pci/pci.c index 8c69edee..c72c85a9 100644 --- a/kernel/driver/pci/pci.c +++ b/kernel/driver/pci/pci.c @@ -590,7 +590,7 @@ void pci_get_device_structure(uint8_t class_code, uint8_t sub_class, struct pci_ for (int i = 0; i < count_device_list; ++i) { - if ((ptr->Class_code == 1) && (ptr->SubClass == 6)) + if ((ptr->Class_code == class_code) && (ptr->SubClass == sub_class)) { kdebug("[%d] class_code=%d, sub_class=%d, progIF=%d, bar5=%#010lx", i, ptr->Class_code, ptr->SubClass, ptr->ProgIF,((struct pci_device_structure_general_device_t *)ptr)->BAR5);