diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2021-07-11 21:49:15 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2021-07-11 21:49:15 +0000 |
commit | e8259861da3a55c03491904e4d11c5c15b7577c5 (patch) | |
tree | f46bf4fe0d84c1576500345c35ad138f5e2de44c /sys/src/9/pc/ethervirtio10.c | |
parent | ad37339a1c39c90f51d273abe60f552d3900f752 (diff) |
virtio: set FeaturesOk flag after feature negotiation, and enable queues before DriverOk flag
Diffstat (limited to 'sys/src/9/pc/ethervirtio10.c')
-rw-r--r-- | sys/src/9/pc/ethervirtio10.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/src/9/pc/ethervirtio10.c b/sys/src/9/pc/ethervirtio10.c index 03108cad9..2f38f8605 100644 --- a/sys/src/9/pc/ethervirtio10.c +++ b/sys/src/9/pc/ethervirtio10.c @@ -40,7 +40,7 @@ enum { Sacknowledge = 1, Sdriver = 2, Sdriverok = 4, - Sfeatureok = 8, + Sfeaturesok = 8, Sfailed = 128, /* flags in Qnetstatus */ @@ -466,14 +466,15 @@ attach(Ether* edev) } ctlr->attached = 1; - /* driver is ready */ - ctlr->cfg->status |= Sdriverok; - /* enable the queues */ for(i = 0; i < ctlr->nqueue; i++){ ctlr->cfg->queuesel = i; ctlr->cfg->queueenable = 1; } + + /* driver is ready */ + ctlr->cfg->status |= Sdriverok; + iunlock(ctlr); /* start kprocs */ @@ -692,6 +693,8 @@ pciprobe(void) cfg->drvfeatsel = 0; cfg->drvfeat = c->feat[0] & (Fmac|Fctrlvq|Fctrlrx); + cfg->status |= Sfeaturesok; + for(i=0; i<nelem(c->queue); i++){ cfg->queuesel = i; n = cfg->queuesize; |