From a12b9621d9caead203a16a46689e45e65467ae88 Mon Sep 17 00:00:00 2001 From: CleverMouse Date: Fri, 3 Jun 2011 14:32:52 +0000 Subject: [PATCH] pcidev: don't scan for other functions on single-function devices git-svn-id: svn://kolibrios.org@1946 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/system/pcidev/trunk/PCIDEV.ASM | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/programs/system/pcidev/trunk/PCIDEV.ASM b/programs/system/pcidev/trunk/PCIDEV.ASM index 5d4f8034ed..65b69b1f39 100644 --- a/programs/system/pcidev/trunk/PCIDEV.ASM +++ b/programs/system/pcidev/trunk/PCIDEV.ASM @@ -306,9 +306,19 @@ Start_Enum: mov cl, 0x3c ; Register to read (Get IRQ) @@: mcall 62 ; Read it mov [PCI_IRQ], al ; Save it -; +; by CleverMouse juny 2011 + mov cl, 0x0e + mcall 62 + push eax inc byte [total] ; one more device found call Print_New_Device ; print device info to screen +; don't scan for nonzero functions if zero function says "not multifunction device" + pop eax + test al, al + js nextDev + test byte [V_Dev], 7 + jz nextDev + or byte [V_Dev], 7 nextDev: inc byte [V_Dev] ; next device on this bus jnz Start_Enum ; jump until we reach zero