Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp63970pxu; Tue, 24 Nov 2020 18:53:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwIFUwTPli4jI3uHNqkhM0xnS6Q6teI46KxUpyvQxh9G84geM1a/BDP+df3ddfcluX0fupy X-Received: by 2002:a05:6402:114c:: with SMTP id g12mr1470901edw.167.1606272833500; Tue, 24 Nov 2020 18:53:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606272833; cv=none; d=google.com; s=arc-20160816; b=CbWB/3TY/cTi7Ov5ezaDzSmSUS+Uj37VgAw3j9Wic+D/iX7eXiCawepX3m/Pg3xbbl 8n8KAx6I3LE714Sf11iq3G36vhc4Wid1c3N5rlD5bQLzWLi0zYGS8QUVeHkjllu0F9Vs hetE77Xuh17ITv/NZbv3vl6sKxtO/O7vvRJZcRbiQJF5mfmDBBXEjvI34ud6d8gUbZTw IZB0G9HTYt7bWnVuD19tF2VCm8384qTWPuZ5fVOsQkn2B9f/S8My2E4dr5LSx3DHutK0 P4QyM2I4wRELw2Ut67jYXdkP9q8q1HmZFeIll/Iq8hPDkCXzXgjV0HSdvi2uAu8ojWIA /FqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=sFLwE4i7qr91FfwxeSgxMVVdUyIcwQaISzIConS8/58=; b=t38HoEmWQfrH8YZspcHfoBuusEIQRZFOA6RyTxFNMGwWsjV1kzCpX8HID/lsorhWNq 71myfSv3iaFYVnxs2ZrKHKIFS35PA7QZJC4eh7opAlRdD5+DLhsiIbz2oRkH7JyAZuUi DFgn+4wc56hFp1YVjQm+/HZCpedhAc0K6F6kJWVlLwrKmFj5iZbAAkTms+/3y9YRnqt5 edEUojRWFIHg+cUXrqPmV2LhtnrgXyuK+s8GpzJjGgnA4skrITgEK04wIv1QDs5Fsj8d qM2wX+ilrC1Wgu8ernzYqmVMP23t4ioc3hb7BhQ6WucMuWLTYkPnb1tctCmQB5RnPIYg lh9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=j9Vuf8lB; 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 qu18si484805ejb.438.2020.11.24.18.53.31; Tue, 24 Nov 2020 18:53:53 -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; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=j9Vuf8lB; 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 S1726709AbgKYCvn (ORCPT + 99 others); Tue, 24 Nov 2020 21:51:43 -0500 Received: from m42-4.mailgun.net ([69.72.42.4]:33161 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbgKYCvn (ORCPT ); Tue, 24 Nov 2020 21:51:43 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1606272702; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=sFLwE4i7qr91FfwxeSgxMVVdUyIcwQaISzIConS8/58=; b=j9Vuf8lBOcK8LmP7uOQKdWCb6KfAVD6YYIo0TiQtJ6yacdKQLhRWhKWGwarIv8JvIwikRb3v VCt+gH5FI+QfRmh1WwesW+2CkMZKeAAYqgz3sh1hEhZdXqX8ySFT76i2YBHASQYK68e5J6MM 7KAMV9VxxNCbQs+UDc+X2964was= X-Mailgun-Sending-Ip: 69.72.42.4 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-west-2.postgun.com with SMTP id 5fbdc6b91dba509aaebb0900 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 25 Nov 2020 02:51:37 GMT Sender: hongwus=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id EE8D9C43460; Wed, 25 Nov 2020 02:51:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: hongwus) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1B3D3C433C6; Wed, 25 Nov 2020 02:51:35 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 25 Nov 2020 10:51:35 +0800 From: hongwus@codeaurora.org To: "Asutosh Das (asd)" Cc: Can Guo , nguyenb@codeaurora.org, ziqichen@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , Bart Van Assche , open list , asutoshd=codeaurora.org@codeaurora.org Subject: Re: [PATCH v3 3/3] scsi: ufs: Print host regs in IRQ handler when AH8 error happens In-Reply-To: <1b2aacf0-ebc2-e541-2db5-2d595b4b392f@codeaurora.org> References: <1605596660-2987-1-git-send-email-cang@codeaurora.org> <1605596660-2987-4-git-send-email-cang@codeaurora.org> <1b2aacf0-ebc2-e541-2db5-2d595b4b392f@codeaurora.org> Message-ID: X-Sender: hongwus@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-11-18 01:23, Asutosh Das (asd) wrote: > On 11/16/2020 11:04 PM, Can Guo wrote: >> 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 >> --- > > Reviewed-by: Asutosh Das > >> 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", >> Reviewed-by: Hongwu Su