From patchwork Sun Jul 2 19:09:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 698429 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp1426214wrs; Sun, 2 Jul 2023 12:09:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlERo8khO1MtrabN5oaufQi8VTwsGyDUUHeKBO1xiXnzIKA3MPoOGXw/a6dR4F7+FgMwJ/dW X-Received: by 2002:a5d:5444:0:b0:313:f1ec:f429 with SMTP id w4-20020a5d5444000000b00313f1ecf429mr6379372wrv.46.1688324975796; Sun, 02 Jul 2023 12:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688324975; cv=none; d=google.com; s=arc-20160816; b=LD4hKlsBtKXOzRybPTo/ytS4xXn0aJYd4u8s2sH8Xnv48dDLuqEuHivUsroQT9uOH8 phNVXbBMFealqtktuiTNemFKAyzK+pj0wA55MQiw/ekluY/fbSselWrY1vr9LQwITB7l qwxRNtaZvX1auqGeZttMo1qZsNFtCE30jQoPxlSPeXsUjr73FNuKrojv1193Zucl2bvR XcPjhvixUpg9+SJG+WtvSc1SEDUMp2sbGJZPY/lDr4IB97D9S3YYw3kUeJr9+b+XyVQQ f8g+HsFTB4exxqPhPWqghEE2f3Ji2/lM2JcK70HrBBzTh98hTfWvLfavaNU48Eqpmvfs 5N1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=ARkktuWvLnjrx/DQcIE/dmDats11G5bvQiLJAP4QzSs=; fh=cOZEznj+4pjxTE+heAY3xjle9AZ8W+QFbGNKtLrsyoA=; b=CsCSdu4bRlqZ74g4mYHfEzoirdedSxFLh1rbEel6PUWOvVck6JQti4A2PKbPBiKWPo EeCTNWnRxhscTPWGeoumywG6LNI3OgP34UwfwD1mc7WhFKUkmOycDImwlwJ/YnrX6OjK nlo5dFYVkn7xBVcnR7qJuQGN1upcChgRwZBnSFzGz9hz+voha2a987FQx+FAk1cOcXnQ kCOcf/22AdU16yG4WE4QAhvTFz3HFeTzoL+I0v1dfmgnsY+/0cJlDEbVIwBAxP6Sp5eZ bYbRcQpD7RIO9R5m1MI5TjQUTvYSeYlPYmpOotCvIhnPoOyfNtddlyNiMc9NO51t1neN ELww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XWETc1js; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id b16-20020a5d45d0000000b00314276e30d1si2883280wrs.325.2023.07.02.12.09.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jul 2023 12:09:35 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XWETc1js; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E64F686339; Sun, 2 Jul 2023 21:09:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="XWETc1js"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5C4478634D; Sun, 2 Jul 2023 21:09:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9F1F186093 for ; Sun, 2 Jul 2023 21:09:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bhupesh.sharma@linaro.org Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-55b1238cab4so1888289a12.2 for ; Sun, 02 Jul 2023 12:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688324967; x=1690916967; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ARkktuWvLnjrx/DQcIE/dmDats11G5bvQiLJAP4QzSs=; b=XWETc1jsCw+4wts7g2FzR8vsKT/yixP4QOYMLy3cs3q5rFr0T9Bx8AfjcKPeQuekFK 46axRdeJu9/3kN7/2XXBxyRKGG4HRBt6imZpyz1vifu15ef5yhTfWORGGLy/Isi34YnN CIGjldQKCTG5/KToFlo9hSaV7T8phZSYz7E6AodyLnLG3p1e6d6sKwoelMn1r2habYPX K20nwnDRMKZwVxT1SlzUXTbDXhRoQFq8gx8EAzyGo01WPHrfuh6fY7MoPHqV3DJpMtWx RoeuO4vY5n/Kibu4D6SZF/BxYD0vxWfnrAJnj8tfgBYGdFn7OkMHwhKbVJFlQpkSkJld BwhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688324967; x=1690916967; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ARkktuWvLnjrx/DQcIE/dmDats11G5bvQiLJAP4QzSs=; b=hW33mvIV/yzOxvgTY6dDNCRdnu7jCmwtXtMq4PGWQJb8TAnGCJdUKaYNPtncQmcOlc kU4vY6pZTEpZzU6QKxcWLgxa7jH23y6/eYfhuAjGOC1TNbEctWucyNQfCes667rc+NJr TAqoeLOUBztZspFvRCB7axZXF1Bl+GxGXhiJibf+DkBSXy5jXaU4Z2rx8S5qjK+0QdRm IznUGpuLBvjcMgSCxU7yJIRsteudyUKkskXRey+GyxaedRh+jfcm1b7Gn03lFEZz652R 5zOz8rM9Gm6xKvDd792AkyZR6p+JIpNCGM1bWB0U1hg1C1qyUVOi7W1lIOCKg4vE6HTr F1+g== X-Gm-Message-State: AC+VfDz38fH4PoiuhZVaI6L6mTz7eVWXyzuqEhdtgBkh8IMynawsQEV2 9DgFD+4BA/o5YV7TbtVXEOxABicqVW6ei7rwW90= X-Received: by 2002:a05:6a20:42a8:b0:117:3c00:77da with SMTP id o40-20020a056a2042a800b001173c0077damr9913790pzj.20.1688324967613; Sun, 02 Jul 2023 12:09:27 -0700 (PDT) Received: from localhost.localdomain ([223.233.68.54]) by smtp.gmail.com with ESMTPSA id c14-20020aa78c0e000000b0067b24701daasm9316234pfd.86.2023.07.02.12.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jul 2023 12:09:27 -0700 (PDT) From: Bhupesh Sharma To: u-boot@lists.denx.de Cc: faiz_abbas@ti.com, marek.vasut+renesas@mailbox.org, sjg@chromium.org, trini@konsulko.com, bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com Subject: [PATCH] ufs: Use 'TASK_TAG' to construct the ucd_req_ptr->header.dword_0 Date: Mon, 3 Jul 2023 00:39:12 +0530 Message-Id: <20230702190912.2559956-1-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean 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 --- drivers/ufs/ufs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c index 8dd29edd3d..3bf1a95e7f 100644 --- a/drivers/ufs/ufs.c +++ b/drivers/ufs/ufs.c @@ -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;