]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ufs: Use 'TASK_TAG' to construct the ucd_req_ptr->header.dword_0
authorBhupesh Sharma <bhupesh.sharma@linaro.org>
Sun, 2 Jul 2023 19:09:12 +0000 (00:39 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 14 Jul 2023 19:21:08 +0000 (15:21 -0400)
Instead of using the hard-coded value of 0x1f, use 'TASK_TAG'
macro instead to construct the ucd_req_ptr->header.dword_0

This is in sync with what the Linux UFS driver does, i.e.
set the byte0 equal to TASK_TAG (see [1]).

Setting it to a fixed value of 0x1f is wrong as we define
TASK_TAG as 0 inside u-boot ufs framework. So, instead we
should  use the macro value directly.

[1]. https://github.com/torvalds/linux/blob/master/drivers/ufs/core/ufshcd.c#L2705

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
drivers/ufs/ufs.c

index 8dd29edd3de8d503ce41cc28545a057d0a53e886..3bf1a95e7f2210e5c18d96e8cae8072277494262 100644 (file)
@@ -775,7 +775,7 @@ static inline void ufshcd_prepare_utp_nop_upiu(struct ufs_hba *hba)
 
        /* command descriptor fields */
        ucd_req_ptr->header.dword_0 =
-                       UPIU_HEADER_DWORD(UPIU_TRANSACTION_NOP_OUT, 0, 0, 0x1f);
+                       UPIU_HEADER_DWORD(UPIU_TRANSACTION_NOP_OUT, 0, 0, TASK_TAG);
        /* clear rest of the fields of basic header */
        ucd_req_ptr->header.dword_1 = 0;
        ucd_req_ptr->header.dword_2 = 0;