summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/etherwpi.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-10-07 22:28:21 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2018-10-07 22:28:21 +0200
commit9fec0e736081cd155afb6a413b7641b93faed519 (patch)
treea91f5bb3e967e97ddd00c727e0d2bfd65669f93d /sys/src/9/pc/etherwpi.c
parent4d7c195804991b9c762f9a859679282c7014bbbb (diff)
pc drivers: use pcienable() to handle device power up and missing initialization
Diffstat (limited to 'sys/src/9/pc/etherwpi.c')
-rw-r--r--sys/src/9/pc/etherwpi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/src/9/pc/etherwpi.c b/sys/src/9/pc/etherwpi.c
index ce989636a..08976293b 100644
--- a/sys/src/9/pc/etherwpi.c
+++ b/sys/src/9/pc/etherwpi.c
@@ -1793,9 +1793,6 @@ wpipci(void)
if(pcicfgr8(pdev, 0x41) != 0)
pcicfgw8(pdev, 0x41, 0);
- pcisetbme(pdev);
- pcisetpms(pdev, 0);
-
ctlr = malloc(sizeof(Ctlr));
if(ctlr == nil) {
print("wpi: unable to alloc Ctlr\n");
@@ -1853,11 +1850,13 @@ again:
edev->multicast = wpimulticast;
edev->mbps = 54;
+ pcienable(ctlr->pdev);
if(wpiinit(edev) < 0){
+ pcidisable(ctlr->pdev);
edev->ctlr = nil;
goto again;
}
-
+ pcisetbme(ctlr->pdev);
intrenable(edev->irq, wpiinterrupt, edev, edev->tbdf, edev->name);
return 0;