Page MenuHomeFreeBSD

ufshci: fix data direction encoding for read commands
ClosedPublic

Authored by jaeyoon on Aug 5 2026, 7:51 AM.
Tags
None
Referenced Files
F174907777: D58652.diff
Tue, Oct 6, 9:53 PM
Unknown Object (File)
Sun, Oct 4, 2:44 PM
Unknown Object (File)
Wed, Sep 30, 10:34 AM
Unknown Object (File)
Fri, Sep 25, 4:09 AM
Unknown Object (File)
Tue, Sep 22, 5:41 AM
Unknown Object (File)
Mon, Sep 21, 10:23 PM
Unknown Object (File)
Wed, Sep 16, 7:21 AM
Unknown Object (File)
Tue, Sep 15, 2:15 AM
Subscribers
None

Details

Summary

The data_direction field in the UTP Transfer Request Descriptor is only
2 bits wide ([26:25]). UFSHCI_DATA_DIRECTION_FROM_TGT_TO_SYS was defined
as 0x10, which truncates to 0b00 (No data transfer) when stored into the
2-bit field, so every read command was described to the controller as
having no data phase. Only writes (0b01) happened to be encoded
correctly.

Define all values as 2-bit binary literals, matching the existing
RESERVED = 0b11 entry, so read is encoded as 0b10 as required by the
specification.

Sponsored by: Samsung Electronics

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75371
Build 72254: arc lint + arc unit