diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-10-07 22:28:21 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-10-07 22:28:21 +0200 |
commit | 9fec0e736081cd155afb6a413b7641b93faed519 (patch) | |
tree | a91f5bb3e967e97ddd00c727e0d2bfd65669f93d /sys/src/9/pc/ether83815.c | |
parent | 4d7c195804991b9c762f9a859679282c7014bbbb (diff) |
pc drivers: use pcienable() to handle device power up and missing initialization
Diffstat (limited to 'sys/src/9/pc/ether83815.c')
-rw-r--r-- | sys/src/9/pc/ether83815.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/src/9/pc/ether83815.c b/sys/src/9/pc/ether83815.c index 5b7534ce7..a65fe719e 100644 --- a/sys/src/9/pc/ether83815.c +++ b/sys/src/9/pc/ether83815.c @@ -1098,13 +1098,6 @@ scanpci83815(void) free(ctlr); continue; } - - if(softreset(ctlr, 0) == -1){ - free(ctlr); - continue; - } - srom(ctlr); - if(ctlrhead != nil) ctlrtail->next = ctlr; else @@ -1148,6 +1141,10 @@ reset(Ether* ether) if(ctlr == nil) return -1; + pcienable(ctlr->pcidev); + softreset(ctlr, 0); + srom(ctlr); + ether->ctlr = ctlr; ether->port = ctlr->port; ether->irq = ctlr->pcidev->intl; |