Commit 73618201 authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller

ionic: increment num-vfs before configure

Add the new VF to our internal count before we start configuring it.
Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e75ccac1
...@@ -165,10 +165,10 @@ static int ionic_vf_alloc(struct ionic *ionic, int num_vfs) ...@@ -165,10 +165,10 @@ static int ionic_vf_alloc(struct ionic *ionic, int num_vfs)
goto out; goto out;
} }
ionic->num_vfs++;
/* ignore failures from older FW, we just won't get stats */ /* ignore failures from older FW, we just won't get stats */
(void)ionic_set_vf_config(ionic, i, IONIC_VF_ATTR_STATSADDR, (void)ionic_set_vf_config(ionic, i, IONIC_VF_ATTR_STATSADDR,
(u8 *)&v->stats_pa); (u8 *)&v->stats_pa);
ionic->num_vfs++;
} }
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment