git: aaf0e80e684d - main - ufshci: release the CCB after sending a start stop unit command
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 10 Aug 2026 02:31:32 UTC
The branch main has been updated by jaeyoon:
URL: https://cgit.FreeBSD.org/src/commit/?id=aaf0e80e684da35cd527491243583467ae7c75cb
commit aaf0e80e684da35cd527491243583467ae7c75cb
Author: Jaeyoon Choi <jaeyoon@FreeBSD.org>
AuthorDate: 2026-08-10 01:51:30 +0000
Commit: Jaeyoon Choi <jaeyoon@FreeBSD.org>
CommitDate: 2026-08-10 02:28:53 +0000
ufshci: release the CCB after sending a start stop unit command
ufshci_sim_send_ssu() got a CCB from cam_periph_getccb() but never
returned it. Each call leaked the CCB and one slot of the device's
CCB allocation budget. When the budget runs out, the next
cam_periph_getccb() waits forever and the suspend path hangs.
Release the CCB while the periph lock is still held, as the other CAM
periph drivers do.
Sponsored by: Samsung Electronics
Reviewed by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D58669
---
sys/dev/ufshci/ufshci_sim.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sys/dev/ufshci/ufshci_sim.c b/sys/dev/ufshci/ufshci_sim.c
index 4a106a6c7b8a..e40079b23354 100644
--- a/sys/dev/ufshci/ufshci_sim.c
+++ b/sys/dev/ufshci/ufshci_sim.c
@@ -12,6 +12,7 @@
#include <cam/cam_debug.h>
#include <cam/cam_periph.h>
#include <cam/cam_sim.h>
+#include <cam/cam_xpt_periph.h>
#include <cam/cam_xpt_sim.h>
#include <cam/scsi/scsi_all.h>
#include <cam/scsi/scsi_message.h>
@@ -542,6 +543,8 @@ ufshci_sim_send_ssu(struct ufshci_controller *ctrlr, bool start,
err = cam_periph_runccb(ccb, NULL, 0, SF_RETRY_UA, NULL);
+ xpt_release_ccb(ccb);
+
cam_periph_unlock(periph);
/* Release periph reference */
cam_periph_release(periph);