From patchwork Tue Dec 6 03:25:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: subhashj@codeaurora.org X-Patchwork-Id: 9461957 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2CE0860236 for ; Tue, 6 Dec 2016 03:26:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C5A028306 for ; Tue, 6 Dec 2016 03:26:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 110132832B; Tue, 6 Dec 2016 03:26:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9014D28306 for ; Tue, 6 Dec 2016 03:26:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752172AbcLFD0A (ORCPT ); Mon, 5 Dec 2016 22:26:00 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:42588 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751500AbcLFDZ7 (ORCPT ); Mon, 5 Dec 2016 22:25:59 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id DE9856166C; Tue, 6 Dec 2016 03:25:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1480994748; bh=u/3i8KYipXlOejDkzPZ+CeUVBHOnHWQxU7+zl5teKxA=; h=From:To:Cc:Subject:Date:From; b=EQSDm4PGIqVxUu59WUOc4vYX4IEF+bwbS1GGXDdPF5angCGzU/aNdJXSPokESm3Dd R1XBq5fbznf6J6jBGaRzdVPOZk4K4xp4qsxmJ0zc6OCP1L/6gokQVeGhZFeou8cohk wy1TqQgri2cCtAmddfLotPPLKrM+9AAIQtwZnens= Received: from pacamara-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: subhashj@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 85E5661653; Tue, 6 Dec 2016 03:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1480994748; bh=u/3i8KYipXlOejDkzPZ+CeUVBHOnHWQxU7+zl5teKxA=; h=From:To:Cc:Subject:Date:From; b=EQSDm4PGIqVxUu59WUOc4vYX4IEF+bwbS1GGXDdPF5angCGzU/aNdJXSPokESm3Dd R1XBq5fbznf6J6jBGaRzdVPOZk4K4xp4qsxmJ0zc6OCP1L/6gokQVeGhZFeou8cohk wy1TqQgri2cCtAmddfLotPPLKrM+9AAIQtwZnens= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 85E5661653 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=subhashj@codeaurora.org From: Subhash Jadavani To: vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, Subhash Jadavani , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v1 4/4] scsi: ufs-qcom: fix bug with read/modify write of UFS_CFG1 Date: Mon, 5 Dec 2016 19:25:42 -0800 Message-Id: <1480994742-19737-1-git-send-email-subhashj@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ufs_qcom_print_hw_debug_reg_all() function is having a bug where it might incorrectly modify undesired bits in UFS_CFG1 register, this change fixes it. Reviewed-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs-qcom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index 2943a68..abe6173 100644 --- a/drivers/scsi/ufs/ufs-qcom.c +++ b/drivers/scsi/ufs/ufs-qcom.c @@ -1470,7 +1470,8 @@ static void ufs_qcom_print_hw_debug_reg_all(struct ufs_hba *hba, reg = ufs_qcom_get_debug_reg_offset(host, UFS_UFS_DBG_RD_PRDT_RAM); print_fn(hba, reg, 64, "UFS_UFS_DBG_RD_PRDT_RAM ", priv); - ufshcd_writel(hba, (reg & ~UFS_BIT(17)), REG_UFS_CFG1); + /* clear bit 17 - UTP_DBG_RAMS_EN */ + ufshcd_rmwl(hba, UFS_BIT(17), 0, REG_UFS_CFG1); reg = ufs_qcom_get_debug_reg_offset(host, UFS_DBG_RD_REG_UAWM); print_fn(hba, reg, 4, "UFS_DBG_RD_REG_UAWM ", priv);