Page MenuHomeFreeBSD

ufshci: byte-swap big-endian UPIU fields
ClosedPublic

Authored by jaeyoon on Wed, Aug 5, 8:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 30, 12:59 PM
Unknown Object (File)
Sun, Aug 30, 4:46 AM
Unknown Object (File)
Fri, Aug 28, 2:29 PM
Unknown Object (File)
Fri, Aug 28, 1:02 PM
Unknown Object (File)
Fri, Aug 28, 1:01 PM
Unknown Object (File)
Wed, Aug 26, 3:03 AM
Unknown Object (File)
Wed, Aug 26, 3:00 AM
Unknown Object (File)
Tue, Aug 25, 1:17 PM
Subscribers
None

Details

Summary

The UPIU wire fields are big-endian. The task management and query
builders wrote host-order values into them. The completion paths also
read the results back without conversion. On a little-endian host an
ABORT_TASK carried a swapped task tag and LUN, a query carried a
swapped length, and attribute reads returned swapped values. Tolerant
devices masked most of the damage.

Convert with htobe*/be*toh at the wire boundary, as ufshci_sim.c
already does for its fields.

Sponsored by: Samsung Electronics

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable