Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp98443pxu; Tue, 24 Nov 2020 20:20:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1e4hm4fc7Ump9BH9it8k9r/0ZJhIoBQnuzDdwInsEUrc3PFmjMPeYMV4evuAzm2bYg+SZ X-Received: by 2002:a05:6402:1243:: with SMTP id l3mr1654189edw.151.1606278011254; Tue, 24 Nov 2020 20:20:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606278011; cv=none; d=google.com; s=arc-20160816; b=MDt6TUyzFf8yR+qm4lON5vDwWBYnvOiJ5pDFa1jNBJ9HdWGgfrI6YPq1xsl8R1+MpO 3EvMHbhzZSqlQF/qAfryFGx1IVdKig5/Si59VwCs4wxZdz8LFswvxEwMLzTq9RgjkFaJ Y77ybJWYJeN32DI31WGgjRIggHKZWhx+Z7kHdUhw0gtJQQ2j6mUNuEoPpPYER4iLte+J KFgrO8ydY1Pq3YO34XxOSJkzqeolLZe+PeYwPdFagn7ZLmuu+wb5gSS17Qe1xkuSPfgg DqW2cc51h/9m15Uo0v6RWONUKpBzXS1SoEhFcL2sPNjfU1q19vRbiNdk9L2GiT3ofdRw E3oQ== 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=sXXeHQcnq6lCeXEsk4jZuctTNRCfX/sdc8ME9NH6fks=; b=pOfoaZ1l9FoiMkshIVGy8xfcIF7NVgRJe69wNkfKECyaRgbV1YUJXbh2opHmiWZ4dC gVO2vQwLfsE4ZiN46fSkRUPW1RpH4b51ACP6RNMIDUf9XCsvzs2UHqXc1sTsu7SvEIPj UpuG/4r9QWEcFwBZ/9lbiV6RPzQllo0hyAkEUUPgXF3tdcj97TY3Y5bCEGkUf46im+yc 9eR5Jl6rAjNabvbQ0bibj1V/aXyHxx5wB0MrhokBzFOwXmnsLnPryqu9pVzPFLBRntSq 0U5W5Izt7pORA0bldDXgsIBo6k9fJVBLvStUB3zTMr9nHtd4MwsSmCR8ERG2n8x6H/+s NjuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=iRG9t8f0; 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 h14si584789ejc.179.2020.11.24.20.19.48; Tue, 24 Nov 2020 20:20:11 -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=iRG9t8f0; 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 S1727193AbgKYESH (ORCPT + 99 others); Tue, 24 Nov 2020 23:18:07 -0500 Received: from z5.mailgun.us ([104.130.96.5]:19520 "EHLO z5.mailgun.us" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbgKYESH (ORCPT ); Tue, 24 Nov 2020 23:18:07 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1606277886; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=sXXeHQcnq6lCeXEsk4jZuctTNRCfX/sdc8ME9NH6fks=; b=iRG9t8f06tPeMkVrVVV5vClEOGv5a28tXaMvYcyYNzk3iQPS7gbP1EQtUOjbDSDQ/X+7oDhy 7ifFcs0sk1V38AIAgpfa4iszemXwOyOTRrYT8wWlC4YcP3PrspsUaItpJ8Cpe+4mst/34eFV l3SZ2ADnJDV0RUTVeCmu5A4Qbs4= X-Mailgun-Sending-Ip: 104.130.96.5 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-n06.prod.us-west-2.postgun.com with SMTP id 5fbddaf922377520eea23332 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 25 Nov 2020 04:18:01 GMT Sender: nguyenb=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id EB302C43467; Wed, 25 Nov 2020 04:18:00 +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: nguyenb) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1678DC433ED; Wed, 25 Nov 2020 04:17:59 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 24 Nov 2020 20:17:59 -0800 From: nguyenb@codeaurora.org To: Can Guo Cc: asutoshd@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, Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , Bart Van Assche , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/3] scsi: ufs: Print host regs in IRQ handler when AH8 error happens In-Reply-To: <1605596660-2987-4-git-send-email-cang@codeaurora.org> References: <1605596660-2987-1-git-send-email-cang@codeaurora.org> <1605596660-2987-4-git-send-email-cang@codeaurora.org> Message-ID: X-Sender: nguyenb@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-11-16 23:04, 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 > --- > 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: Bao D. Nguyen