cndm: Fix CQ deinit ordering

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich
2026-03-11 01:53:05 -07:00
parent 6e640c71b9
commit dda53624b5

View File

@@ -130,6 +130,11 @@ void cndm_close_cq(struct cndm_cq *cq)
cq->enabled = 0; cq->enabled = 0;
if (cq->eq) {
cndm_eq_detach_cq(cq->eq, cq);
cq->eq = NULL;
}
if (cq->cqn != -1) { if (cq->cqn != -1) {
cmd.opcode = CNDM_CMD_OP_DESTROY_CQ; cmd.opcode = CNDM_CMD_OP_DESTROY_CQ;
cmd.flags = 0x00000000; cmd.flags = 0x00000000;
@@ -143,11 +148,6 @@ void cndm_close_cq(struct cndm_cq *cq)
cq->db_addr = NULL; cq->db_addr = NULL;
} }
if (cq->eq) {
cndm_eq_detach_cq(cq->eq, cq);
cq->eq = NULL;
}
if (cq->irq) { if (cq->irq) {
atomic_notifier_chain_unregister(&cq->irq->nh, &cq->irq_nb); atomic_notifier_chain_unregister(&cq->irq->nh, &cq->irq_nb);
cq->irq = NULL; cq->irq = NULL;