Page MenuHomeFreeBSD

ufshci: byte-swap big-endian UPIU fields
ClosedPublic

Authored by jaeyoon on Wed, Aug 5, 8:07 AM.
Tags
None
Referenced Files
F170118462: D58664.id.diff
Thu, Sep 3, 1:52 PM
Unknown Object (File)
Tue, Sep 1, 5:06 PM
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
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 75383
Build 72266: arc lint + arc unit