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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 7F5CDC2BA19 for ; Sat, 11 Apr 2020 23:24:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4428220769 for ; Sat, 11 Apr 2020 23:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586647455; bh=ktRAk573+U/MMYz3+IF0v1Le1INiNFUcm/fx6LnVvME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=vs7tFY8wsz89tpKLPn0DS0jZQuJ5PDy4dfD6bTuuX8JXuuiGynPzQ5T4llxaocqmx XhpZ6ZURvLlEb53iNlOzq9xUnwxcNd3saWQapu3lIXcNpXhXvOuDT2c6qj1L/Hey3Q fh9cTA07AzcLfyCB1K600H2bSCbM44vEDv61uzyg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730886AbgDKXYN (ORCPT ); Sat, 11 Apr 2020 19:24:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:52936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730217AbgDKXMi (ORCPT ); Sat, 11 Apr 2020 19:12:38 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DE87F21835; Sat, 11 Apr 2020 23:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586646758; bh=ktRAk573+U/MMYz3+IF0v1Le1INiNFUcm/fx6LnVvME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MGV7CJ5W50NJ6wGbUxJh+KjqWXAibHtgr/7zPlkb1xe05A/JASi3aBpBkJU6BCF2n 6JveGy3eqTxtpxwjDy7jrySKe8+rqoQppM1uwoSATvdryFBJwf73tNY+s4XkbFs60b W+qlOL/wovH5DkESD3KkublO9duqxup8uqFZSaJw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sergei Shtylyov , Chris Brandt , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 29/66] sh_eth: check sh_eth_cpu_data::no_xdfar when dumping registers Date: Sat, 11 Apr 2020 19:11:26 -0400 Message-Id: <20200411231203.25933-29-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200411231203.25933-1-sashal@kernel.org> References: <20200411231203.25933-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sergei Shtylyov [ Upstream commit 7bf47f609f7eaac4f7e9c407a85ad78997288a38 ] When adding the sh_eth_cpu_data::no_xdfar flag I forgot to add the flag check to __sh_eth_get_regs(), causing the non-existing RDFAR/TDFAR to be considered for dumping on the R-Car gen1/2 SoCs (the register offset check has the final say here)... Fixes: 4c1d45850d5 ("sh_eth: add sh_eth_cpu_data::cexcr flag") Signed-off-by: Sergei Shtylyov Tested-by: Chris Brandt Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/renesas/sh_eth.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index 7d3207d2d6d6d..14e39a41d475d 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -2120,11 +2120,13 @@ static size_t __sh_eth_get_regs(struct net_device *ndev, u32 *buf) add_reg(EESR); add_reg(EESIPR); add_reg(TDLAR); - add_reg(TDFAR); + if (!cd->no_xdfar) + add_reg(TDFAR); add_reg(TDFXR); add_reg(TDFFR); add_reg(RDLAR); - add_reg(RDFAR); + if (!cd->no_xdfar) + add_reg(RDFAR); add_reg(RDFXR); add_reg(RDFFR); add_reg(TRSCER); -- 2.20.1