* cpfl_ctlq_shutdown - shutdown the CQ * The main shutdown routine for any controq queue */
| 737 | * The main shutdown routine for any controq queue |
| 738 | */ |
| 739 | static void |
| 740 | cpfl_ctlq_shutdown(struct idpf_hw *hw, struct idpf_ctlq_info *cq) |
| 741 | { |
| 742 | idpf_acquire_lock(&cq->cq_lock); |
| 743 | |
| 744 | if (!cq->ring_size) |
| 745 | goto shutdown_sq_out; |
| 746 | |
| 747 | /* free ring buffers and the ring itself */ |
| 748 | cpfl_ctlq_dealloc_ring_res(hw, cq); |
| 749 | |
| 750 | /* Set ring_size to 0 to indicate uninitialized queue */ |
| 751 | cq->ring_size = 0; |
| 752 | |
| 753 | shutdown_sq_out: |
| 754 | idpf_release_lock(&cq->cq_lock); |
| 755 | idpf_destroy_lock(&cq->cq_lock); |
| 756 | } |
| 757 | |
| 758 | /** |
| 759 | * cpfl_ctlq_remove - deallocate and remove specified control queue |
no test coverage detected