#include "hinic_pmd_hwif.h"
#include "hinic_pmd_wq.h"
#include "hinic_pmd_mgmt.h"
+#include "hinic_pmd_mbox.h"
#include "hinic_pmd_cmdq.h"
#define CMDQ_CMD_TIMEOUT 5000 /* millisecond */
cmdq_ctxt, in_size, NULL,
NULL, 0);
if (err) {
+ if (err == HINIC_MBOX_PF_BUSY_ACTIVE_FW)
+ cmdqs->status |= HINIC_CMDQ_SET_FAIL;
PMD_DRV_LOG(ERR, "Set cmdq ctxt failed");
return -EFAULT;
}
}
+ cmdqs->status &= ~HINIC_CMDQ_SET_FAIL;
cmdqs->status |= HINIC_CMDQ_ENABLE;
return 0;
return err;
}
+ if (hwdev->cmdqs->status & HINIC_CMDQ_SET_FAIL) {
+ err = hinic_reinit_cmdq_ctxts(hwdev);
+ if (err) {
+ PMD_DRV_LOG(ERR, "Reinit cmdq context failed, rc: %d\n",
+ err);
+ return err;
+ }
+ }
+
err = init_qp_ctxts(nic_io);
if (err) {
PMD_DRV_LOG(ERR, "Init QP ctxts failed, rc: %d", err);