Lines Matching refs:lif
191 static void ionic_adminq_flush(struct ionic_lif *lif) in ionic_adminq_flush() argument
198 spin_lock_irqsave(&lif->adminq_lock, irqflags); in ionic_adminq_flush()
199 if (!lif->adminqcq) { in ionic_adminq_flush()
200 spin_unlock_irqrestore(&lif->adminq_lock, irqflags); in ionic_adminq_flush()
204 q = &lif->adminqcq->q; in ionic_adminq_flush()
213 spin_unlock_irqrestore(&lif->adminq_lock, irqflags); in ionic_adminq_flush()
216 void ionic_adminq_netdev_err_print(struct ionic_lif *lif, u8 opcode, in ionic_adminq_netdev_err_print() argument
224 netdev_err(lif->netdev, "%s (%d) failed: %s (%d)\n", in ionic_adminq_netdev_err_print()
228 static int ionic_adminq_check_err(struct ionic_lif *lif, in ionic_adminq_check_err() argument
240 ionic_adminq_netdev_err_print(lif, ctx->cmd.cmd.opcode, in ionic_adminq_check_err()
244 ionic_adminq_flush(lif); in ionic_adminq_check_err()
256 struct ionic_lif *lif; in ionic_notifyq_service() local
262 lif = q->admin_info[0].ctx; in ionic_notifyq_service()
263 netdev = lif->netdev; in ionic_notifyq_service()
267 if ((s64)(eid - lif->last_eid) <= 0) in ionic_notifyq_service()
270 lif->last_eid = eid; in ionic_notifyq_service()
272 dev_dbg(lif->ionic->dev, "notifyq event:\n"); in ionic_notifyq_service()
278 ionic_link_status_check_request(lif, CAN_NOT_SLEEP); in ionic_notifyq_service()
281 if (lif->ionic->idev.fw_status_ready && in ionic_notifyq_service()
282 !test_bit(IONIC_LIF_F_FW_RESET, lif->state) && in ionic_notifyq_service()
283 !test_and_set_bit(IONIC_LIF_F_FW_STOPPING, lif->state)) { in ionic_notifyq_service()
286 netdev_err(lif->netdev, "Reset event dropped\n"); in ionic_notifyq_service()
287 clear_bit(IONIC_LIF_F_FW_STOPPING, lif->state); in ionic_notifyq_service()
290 ionic_lif_deferred_enqueue(lif, work); in ionic_notifyq_service()
341 struct ionic_lif *lif = q->lif; in ionic_adminq_poke_doorbell() local
345 spin_lock_irqsave(&lif->adminq_lock, irqflags); in ionic_adminq_poke_doorbell()
348 spin_unlock_irqrestore(&lif->adminq_lock, irqflags); in ionic_adminq_poke_doorbell()
357 ionic_dbell_ring(q->lif->kern_dbpage, q->hw_type, in ionic_adminq_poke_doorbell()
363 spin_unlock_irqrestore(&lif->adminq_lock, irqflags); in ionic_adminq_poke_doorbell()
368 int ionic_adminq_post(struct ionic_lif *lif, struct ionic_admin_ctx *ctx) in ionic_adminq_post() argument
376 spin_lock_irqsave(&lif->adminq_lock, irqflags); in ionic_adminq_post()
377 if (!lif->adminqcq) { in ionic_adminq_post()
378 spin_unlock_irqrestore(&lif->adminq_lock, irqflags); in ionic_adminq_post()
382 q = &lif->adminqcq->q; in ionic_adminq_post()
389 err = ionic_heartbeat_check(lif->ionic); in ionic_adminq_post()
399 dev_dbg(&lif->netdev->dev, "post admin queue command:\n"); in ionic_adminq_post()
406 spin_unlock_irqrestore(&lif->adminq_lock, irqflags); in ionic_adminq_post()
411 int ionic_adminq_wait(struct ionic_lif *lif, struct ionic_admin_ctx *ctx, in ionic_adminq_wait() argument
414 struct net_device *netdev = lif->netdev; in ionic_adminq_wait()
424 if (do_msg && !test_bit(IONIC_LIF_F_FW_RESET, lif->state)) in ionic_adminq_wait()
442 ionic_heartbeat_check(lif->ionic); in ionic_adminq_wait()
443 if ((test_bit(IONIC_LIF_F_FW_RESET, lif->state) && in ionic_adminq_wait()
444 !lif->ionic->idev.fw_status_ready) || in ionic_adminq_wait()
445 test_bit(IONIC_LIF_F_FW_STOPPING, lif->state)) { in ionic_adminq_wait()
456 dev_dbg(lif->ionic->dev, "%s: elapsed %d msecs\n", in ionic_adminq_wait()
459 return ionic_adminq_check_err(lif, ctx, in ionic_adminq_wait()
464 static int __ionic_adminq_post_wait(struct ionic_lif *lif, in __ionic_adminq_post_wait() argument
470 if (!ionic_is_fw_running(&lif->ionic->idev)) in __ionic_adminq_post_wait()
473 err = ionic_adminq_post(lif, ctx); in __ionic_adminq_post_wait()
475 return ionic_adminq_wait(lif, ctx, err, do_msg); in __ionic_adminq_post_wait()
478 int ionic_adminq_post_wait(struct ionic_lif *lif, struct ionic_admin_ctx *ctx) in ionic_adminq_post_wait() argument
480 return __ionic_adminq_post_wait(lif, ctx, true); in ionic_adminq_post_wait()
483 int ionic_adminq_post_wait_nomsg(struct ionic_lif *lif, struct ionic_admin_ctx *ctx) in ionic_adminq_post_wait_nomsg() argument
485 return __ionic_adminq_post_wait(lif, ctx, false); in ionic_adminq_post_wait_nomsg()
651 &ionic->ident.lif); in ionic_identify()