Page MenuHomeFreeBSD

ufshci: set HS series per platform and adapt type per gear
ClosedPublic

Authored by jaeyoon on Sep 1 2026, 6:07 AM.
Tags
None
Referenced Files
F176572500: D59298.id185536.diff
Mon, Oct 19, 10:50 PM
Unknown Object (File)
Sat, Oct 17, 10:14 AM
Unknown Object (File)
Wed, Oct 14, 3:13 PM
Unknown Object (File)
Thu, Oct 8, 8:29 PM
Unknown Object (File)
Tue, Oct 6, 8:42 PM
Unknown Object (File)
Thu, Oct 1, 6:26 AM
Unknown Object (File)
Wed, Sep 30, 8:38 PM
Unknown Object (File)
Wed, Sep 30, 12:59 PM
Subscribers

Details

Summary

The driver always asked for Rate-B. It never set the adaptation
type. The Snapdragon X Elite firmware tunes the PHY for Rate-A.
A Rate-B link dies at every gear there. HS-G4 and above need
initial adaptation. This is a UniPro rule. It applies to
every host.

Add an hs_series field to the device tables. Use Rate-A on the
Snapdragon X Elite. Keep Rate-B on the PCI hosts. A table entry
without an HS series fails to attach. Set PA_TxHsAdaptType to
initial adaptation at HS-G4 and above. Leave it alone below
that. Hosts before UniPro 1.8 do not have it. The Galaxy Book
4 Edge now links at HS-G5 Rate-A.

fio results (128k sequential, 4k random, posixaio):

QD | SEQ_R(MiB/s) | SEQ_W(MiB/s) | RND_R(kIOPS) | RND_W(kIOPS)
----+--------------+--------------+--------------+-------------
1 | 1357 | 1221 | 12.1 | 27.2
4 | 3103 | 3234 | 46.5 | 92.9
32 | 3508 | 3238 | 176.4 | 125.0

Sequential writes land in the WriteBooster buffer. Sustained
writes drop to 556 MiB/s once the buffer runs out.

Sponsored by: Samsung Electronics

Diff Detail

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