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
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
Unknown Object (File)
Mon, Sep 14, 12:17 AM
Unknown Object (File)
Sat, Sep 12, 1:29 AM
Unknown Object (File)
Fri, Sep 11, 6:09 PM
Unknown Object (File)
Wed, Sep 9, 3:07 PM
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 Not Applicable
Unit
Tests Not Applicable