Skip to content
Snippets Groups Projects
Commit 223c39d5 authored by ht.lin's avatar ht.lin
Browse files

GENIO: ufs: enable fua flag


Set force unit access flag for both scsi write and scsi read.
With this flag set, it can avoid cache under EFI environment.

Change-Id: Ib95d10a1f09a6ee5fccb51e345439b4e77b4c928
Signed-off-by: default avatarht.lin <ht.lin@mediatek.com>
parent 344211c9
No related branches found
No related tags found
No related merge requests found
......@@ -110,6 +110,9 @@ static void scsi_setup_read_ext(struct scsi_cmd *pccb, lbaint_t start,
{
pccb->cmd[0] = SCSI_READ10;
pccb->cmd[1] = 0;
#ifdef CONFIG_EFI_VARIABLE_FILE_STORE
pccb->cmd[1] = (1 << 3); /* flags, FUA = 1 */
#endif
pccb->cmd[2] = (unsigned char)(start >> 24) & 0xff;
pccb->cmd[3] = (unsigned char)(start >> 16) & 0xff;
pccb->cmd[4] = (unsigned char)(start >> 8) & 0xff;
......@@ -131,6 +134,9 @@ static void scsi_setup_write_ext(struct scsi_cmd *pccb, lbaint_t start,
{
pccb->cmd[0] = SCSI_WRITE10;
pccb->cmd[1] = 0;
#ifdef CONFIG_EFI_VARIABLE_FILE_STORE
pccb->cmd[1] = (1 << 3); /* flags, FUA = 1 */
#endif
pccb->cmd[2] = (unsigned char)(start >> 24) & 0xff;
pccb->cmd[3] = (unsigned char)(start >> 16) & 0xff;
pccb->cmd[4] = (unsigned char)(start >> 8) & 0xff;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment