Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2178440iof; Tue, 7 Jun 2022 22:19:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymuIlS1Bp/PH+1MZeEN2tiotuFOH4JZKuCnI3/L8Ez7VypqeDUr+HuH5D7ZNEyZpl9Lvna X-Received: by 2002:a63:5:0:b0:3fe:2558:677 with SMTP id 5-20020a630005000000b003fe25580677mr2765853pga.113.1654665559868; Tue, 07 Jun 2022 22:19:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654665559; cv=none; d=google.com; s=arc-20160816; b=AosiBr9VlUpAKODxvarv3c2G4h+yLh7o74rqW/Vzyfhfa7kMxu96P0I8+4N6lBuk3z mjgvD8oY/jXadIdkS4p9PUrmyNQHPlWPu7GS3j7ZimKSU/EHkfsuseSdXpLsdqGqD3sw uvlTxPu7HEPhk6gud2nTNcSNnWI/A7vbZ/irbLn6rRRterN1WE+GBsPgIHzMcdSxexj0 W3M9OAJYe6FUJwCbfbrTQedYKYgjZfzxPVgD9E5okS1f4PSHYQnxnDlCgpBqxeX3NPkF S+jNgivVnVDTV1QeMdIcnlyVn1akRj1mPjvZ8AzAgawvNsV0U0cGTmVEI+2dj7/4KIJK wVeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=j+T1yWBj3pcxnT254vgyDX1DaYw0KplArdUINpTGd/E=; b=OPO3RmFSMDJ+VDYm5/eIJIu1Xm5ienspjQ5859r0/kSfBXFExdI4GXX9vEBquVrwl2 RG49h6hk2WRPjChC2OMCcS0id96Y08AGpyPQI9K6ethM7T89LtYBdhMGktykpgcuWx3O lvSwIZfHGOWaenVDLEVy9sConWXSz0tuL31yY5BK+4Te1nu9y8XNPDU3byi5NMOiviry gBQfAiESvfYYxesyqoij0JJ0iUbWQ/XnAU77odkRG+z1RCgzQh1yrLh64qtqH2IXE8jJ Cj9htn9XNEVMohxtauAKtZl8bPFClXWyLuCmDOTZ+kzqybFNlGf906l0HufBFBI7YJ3h b3iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="v7Lb/cUg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id ay37-20020a056a00302500b004fa3a8e003fsi8561762pfb.246.2022.06.07.22.19.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:19:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="v7Lb/cUg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B1E5E4879C0; Tue, 7 Jun 2022 21:57:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348319AbiFGRkq (ORCPT + 99 others); Tue, 7 Jun 2022 13:40:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347561AbiFGRav (ORCPT ); Tue, 7 Jun 2022 13:30:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92E9CB0A4C; Tue, 7 Jun 2022 10:27:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2F0E66141D; Tue, 7 Jun 2022 17:27:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F67DC385A5; Tue, 7 Jun 2022 17:27:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622849; bh=wbPLNB7i+1qRZZ5B3n4nz+LdfvHLayxTrkUR/2OUnQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v7Lb/cUgWlH1w9LCgcGqjtxIuIEhY89za3Lnsr+aqkVZGowGy5W+H50CT61XJ1PIB a/pab3FCGf/Gp7HoxtJzE2qz+ZO78KsFXgSCylFGFNjxVPv81ddfFx4f1TSFweGUNE QBCcZ29X81O2C3eX70lu/9djtaV/Lsy+G3qBmGYE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kiwoong Kim , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.10 164/452] scsi: ufs: core: Exclude UECxx from SFR dump list Date: Tue, 7 Jun 2022 19:00:21 +0200 Message-Id: <20220607164913.450305829@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kiwoong Kim [ Upstream commit ef60031022eb6d972aac86ca26c98c33e1289436 ] Some devices may return invalid or zeroed data during an UIC error condition. In addition, reading these SFRs will clear them. This means the subsequent error handling will not be able to see them and therefore no error handling will be scheduled. Skip reading these SFRs in ufshcd_dump_regs(). Link: https://lore.kernel.org/r/1648689845-33521-1-git-send-email-kwmad.kim@samsung.com Fixes: d67247566450 ("scsi: ufs: Use explicit access size in ufshcd_dump_regs") Signed-off-by: Kiwoong Kim Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/ufs/ufshcd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index bf302776340c..ea6ceab1a1b2 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -107,8 +107,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); -- 2.35.1