Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3652857pxb; Mon, 16 Nov 2020 23:07:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUM9MH1V9XModD246r+5pTmjENGb1WzKrQ9IH55NpeANlUQFEOLPRndxIgZ556QWJ9tZ4x X-Received: by 2002:a50:c19a:: with SMTP id m26mr18603427edf.302.1605596862547; Mon, 16 Nov 2020 23:07:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605596862; cv=none; d=google.com; s=arc-20160816; b=mS4jY2lGx7UGGXr0J3wzE8LWY0a+rlJ6ZPa5+C6nkakuofpYFMGWdxg3gSQclj2/NP Pl16cNomljoiv4PhGXhEiUai/5nRcGgaol2RFtuMHz64zzrtp/SUztqzIlHpAoxWHmKy TKs4mJ7p/fi1ATNgLWgrD+Zq41zTJ8KSdeUBDko5/zpDp0F70iA/UddeOR8xC0X5zRW6 lPaAVnsCf45Vn8kjUhNBkoH2M5ZSnK2NCE26zQEF8/AzQ7kMVK5sZUm9iUHtVdB6WmaI 8tC1M2KW1lc3TxLkxIOd5zBY/1MJv2Oh/yDiX39ugPQXl5A7QgdUWl4y6fef9bgSRDXv 4Txw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:ironport-sdr; bh=h4rAlfpp7ZwUYuEHQbbFhHXxpPWDxpk/BJkUcbkKH44=; b=EFCOlgFbICn6I+l94xTXP67+UczyW46dBLcqFUhPVNHseBaaTOA/fZPVAjkUSELgKI XjdtIcc+7djCxkj2zd6G1X1Yx2JSiGuzZINyqVummaG2Pg1gJ7x9MyZkhTLZExp+YjOv 9h0x0P8lW5sHOT34gOkbtl4JfG8bWVsT6ObFLOZsneHMJmMptNqzbtJwE1L7PPSm9NnO FVwBk1ynJtMyOBL8RfU4n8ATOLPLBO9hmWSThCUAaIUf3lFiHw7BexIKejO/wK6zynoB WpKBLZtoL6N6B2b3+RlBjtCo1x1qL4pa3lMfEtj7UVlKbgBE+LVeZ/vJPN6Qz/zl7ssK 3cjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn17si88287ejb.292.2020.11.16.23.07.20; Mon, 16 Nov 2020 23:07:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726648AbgKQHEk (ORCPT + 99 others); Tue, 17 Nov 2020 02:04:40 -0500 Received: from labrats.qualcomm.com ([199.106.110.90]:26986 "EHLO labrats.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725792AbgKQHEk (ORCPT ); Tue, 17 Nov 2020 02:04:40 -0500 IronPort-SDR: DH8PTV49Co+O8YM5bEM+C47FWbs58QyJqIqeqXBIpcrJXBARY7GoNHkSrBNwquk+8/BdFqxf13 EJUQEEBLXTGkA2r2IH/JUEZ0lUYYtzzQu4KjnEuhohwijysQk6hitOdkVlFyggF37zboZFTxCx MLLWtfvVHiTclSpDduNdKzebn3zNgoKg2+yRGDT50dQLyou0ONjkjLPs4f7IU8AB7cgiwXp3iu bg25XlblB3iAJyhSJW0MjolHFvU1CNUXQYkklhBrqigTwSCKepwKLkco1Ujkoribh1cFmN+hDl 3Zs= X-IronPort-AV: E=Sophos;i="5.77,484,1596524400"; d="scan'208";a="47474919" Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by labrats.qualcomm.com with ESMTP; 16 Nov 2020 23:04:39 -0800 X-QCInternal: smtphost Received: from wsp769891wss.qualcomm.com (HELO stor-presley.qualcomm.com) ([192.168.140.85]) by ironmsg04-sd.qualcomm.com with ESMTP; 16 Nov 2020 23:04:39 -0800 Received: by stor-presley.qualcomm.com (Postfix, from userid 359480) id 411E52181A; Mon, 16 Nov 2020 23:04:39 -0800 (PST) From: Can Guo To: asutoshd@codeaurora.org, nguyenb@codeaurora.org, hongwus@codeaurora.org, ziqichen@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, cang@codeaurora.org Cc: Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , Bart Van Assche , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 3/3] scsi: ufs: Print host regs in IRQ handler when AH8 error happens Date: Mon, 16 Nov 2020 23:04:19 -0800 Message-Id: <1605596660-2987-4-git-send-email-cang@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1605596660-2987-1-git-send-email-cang@codeaurora.org> References: <1605596660-2987-1-git-send-email-cang@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When AH8 error happens, all the regs and states are dumped in err handler. Sometime we need to look into host regs right after AH8 error happens, which is before leaving the IRQ handler. Signed-off-by: Can Guo --- drivers/scsi/ufs/ufshcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index cd7394e..a7857f6 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6057,7 +6057,8 @@ static irqreturn_t ufshcd_check_errors(struct ufs_hba *hba) hba->saved_uic_err |= hba->uic_error; /* dump controller state before resetting */ - if ((hba->saved_err & (INT_FATAL_ERRORS)) || + if ((hba->saved_err & + (INT_FATAL_ERRORS | UFSHCD_UIC_HIBERN8_MASK)) || (hba->saved_uic_err && (hba->saved_uic_err != UFSHCD_UIC_PA_GENERIC_ERROR))) { dev_err(hba->dev, "%s: saved_err 0x%x saved_uic_err 0x%x\n", -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.