OpenBSD cvs log

created 2024-05-12T03:14:32Z
begin 2024-05-09T00:00:00Z
end 2024-05-10T00:00:00Z
path src/sys
commits 12

date 2024-05-09T08:02:59Z
author mglocker
files src/sys/dev/ic/ufshci.c log diff annotate
src/sys/dev/ic/ufshcivar.h log diff annotate
message Don't relay on the doorbell register to track our slots. As of the
documentation:

"UTRLDBR is a volatile register; software should only use its value to
determine commands that have completed, not to determine which commands
have previously been issued."

Instead we use the CCB structure to track our slots, as proposed by dlg@.

CAVEAT: Since using more than one slot is currently causing OCS errors,
we limit the slots to one until we can find a solution.

date 2024-05-09T08:04:48Z
author mglocker
files src/sys/dev/ic/ufshci.c log diff annotate
src/sys/dev/ic/ufshcivar.h log diff annotate
message Prevent that scheduling of new commands is interfering with processing
of completed commands with a command mutex.

date 2024-05-09T08:06:42Z
author mglocker
files src/sys/dev/ic/ufshci.c log diff annotate
src/sys/dev/ic/ufshcireg.h log diff annotate
src/sys/dev/ic/ufshcivar.h log diff annotate
message Don't schedule interrupt aggregation when commands are still in-progress.
As of the documentation:

"NOTE Write operations to IACTH and IATOVAL are only allowed when no
commands are outstanding."

Instead we only schedule interrupt aggregation at the start of the
SCSI command call, when all commands have completed.

date 2024-05-09T08:09:17Z
author mglocker
files src/sys/dev/ic/ufshci.c log diff annotate
message Don't use the task id for UPIU commands. We don't use task management
commands yet.

date 2024-05-09T08:12:22Z
author mglocker
files src/sys/dev/ic/ufshci.c log diff annotate
message Don't do math on KVA to get the required slot offset since that could
cause invalid pointers depending on the compiler interpretation of
(void *). Instead work with the structure pointer itself.

Proposed by dlg@

date 2024-05-09T08:13:57Z
author mglocker
files src/sys/dev/ic/ufshci.c log diff annotate
message Use 1U for bit operations on 32-bit registers.

Proposed by dlg@

date 2024-05-09T08:16:32Z
author mglocker
files src/sys/dev/ic/ufshci.c log diff annotate
message Perform bus DMA synchronization to update the command descriptors.

date 2024-05-09T08:18:20Z
author mglocker
files src/sys/dev/ic/ufshci.c log diff annotate
message Parse the OCS response value for completed commands, and set error on
failure.

date 2024-05-09T08:20:22Z
author mglocker
files src/sys/dev/ic/ufshcireg.h log diff annotate
message Pack hardware descriptor structures.

date 2024-05-09T08:21:52Z
author mglocker
files src/sys/dev/ic/ufshci.c log diff annotate
message Sprinkle some more DPRINTFs.

date 2024-05-09T08:24:09Z
author mglocker
files src/sys/dev/ic/ufshci.c log diff annotate
message Back then I faced intermittent file-system corruptions for which setting
FUA (Force Unit Access) did help. In the meantime it turned out that
those file-system corruptions were most likely caused by the slot issues.
Now that we fixed the slot management and limited to one slot for now,
remove FUA again, which increases the write performance significantly.

date 2024-05-09T17:05:22Z
author mglocker
files src/sys/arch/amd64/conf/GENERIC log diff annotate
src/sys/arch/amd64/conf/RAMDISK_CD log diff annotate
message Enable ufshci(4) on amd64.

ok kettenis@ deraadt@