git: dbcebc7c661e - main - ufshci: pass the queue being destroyed to the cmd descriptor teardown

From: Jaeyoon Choi <jaeyoon_at_FreeBSD.org>
Date: Tue, 18 Aug 2026 05:26:11 UTC
The branch main has been updated by jaeyoon:

URL: https://cgit.FreeBSD.org/src/commit/?id=dbcebc7c661e961ea6e72ef77e29675aca86ab4b

commit dbcebc7c661e961ea6e72ef77e29675aca86ab4b
Author:     Jaeyoon Choi <jaeyoon@FreeBSD.org>
AuthorDate: 2026-08-18 04:50:27 +0000
Commit:     Jaeyoon Choi <jaeyoon@FreeBSD.org>
CommitDate: 2026-08-18 04:50:27 +0000

    ufshci: pass the queue being destroyed to the cmd descriptor teardown
    
    ufshci_req_sdb_destroy() hardcoded &ctrlr->transfer_req_queue when
    destroying command descriptors instead of using its req_queue argument.
    
    No functional change: the branch only runs for the transfer queue, so
    the two pointers are always the same today. Using the argument keeps
    the function queue-agnostic for when more transfer queues exist (MCQ).
    
    Reviewed by:            imp (mentor)
    Sponsored by:           Samsung Electronics
    Differential Revision:  https://reviews.freebsd.org/D58816
---
 sys/dev/ufshci/ufshci_req_sdb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/dev/ufshci/ufshci_req_sdb.c b/sys/dev/ufshci/ufshci_req_sdb.c
index 51e72c4ed4f5..b737a7081fd9 100644
--- a/sys/dev/ufshci/ufshci_req_sdb.c
+++ b/sys/dev/ufshci/ufshci_req_sdb.c
@@ -330,8 +330,7 @@ ufshci_req_sdb_destroy(struct ufshci_controller *ctrlr,
 
 	if (hwq->act_tr != NULL) {
 		if (!req_queue->is_task_mgmt)
-			ufshci_req_sdb_cmd_desc_destroy(
-			    &ctrlr->transfer_req_queue);
+			ufshci_req_sdb_cmd_desc_destroy(req_queue);
 
 		for (i = 0; i < req_queue->num_trackers; i++)
 			free(hwq->act_tr[i], M_UFSHCI);