net/ionic: fix completion type in lif init
authorAndrew Boyer <aboyer@pensando.io>
Tue, 16 Feb 2021 20:35:40 +0000 (12:35 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 25 Feb 2021 15:58:56 +0000 (16:58 +0100)
The completion type was wrong.
Don't check the completion if the wait timed out.

Fixes: 669c8de67c88 ("net/ionic: support basic LIF")
Cc: stable@dpdk.org
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
drivers/net/ionic/ionic_lif.c

index b8023e0..cd220ab 100644 (file)
@@ -1605,17 +1605,18 @@ int
 ionic_lif_init(struct ionic_lif *lif)
 {
        struct ionic_dev *idev = &lif->adapter->idev;
-       struct ionic_q_init_comp comp;
+       struct ionic_lif_init_comp comp;
        int err;
 
        memset(&lif->stats_base, 0, sizeof(lif->stats_base));
 
        ionic_dev_cmd_lif_init(idev, lif->info_pa);
        err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
-       ionic_dev_cmd_comp(idev, &comp);
        if (err)
                return err;
 
+       ionic_dev_cmd_comp(idev, &comp);
+
        lif->hw_index = rte_cpu_to_le_16(comp.hw_index);
 
        err = ionic_lif_adminq_init(lif);