git: 4adcdaf0da31 - stable/15 - ufshci: pass the queue being destroyed to the cmd descriptor teardown

From: Jaeyoon Choi <jaeyoon_at_FreeBSD.org>
Date: Tue, 06 Oct 2026 07:51:22 UTC
The branch stable/15 has been updated by jaeyoon:

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

commit 4adcdaf0da316483cc0f5eabb8448dd968a02875
Author:     Jaeyoon Choi <jaeyoon@FreeBSD.org>
AuthorDate: 2026-08-18 04:50:27 +0000
Commit:     Jaeyoon Choi <jaeyoon@FreeBSD.org>
CommitDate: 2026-10-06 06:28:02 +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
    
    (cherry picked from commit dbcebc7c661e961ea6e72ef77e29675aca86ab4b)
---
 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);