]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/9/pc/ether82557.c
kernel: cleanup the software mouse cursor mess
[plan9front.git] / sys / src / 9 / pc / ether82557.c
index 20a9bb7afd8132cb01af7b3e9a829f412b3f083a..5577c7a79e2c99bef353717d8e194acd1e1eafc7 100644 (file)
@@ -930,7 +930,7 @@ i82557pci(void)
 {
        Pcidev *p;
        Ctlr *ctlr;
-       int i, nop, port;
+       int nop, port;
 
        p = nil;
        nop = 0;
@@ -956,17 +956,6 @@ i82557pci(void)
                        break;
                }
 
-               if(pcigetpms(p) > 0){
-                       pcisetpms(p, 0);
-       
-                       for(i = 0; i < 6; i++)
-                               pcicfgw32(p, PciBAR0+i*4, p->mem[i].bar);
-                       pcicfgw8(p, PciINTL, p->intl);
-                       pcicfgw8(p, PciLTR, p->ltr);
-                       pcicfgw8(p, PciCLS, p->cls);
-                       pcicfgw16(p, PciPCR, p->pcr);
-               }
-
                /*
                 * bar[0] is the memory-mapped register address (4KB),
                 * bar[1] is the I/O port register address (32 bytes) and
@@ -993,8 +982,6 @@ i82557pci(void)
                else
                        ctlrhead = ctlr;
                ctlrtail = ctlr;
-
-               pcisetbme(p);
        }
 }
 
@@ -1075,6 +1062,9 @@ reset(Ether* ether)
        if(ctlr == nil)
                return -1;
 
+       pcienable(ctlr->pcidev);
+       pcisetbme(ctlr->pcidev);
+
        /*
         * Initialise the Ctlr structure.
         * Perform a software reset after which should ensure busmastering