From 6fccbddc62689e6c6c368435c31c456af4fd51ac Mon Sep 17 00:00:00 2001 From: aaron Date: Mon, 23 Oct 2017 10:22:31 +0000 Subject: [PATCH] git-svn-id: https://spexeah.com:8443/svn/Asuro@222 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c --- src/driver/PCI.pas | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/driver/PCI.pas b/src/driver/PCI.pas index 43e38235..450a4b4a 100644 --- a/src/driver/PCI.pas +++ b/src/driver/PCI.pas @@ -244,13 +244,12 @@ var ii : uint16; begin //enumerate pci bus - for ii:=0 to 32 do begin - for i:=0 to 256 do begin + for ii:=0 to 256 do begin + for i:=0 to 31 do begin check_device(ii, i); end; end; - //TODO while there are unchecked nested busses, check nested busses end; procedure loadConfig(bus : uint8; slot : uint8; func : uint8; offset : uint8); @@ -277,7 +276,7 @@ begin if vendor_id = $FFFF then exit; isDeviceb := isDevice(bus, device, 0, 8); - if isDeviceb >= 0 then begin + if isDeviceb = 1 then begin devices[device_count] := read_device_config(bus, device, 0, 0); device_count := device_count + 1; check_device := true;