aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/pensando/ionic
diff options
context:
space:
mode:
authorShannon Nelson <snelson@pensando.io>2021-07-27 10:43:30 -0700
committerDavid S. Miller <davem@davemloft.net>2021-07-27 20:15:21 +0100
commit73618201acaa17edcf141101af9878d9f16de42a (patch)
treee74a0dcc0cb15e75a74a54074cf4f9fb1f1891b4 /drivers/net/ethernet/pensando/ionic
parentionic: use fewer inits on the buf_info struct (diff)
downloadlinux-dev-73618201acaa17edcf141101af9878d9f16de42a.tar.xz
linux-dev-73618201acaa17edcf141101af9878d9f16de42a.zip
ionic: increment num-vfs before configure
Add the new VF to our internal count before we start configuring it. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic')
-rw-r--r--drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
index 505f605fa40b..7e296fa71b36 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
@@ -165,10 +165,10 @@ static int ionic_vf_alloc(struct ionic *ionic, int num_vfs)
goto out;
}
+ ionic->num_vfs++;
/* ignore failures from older FW, we just won't get stats */
(void)ionic_set_vf_config(ionic, i, IONIC_VF_ATTR_STATSADDR,
(u8 *)&v->stats_pa);
- ionic->num_vfs++;
}
out: