src/dpdk/drivers/common/iavf/iavf_adminq.c
enum iavf_status iavf_shutdown_arq(struct iavf_hw *hw)
{
	enum iavf_status ret_code = IAVF_SUCCESS;

	iavf_acquire_spinlock(&hw->aq.arq_spinlock);

	if (hw->aq.arq.count == 0) {
		ret_code = IAVF_ERR_NOT_READY;
		goto shutdown_arq_out;
	}

	/* Stop firmware AdminQ processing */
	wr32(hw, hw->aq.arq.head, 0);
	wr32(hw, hw->aq.arq.tail, 0);
	wr32(hw, hw->aq.arq.len, 0);
	wr32(hw, hw->aq.arq.bal, 0);
	wr32(hw, hw->aq.arq.bah, 0);

	hw->aq.arq.count = 0; /* to indicate uninitialized queue */

	/* free ring buffers */
	iavf_free_arq_bufs(hw);

shutdown_arq_out:
	iavf_release_spinlock(&hw->aq.arq_spinlock);
	return ret_code;
}
/**
 *  iavf_shutdown_arq - shutdown ARQ
 *  @hw: pointer to the hardware structure
 *
 *  The main shutdown routine for the Admin Receive Queue
 **/
shutdown ARQ
@hw: pointer to the hardware structure

The main shutdown routine for the Admin Receive Queue
shutdown ARQ @hw : pointer to the hardware structure The main shutdown routine for the Admin Receive Queue
enum iavf_status iavf_shutdown_arq(struct iavf_hw *hw)
{
	enum iavf_status ret_code = IAVF_SUCCESS;
	iavf_acquire_spinlock(&hw->aq.arq_spinlock);
	if (hw->aq.arq.count == 0) {
		ret_code = IAVF_ERR_NOT_READY;
		goto shutdown_arq_out;
	}
	wr32(hw, hw->aq.arq.head, 0);
	wr32(hw, hw->aq.arq.tail, 0);
	wr32(hw, hw->aq.arq.len, 0);
	wr32(hw, hw->aq.arq.bal, 0);
	wr32(hw, hw->aq.arq.bah, 0);
	hw->aq.arq.count = 0; 
	iavf_free_arq_bufs(hw);
shutdown_arq_out:
	iavf_release_spinlock(&hw->aq.arq_spinlock);
	return ret_code;
}
enum iavf_status iavf_shutdown_arq ( struct iavf_hw * hw ) { enum iavf_status ret_code = IAVF_SUCCESS ; iavf_acquire_spinlock ( & hw -> aq . arq_spinlock ) ; if ( hw -> aq . arq . count == 0 ) { ret_code = IAVF_ERR_NOT_READY ; goto shutdown_arq_out ; } wr32 ( hw , hw -> aq . arq . head , 0 ) ; wr32 ( hw , hw -> aq . arq . tail , 0 ) ; wr32 ( hw , hw -> aq . arq . len , 0 ) ; wr32 ( hw , hw -> aq . arq . bal , 0 ) ; wr32 ( hw , hw -> aq . arq . bah , 0 ) ; hw -> aq . arq . count = 0 ; iavf_free_arq_bufs ( hw ) ; shutdown_arq_out : iavf_release_spinlock ( & hw -> aq . arq_spinlock ) ; return ret_code ; }
iavf_shutdown_arq - shutdown ARQ
  @hw: pointer to the hardware structure
iavf_shutdown_arq - shutdown ARQ @hw : pointer to the hardware structure
/* Stop firmware AdminQ processing */ /* to indicate uninitialized queue */ /* free ring buffers */