]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/9/pc/etherwavelan.c
devdraw: get rid of softscreen==0xa110c hack and make attachscreen() return Memdata*
[plan9front.git] / sys / src / 9 / pc / etherwavelan.c
index 4aa0c80eb1185e99424b11345fe4a3c9d5c0135e..e9877d5d2911d450ba888951511115a289a3e969 100644 (file)
@@ -8,7 +8,7 @@
 #include "io.h"
 #include "../port/error.h"
 #include "../port/netif.h"
-#include "etherif.h"
+#include "../port/etherif.h"
 
 #include "wavelan.h"
 
@@ -134,7 +134,6 @@ wavelanpciscan(void)
                else
                        ctlrhead = ctlr;
                ctlrtail = ctlr;
-               pcisetbme(p);
        }
 }
 
@@ -158,7 +157,9 @@ wavelanpcireset(Ether *ether)
                return -1;
 
        ctlr->active = 1;
+
        ilock(ctlr);
+       pcienable(ctlr->pcidev);
        ether->irq = ctlr->pcidev->intl;
        ether->tbdf = ctlr->pcidev->tbdf;
 
@@ -189,6 +190,7 @@ wavelanpcireset(Ether *ether)
                        *p = ' ';
                w_option(ctlr, ether->opt[i], strlen(ether->opt[i]));
        }
+       pcisetbme(ctlr->pcidev);
        iunlock(ctlr);
        return 0;
 }