]> Zhao Yanbai Git Server - minix.git/commitdiff
dp8390 doesn't cope with the different semantics of the pci
authorBen Gras <ben@minix3.org>
Tue, 24 Apr 2007 12:29:51 +0000 (12:29 +0000)
committerBen Gras <ben@minix3.org>
Tue, 24 Apr 2007 12:29:51 +0000 (12:29 +0000)
functions.

Bug and workaround reported by "E.Agafonov" <e.a.agafonov@gmail.com>.

drivers/dp8390/rtl8029.c

index 5772dc26358ff0f3c401c7f5c4340428bad06216..189e2e30c59ac6eda860e35985a89eed2c5180af 100644 (file)
@@ -118,7 +118,8 @@ struct dpeth *dep;
                dname= "unknown device";
        printf("%s: %s (%04X/%04X) at %s\n",
                dep->de_name, dname, vid, did, pci_slot_name(devind));
-       pci_reserve(devind);
+        if(pci_reserve_ok(devind) != OK)
+               return 0;
        /* printf("cr = 0x%x\n", pci_attr_r16(devind, PCI_CR)); */
        bar= pci_attr_r32(devind, PCI_BAR) & 0xffffffe0;