git: 456ab423dddc - main - ufshci: initialize alloc_units before the dedicated-buffer scan
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 10 Aug 2026 02:31:27 UTC
The branch main has been updated by jaeyoon:
URL: https://cgit.FreeBSD.org/src/commit/?id=456ab423dddc0ce07787b21fcb79426abc7b436e
commit 456ab423dddc0ce07787b21fcb79426abc7b436e
Author: Jaeyoon Choi <jaeyoon@FreeBSD.org>
AuthorDate: 2026-08-10 01:45:49 +0000
Commit: Jaeyoon Choi <jaeyoon@FreeBSD.org>
CommitDate: 2026-08-10 02:28:51 +0000
ufshci: initialize alloc_units before the dedicated-buffer scan
If every unit descriptor read failed in the LU-dedicated WriteBooster
scan, alloc_units was used uninitialized. Start it at zero so that case
is treated as a zero-sized buffer and WriteBooster is disabled.
Sponsored by: Samsung Electronics
Reviewed by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D58663
---
sys/dev/ufshci/ufshci_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/ufshci/ufshci_dev.c b/sys/dev/ufshci/ufshci_dev.c
index 7113834db13a..db7a8c564a29 100644
--- a/sys/dev/ufshci/ufshci_dev.c
+++ b/sys/dev/ufshci/ufshci_dev.c
@@ -745,7 +745,7 @@ ufshci_dev_config_write_booster(struct ufshci_controller *ctrlr)
{
struct ufshci_device *dev = &ctrlr->ufs_dev;
uint32_t extended_ufs_feature_support;
- uint32_t alloc_units;
+ uint32_t alloc_units = 0;
struct ufshci_unit_descriptor unit_desc;
uint8_t lun;
bool is_life_time_left;