Page MenuHomeFreeBSD

ufshci: fix data direction encoding for read commands
ClosedPublic

Authored by jaeyoon on Wed, Aug 5, 7:51 AM.
Tags
None
Referenced Files
F169551884: D58652.diff
Tue, Sep 1, 9:48 PM
Unknown Object (File)
Tue, Sep 1, 5:55 AM
Unknown Object (File)
Mon, Aug 31, 5:44 PM
Unknown Object (File)
Fri, Aug 28, 3:02 PM
Unknown Object (File)
Wed, Aug 26, 10:03 AM
Unknown Object (File)
Tue, Aug 25, 2:00 PM
Unknown Object (File)
Tue, Aug 25, 2:00 PM
Unknown Object (File)
Tue, Aug 25, 9: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 Not Applicable
Unit
Tests Not Applicable