Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6f915cf2 authored by John Stultz's avatar John Stultz Committed by Alistair Delva
Browse files

ANDROID: scsi: ufs-hisi: Enable BROKEN_CRYPTO quirk flag



HiKey960 doesn't play well with the inline crypto logic, and
seems to deviate from the UFS standard.

Eric Biggers noted:
"It declares that it has 32 crypto configurations (a.k.a.
keyslots), starting at offset 1280 from the start of the UFS
registers.  Per the UFS standard, each crypto configuration is
128 bytes, so that means they go until offset 5376.

However, the device tree node for the UFS host controller (in
hi3660.dtsi) only declares 4096 bytes for the UFS standard
registers, and then the next 4096 physical bytes are declared to
be vendor-specific UFS registers.  The ufs-hisi driver already
uses these vendor-specific registers to do things like reset the
UFS controller and configure the clocks.  But if we follow the
UFS standard, the very same memory addresses have a different
meaning.

Also, even if I hardcode the number of keyslots to 22 so they fit
in the first 4096 bytes, then there is either an SError interrupt
while programming keyslot 0, or CRYPTO_GENERAL_ERROR is reported
from the UFS request."

So until we can understand the hardware better disable inline
crypto using the quirks flag in the driver.

Bug: 137270441
Change-Id: I69b1c10018bae9ac8ed2a32b02d253afbff64c34
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarSatya Tangirala <satyat@google.com>
parent 86739e75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment