fix(ufs): set data segment length

Remove blanket assumption of empty data segment area to avoid
issues while writing descriptors.

Signed-off-by: Rohit Ner <rohitner@google.com>
Change-Id: If6ff0426c44c949af1065082ed8a23ed936b5f3e
This commit is contained in:
Rohit Ner 2023-07-07 21:43:50 -07:00
parent 5f01b0b116
commit 9d6786cace

View file

@ -540,6 +540,7 @@ static int ufs_prepare_query(utp_utrd_t *utrd, uint8_t op, uint8_t idn,
query_upiu->trans_type = QUERY_REQUEST_UPIU; query_upiu->trans_type = QUERY_REQUEST_UPIU;
query_upiu->task_tag = utrd->task_tag; query_upiu->task_tag = utrd->task_tag;
query_upiu->data_segment_len = htobe16(length);
query_upiu->ts.desc.opcode = op; query_upiu->ts.desc.opcode = op;
query_upiu->ts.desc.idn = idn; query_upiu->ts.desc.idn = idn;
query_upiu->ts.desc.index = index; query_upiu->ts.desc.index = index;