summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/ethervirtio10.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2021-07-11 21:49:15 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2021-07-11 21:49:15 +0000
commite8259861da3a55c03491904e4d11c5c15b7577c5 (patch)
treef46bf4fe0d84c1576500345c35ad138f5e2de44c /sys/src/9/pc/ethervirtio10.c
parentad37339a1c39c90f51d273abe60f552d3900f752 (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.c11
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;