summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAswin Murugan <[email protected]>2026-04-16 14:40:47 +0530
committerTom Rini <[email protected]>2026-04-27 13:44:06 -0600
commit4b42c59a34bb9364bd2228fd2fead0c5750e7abf (patch)
treeb4354240af195b32be597b4d55d3e540e4912779
parent34a44dad743b557542edf5b48f789e6bb6442628 (diff)
scsi: Enable FUA bit in WRITE10 commands
Enable the Force Unit Access (FUA) bit in SCSI WRITE10 commands to ensure writes bypass the device's volatile cache and go directly to non-volatile storage. This provides write-through behavior that prevents data loss during board resets. Reviewed-by: Varadarajan Narayanan <[email protected]> Signed-off-by: Aswin Murugan <[email protected]> Signed-off-by: Balaji Selvanathan <[email protected]> Reviewed-by: Simon Glass <[email protected]>
-rw-r--r--drivers/scsi/scsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 9a417795851..50e7d749921 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -107,7 +107,7 @@ static void scsi_setup_write_ext(struct scsi_cmd *pccb, lbaint_t start,
lbaint_t blocks)
{
pccb->cmd[0] = SCSI_WRITE10;
- pccb->cmd[1] = 0;
+ pccb->cmd[1] = 0x08; /* Set FUA bit to bypass write cache */
pccb->cmd[2] = (unsigned char)(start >> 24) & 0xff;
pccb->cmd[3] = (unsigned char)(start >> 16) & 0xff;
pccb->cmd[4] = (unsigned char)(start >> 8) & 0xff;