intermittent data corruptions which I faced. The documentation says about
FUA for write commands:
"The Device Server shall write the logical blocks to the medium, and shall
not complete the command with GOOD status until all the logical blocks have
been written on the medium without error."
-/* $OpenBSD: ufshci.c,v 1.2 2023/04/02 08:53:01 anton Exp $ */
+/* $OpenBSD: ufshci.c,v 1.3 2023/04/05 17:23:30 mglocker Exp $ */
/*
* Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org>
ucd->cmd.expected_xfer_len = htobe32(rsp_size);
ucd->cmd.cdb[0] = WRITE_10; /* 0x2a */
- //ucd->cmd.cdb[1] = (1 << 3); /* FUA: Force Unit Access */
+ ucd->cmd.cdb[1] = (1 << 3); /* FUA: Force Unit Access */
ucd->cmd.cdb[2] = (lba >> 24) & 0xff;
ucd->cmd.cdb[3] = (lba >> 16) & 0xff;
ucd->cmd.cdb[4] = (lba >> 8) & 0xff;