Message ID | 1646893098-98552-1-git-send-email-kwmad.kim@samsung.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 200C6C433F5 for <linux-scsi@archiver.kernel.org>; Thu, 10 Mar 2022 06:19:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239734AbiCJGUl (ORCPT <rfc822;linux-scsi@archiver.kernel.org>); Thu, 10 Mar 2022 01:20:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231303AbiCJGUj (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Thu, 10 Mar 2022 01:20:39 -0500 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B3CB12B754 for <linux-scsi@vger.kernel.org>; Wed, 9 Mar 2022 22:19:37 -0800 (PST) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20220310061935epoutp041c54d34a06e66d325fcdc326f885a603~a8J4gJUvM3226332263epoutp04L for <linux-scsi@vger.kernel.org>; Thu, 10 Mar 2022 06:19:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20220310061935epoutp041c54d34a06e66d325fcdc326f885a603~a8J4gJUvM3226332263epoutp04L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1646893175; bh=guf5a+UyXn8Tu3/RRFV+ifGaLBDshbdYgxhEy4V5WMs=; h=From:To:Cc:Subject:Date:References:From; b=g4o5nkmAqWxLl0Iopbm3S6gxENbeoBbZdb/9OPHq1Tzfmskr9a+gYZRYWbpWAt8Dj 4QTsKvqBFR9EYKAYL3dpus1CrFrqzouUAEWB7UVSH5xyStOyPx2yRDEw9t8a3CZZ7V n2iLRvBsGUhxr+yHoxkAJRcW5TvQ/OGChNfp0DKY= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20220310061934epcas2p4486b158734486aaa2a2b91dfcaf01157~a8J3zhsNK2336423364epcas2p4o; Thu, 10 Mar 2022 06:19:34 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.92]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4KDf6V1tQHz4x9QL; Thu, 10 Mar 2022 06:19:30 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id CE.42.33036.07899226; Thu, 10 Mar 2022 15:19:28 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20220310061928epcas2p4f8369b836f37ca7e9882617292dc983d~a8Jxrtgrh2410224102epcas2p4J; Thu, 10 Mar 2022 06:19:28 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220310061928epsmtrp25f52fb97bcf7a2deb873beeec151f2f8~a8JxqlrfI2149121491epsmtrp2e; Thu, 10 Mar 2022 06:19:28 +0000 (GMT) X-AuditID: b6c32a48-511ff7000000810c-4d-622998706468 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 2D.09.03370.07899226; Thu, 10 Mar 2022 15:19:28 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [12.36.155.120]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220310061928epsmtip205d072694d49b4fa9b891097de062d3f~a8JxdyRs10557005570epsmtip29; Thu, 10 Mar 2022 06:19:28 +0000 (GMT) From: Kiwoong Kim <kwmad.kim@samsung.com> To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com, martin.petersen@oracle.com, beanhuo@micron.com, cang@codeaurora.org, adrian.hunter@intel.com, sc.suh@samsung.com, hy50.seo@samsung.com, sh425.lee@samsung.com, bhoon95.kim@samsung.com, vkumar.1997@samsung.com Cc: Kiwoong Kim <kwmad.kim@samsung.com> Subject: [PATCH v3] scsi: ufs: exclude UECxx from SFR dump list Date: Thu, 10 Mar 2022 15:18:18 +0900 Message-Id: <1646893098-98552-1-git-send-email-kwmad.kim@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphk+LIzCtJLcpLzFFi42LZdljTXLdghmaSwZSZhhYnn6xhs3gwbxub xcufV9ksDj7sZLH4uvQZq8Wn9ctYLVYvfsBisejGNiaLm1uOslhc3jWHzaL7+g42i+XH/zFZ dN29wWix9N9bFos79z+yOPB7XO7rZfJYvOclk8eERQcYPb6v72Dz+Pj0FotH35ZVjB6fN8l5 tB/oZgrgiMq2yUhNTEktUkjNS85PycxLt1XyDo53jjc1MzDUNbS0MFdSyEvMTbVVcvEJ0HXL zAG6XkmhLDGnFCgUkFhcrKRvZ1OUX1qSqpCRX1xiq5RakJJTYF6gV5yYW1yal66Xl1piZWhg YGQKVJiQnTFp9kr2gjaeir835rE1MJ7h7GLk4JAQMJE4PDWui5GLQ0hgB6PE3Q1HWCGcT4wS V76vZoZwPjNKTN/fxNjFyAnW8exkF1RiF6NEz4k3jBDOD0aJdT2f2EGq2AQ0JZ7enMoEYosI XGeSmLc9A8RmFlCX2DXhBFhcWMBeom/tO1aQO1gEVCUOHwEr4RVwlTjYdoIVYpmcxM1znWDL JAQaOSQ+9PxlgUi4SDza+o4ZwhaWeHV8CzuELSXx+d1eNojfiiU27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N/ad0DdHBwsAqoSh49kgIR5BVwlDradYIVYICdx81wn8wRG ngWMDKsYJVMLinPTc4sNC4zyUsv1ihNzi0vz0vWS83M3MYKDVktrB+OeVR/0DjEycTAeYpTg YFYS4W0K1UgS4k1JrKxKLcqPLyrNSS0+xCjNwaIkznuh62S8kEB6YklqdmpqQWoRTJaJg1Oq gankPIN7xcPEnpVl1WsOztuUtPPe07ubT/+6Zlmj+HJDumCtw5I2dlmf0m8L4n3Wex03k07y z3bK3yKrcMM6pMy8pbba/2z9z2nvMttNWrkbubOOrufJzv7MuyU3W5Rz0X7rO/ENIg3HFRs3 X99+eEN24nPmD7af59z8EeKW/aDo1OFKZfGFzKfaPk59qhGSv85TrE4sQHJu7Zys7qadmr/f yt977dU1tbKIV3j57DP+1Xum9fwRrg+QMDE1CeVLyv79iv2mlZKNc/zpmAnyjifrzmz/uNhv hvxSiYTvX1f86uLhe7M+K8ba6qBl61+nac7HrVerJG+YkG6/afb586sc1hbybFx23816TvcW cSWW4oxEQy3mouJEAIzky5PJAgAA X-CMS-MailID: 20220310061928epcas2p4f8369b836f37ca7e9882617292dc983d X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220310061928epcas2p4f8369b836f37ca7e9882617292dc983d References: <CGME20220310061928epcas2p4f8369b836f37ca7e9882617292dc983d@epcas2p4.samsung.com> Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org |
Series |
[v3] scsi: ufs: exclude UECxx from SFR dump list
|
expand
|
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 460d2b4..7f2a1ed 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -115,8 +115,13 @@ int ufshcd_dump_regs(struct ufs_hba *hba, size_t offset, size_t len, if (!regs) return -ENOMEM; - for (pos = 0; pos < len; pos += 4) + for (pos = 0; pos < len; pos += 4) { + if (offset == 0 && + pos >= REG_UIC_ERROR_CODE_PHY_ADAPTER_LAYER && + pos <= REG_UIC_ERROR_CODE_DME) + continue; regs[pos / 4] = ufshcd_readl(hba, offset + pos); + } ufshcd_hex_dump(prefix, regs, len); kfree(regs);
v2 -> v3: add fixes v1 -> v2: does skipping only for zero offset These are ROC type things that means their values are cleared when the SFRs are read. They are usually read in ISR when an UIC error occur. Thus, their values would be zero at many cases. And there might be a little bit risky when they are read to be cleared before the ISR reads them, e.g. the case that a command is timed-out, ufshcd_dump_regs is called in ufshcd_abort and an UIC error occurs at the nearly same time. In this case, ISR will be called but UFS error handler will not be scheduled. This patch is to make UFS driver not read those SFRs in the dump function, i.e. ufshcd_dump_regs. Fixes: d67247566450 ("scsi: ufs: Use explicit access size in ufshcd_dump_regs") Signed-off-by: Kiwoong Kim <kwmad.kim@samsung.com> --- drivers/scsi/ufs/ufshcd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)