From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79358C73C7C for ; Wed, 10 Jul 2019 09:29:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4DED020838 for ; Wed, 10 Jul 2019 09:29:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hX2Z2IMJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DED020838 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5+YfIQixdgZRu6z+mThoHz5pocucfL9jh/Om76hK/ig=; b=hX2Z2IMJX3JQwX RXMIDzbz7pRkL8X9aXTxGtt9Q7oX3HJmPPvbI4Ncq2eajjIqlceK7eK3L8A1bRmJ3qpKEFF3lPbkp 4c2EtGp4F6WoaQEWwjoRZUc4CsIShjaOleeHFIvcy/mlLpfcfcWEIirirWgMv0EgOb/1scgSYje0E 0+xHGToyOYp5PO/gQsGv+1N9rL496xN0VEacQaQBpY1eeB3Cthqr2esjYEc6xMG/wpNV2DemauPDM cuNVKj3rjDEvovLK1zh+pZs+fPxed1WJhwHJKri7kzGkNlDkiQfDogaM26yzakapElEUO2kzBiBX5 PBs0e/qmcOA9ySiYyAXw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hl8ut-0001qX-Ib; Wed, 10 Jul 2019 09:29:35 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hl8uZ-0001on-Ag; Wed, 10 Jul 2019 09:29:30 +0000 X-UUID: 2ce05d5c6727429f872eda1f17152f2b-20190710 X-UUID: 2ce05d5c6727429f872eda1f17152f2b-20190710 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 379415551; Wed, 10 Jul 2019 01:29:00 -0800 Received: from mtkmbs08n2.mediatek.inc (172.21.101.56) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 10 Jul 2019 02:28:58 -0700 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 10 Jul 2019 17:28:56 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 10 Jul 2019 17:28:56 +0800 Message-ID: <1562750936.7235.3.camel@mtkswgap22> Subject: RE: [PATCH v2 4/4] scsi: ufs: Add history of fatal events From: Stanley Chu To: Avri Altman Date: Wed, 10 Jul 2019 17:28:56 +0800 In-Reply-To: References: <1562736017-29461-1-git-send-email-stanley.chu@mediatek.com> <1562736017-29461-5-git-send-email-stanley.chu@mediatek.com> X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-TM-SNTS-SMTP: 5119A67BB2928397B5A654C3EA45125DE60CF336EA6D500ED74F4F4ACE9CE82C2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190710_022921_637422_15F1DF06 X-CRM114-Status: GOOD ( 13.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "sthumma@codeaurora.org" , "linux-scsi@vger.kernel.org" , "martin.petersen@oracle.com" , "marc.w.gonzalez@free.fr" , "andy.teng@mediatek.com" , "chun-hung.wu@mediatek.com" , "kuohong.wang@mediatek.com" , "peter.wang@mediatek.com" , "evgreen@chromium.org" , "subhashj@codeaurora.org" , "linux-mediatek@lists.infradead.org" , "ygardi@codeaurora.org" , "alim.akhtar@samsung.com" , "matthias.bgg@gmail.com" , "pedrom.sousa@synopsys.com" , "linux-arm-kernel@lists.infradead.org" , "beanhuo@micron.com" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Avri, On Wed, 2019-07-10 at 08:04 +0000, Avri Altman wrote: > Hi Stanley, > > > + (u32)ret); > > goto out; > > + } > > } while (ret && retries--); > > > > if (ret) > Here also link startup fails... Thanks! Will track this place as well in next version. > > * ufshcd_update_uic_error - check and set fatal UIC error flags. > > * @hba: per-adapter instance > > @@ -6043,6 +6056,7 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) > > */ > > scsi_print_command(hba->lrb[tag].cmd); > > if (!hba->req_abort_count) { > > + ufshcd_update_reg_hist(&hba->ufs_stats.task_abort_err, > > 0); > Here you are collecting abort events statistics, not abort errors. > If this is what you meant, then it's not task_abort_err, but task_abort. > And if indeed you are tracking task aborts, maybe add lun resets as well? Good suggestion! I would add history of lun reset and host reset as well in next version. > > diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h > > index c6ec5c749ceb..f9f109da7f18 100644 > > --- a/drivers/scsi/ufs/ufshcd.h > > +++ b/drivers/scsi/ufs/ufshcd.h > > @@ -438,6 +438,10 @@ struct ufs_err_reg_hist { > > * @dme_err: tracks dme errors > > * @fatal_err: tracks fatal errors > > * @auto_hibern8_err: tracks auto-hibernate errors > > + * @tsk_abort_err: tracks task abort events > > + * @linkup_err: tracks link-startup fail events > > + * @suspend_err: tracks suspend fail events > > + * @resume_err: tracks resume fail events > > */ > > struct ufs_stats { > > u32 hibern8_exit_cnt; > > @@ -453,6 +457,12 @@ struct ufs_stats { > > /* fatal errors */ > > struct ufs_err_reg_hist fatal_err; > > struct ufs_err_reg_hist auto_hibern8_err; > > + > > + /* fatal events */ > Maybe move here fatal_err as well? OK! these could be classified as fatal errors as well. Will fix them in next version. > > > + struct ufs_err_reg_hist task_abort_err; > > + struct ufs_err_reg_hist link_startup_err; > > + struct ufs_err_reg_hist suspend_err; > > + struct ufs_err_reg_hist resume_err; > > }; > > > > /** > > -- > > 2.18.0 > > > Thanks, > Avri > Thanks, Stanley _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel