diff options
| author | Jorge Ramirez-Ortiz <[email protected]> | 2026-07-17 11:30:07 +0200 |
|---|---|---|
| committer | Neil Armstrong <[email protected]> | 2026-07-21 09:22:58 +0200 |
| commit | 38bfdf0a770219e2f753023998bc9d0b45254785 (patch) | |
| tree | 9d9fc007ed5d09c00a67ef0f31591a20cfd62b84 /scripts | |
| parent | 042e45e026c77227319a426940577856ffe62e7b (diff) | |
ufs: invalidate the whole descriptor data segment after a query read
ufshcd_get_req_rsp() invalidates only sizeof(struct utp_upiu_rsp) of the
DMA'd response, but a READ DESCRIPTOR response's data segment follows the
UPIU header at GENERAL_UPIU_REQUEST_SIZE and can extend past that window.
The tail of a longer descriptor was therefore read from stale cache (the
pre-transfer memset had zeroed it), so its last bytes came back as 0.
This corrupted the last UTF-16 code unit of longer string descriptors:
e.g. a 34-byte product-name descriptor "THGJFGT0T25BAZZA" was read as
"THGJFGT0T25BAZZ\0", dropping the final 'A'. Shorter descriptors that fit
within the invalidated cache line (serial numbers, etc.) were unaffected.
Invalidate the descriptor region before copying it out.
Tested on the Qualcomm IQ-9075-EVK.
Fixes: 7feafb0ae4f7 ("ufs: Add Initial Support for UFS subsystem")
Signed-off-by: Jorge Ramirez-Ortiz <[email protected]>
Reviewed-by: Neha Malcom Francis <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Neil Armstrong <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
