Received: by 10.223.185.116 with SMTP id b49csp275319wrg; Tue, 20 Feb 2018 21:08:07 -0800 (PST) X-Google-Smtp-Source: AH8x226OrDI36GKq+rDrBAGXdVrHHIqRdnYJJAezn+bkBj5jBdM0hqo0P8N/HvmfL3ihZrx5MPPf X-Received: by 10.98.41.194 with SMTP id p185mr2095501pfp.38.1519189686900; Tue, 20 Feb 2018 21:08:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519189686; cv=none; d=google.com; s=arc-20160816; b=k9Qm8jZJIF395/huIwrkeHFW+yZjlX9sYPSKLIciO3V17nZP4U/mWw+lmpi/vZxY9G t9/kja8kC5JiqlvNKB6hbUxqJ3s2Y4QHiz8N94VfYF2DO4TLYbST83mVUOnyD2ldlJLw qy/kijzmD9C//MNnQMeNehp1qFk+PCiE/B/rhqWmvXt4n6VdKupGYR/KJcF7skLymvm2 CjCe6lmrSR2sqGyHkSrxHMb8Rdiuzs6OmkabsORMXA/Dxj7pONFXh+7u9FXx3KnbQEps 0kPD0dYfRKUD2X+Q0duWjUMhN2F6BlAD19zNVb13ecQlgFPfg2qO43FkjdNXfTodpoGJ BcFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=8bCTnBvoQaGr9oTSrrVplRUk2zYUPKs5MjJxvVKGN3o=; b=fEgmDDX5T0ES2hT5cTwK9BabQ7IJPuoNc8VDtkr57K4ELi+QYmhnl+YnSlPxCBFajn sALdpwEQueOrw08pGUPOy2gJcPi6xH29EP7iWAV/zf6WK+zLGitNkW75LF5l5Kth7S0o 4wHWvCJ/yLjwcpyCc8saJ0QifFiO6/hWbHjY0+ArczEh75vaRascBwOleaW/84/dZQEN tLOMjxFX0dwU624stLfaXZZWUQR6GKDFeoi2BTE9szVii9SnzjarBomaOi1ySRYSn9uL lLnLnUF4msqf9FXXwevlJoOttidYPTvIWzli4vYG0SYkoWsMJfu8wFpQSOUQJh7Rt94M aQLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7-v6si871272pln.220.2018.02.20.21.07.52; Tue, 20 Feb 2018 21:08:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751507AbeBUFHI (ORCPT + 99 others); Wed, 21 Feb 2018 00:07:08 -0500 Received: from alexa-out-tai-02.qualcomm.com ([103.229.16.227]:54422 "EHLO alexa-out-tai-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751461AbeBUFHF (ORCPT ); Wed, 21 Feb 2018 00:07:05 -0500 X-IronPort-AV: E=Sophos;i="5.46,542,1511798400"; d="scan'208";a="1477" Received: from ironmsg02-tai.qualcomm.com ([10.249.140.7]) by alexa-out-tai-02.qualcomm.com with ESMTP; 21 Feb 2018 12:57:33 +0800 X-IronPort-AV: E=McAfee;i="5900,7806,8810"; a="2386722" Received: from asutoshd-linux.qualcomm.com ([10.206.24.163]) by ironmsg02-tai.qualcomm.com with ESMTP; 20 Feb 2018 20:56:49 -0800 Received: by asutoshd-linux.qualcomm.com (Postfix, from userid 92687) id 45F472378; Wed, 21 Feb 2018 10:26:48 +0530 (IST) From: Asutosh Das To: subhashj@codeaurora.org, cang@codeaurora.org, vivek.gautam@codeaurora.org, rnayak@codeaurora.org, vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, Yaniv Gardi , Asutosh Das , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/9] scsi: ufs: Allowing power mode change Date: Wed, 21 Feb 2018 10:26:32 +0530 Message-Id: <70df05c82a8624987c76b16c65143f00a111c94d.1519120988.git.asutoshd@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yaniv Gardi Due to M-PHY issues, moving from HS to any other mode or gear or even Hibern8 causes some un-predicted behavior of the device. This patch fixes this issues. Signed-off-by: Yaniv Gardi Signed-off-by: Subhash Jadavani Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufshcd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 011c336..d74d529 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -4167,9 +4167,13 @@ static int ufshcd_link_startup(struct ufs_hba *hba) goto out; } while (ret && retries--); - if (ret) + if (ret) { /* failed to get the link up... retire */ goto out; + } else { + ufshcd_dme_set(hba, UIC_ARG_MIB(TX_LCC_ENABLE), 0); + ufshcd_dme_set(hba, UIC_ARG_MIB(TX_LCC_ENABLE), 1); + } if (link_startup_again) { link_startup_again = false; -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.