From patchwork Sun Jan 27 17:36:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 10782941 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7AB851390 for ; Sun, 27 Jan 2019 17:36:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 693DB28A72 for ; Sun, 27 Jan 2019 17:36:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D53029F6C; Sun, 27 Jan 2019 17:36:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDF8C28A72 for ; Sun, 27 Jan 2019 17:36:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726863AbfA0RgP (ORCPT ); Sun, 27 Jan 2019 12:36:15 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:35454 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726930AbfA0RgP (ORCPT ); Sun, 27 Jan 2019 12:36:15 -0500 Received: by mail-lf1-f68.google.com with SMTP id e26so10202499lfc.2 for ; Sun, 27 Jan 2019 09:36:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:references:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kd73bZ7AKCEuKOrg+1QczlJBtttkncjpF7aX0xEIksY=; b=oRvSGKEpCIGZEdD4P4pmcQGLbtQ3xFhykI2lWVi2VcUp2B5iRkCHPTEI7HtRhmk3VE dk2Y8nQmenfpntZUsoD6u3FaqkZSGQjIz/XmKuoQUKB1FaF4uYofIeL+RskrWqMIOk4i pC8r9oN+Pny9yC+iEqbiuXNSBjGbooJ4oBaz8pp12UxeUyxemgrP8Da1rtmKgKnDG/H7 h8QbFtVrsYYUBfTcDbxVabjReklifW1UalT9NzjrlF9SucNOPs3gHaiNWIGeKYvcmEgx 7i9kNPeQkXLrimYKN+vF+rMSTrOe0nipVnPGHyOXGw1PWbLLN112OUTq4SOqo395PLHu p1ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=kd73bZ7AKCEuKOrg+1QczlJBtttkncjpF7aX0xEIksY=; b=MRy4gnhXJgq9SzQOtw97W+xXpghkQmwmHCEXJO7/sOiCqobtPbeUOnCtbb8kg1BUXr byIK3geqUmIYQAdZvh14T1/2wKHLeqVXHgp/kdakie4XO5uaBWv5TLk9EhNUThi4ZaK/ EraMqdIAzwFDZDFglXM6ypAn+pHTn8ehHf7g4LyJJIuNc3IVvaafxOgJodBQhQTcKajw zky2tNBP/1U50VB4wndBX5/xIjhwK1u6YeZHvDFaC84t4zgj96rjDVG8LLbwaBK7Uh6/ oo1LQDpHJOqDf8+Ps6Db6J0pLBFTI1+0ezShTboF+QLP8jML6pPUr9GjlWZzf73VqRhz MpHA== X-Gm-Message-State: AJcUuke4sJgtknMXNrkG1Dfd5PAGbqA8gpk8tURAKlQOgzCTtiMxQBSz Cd9GvsUiKczOKVTPrZfvGLmUXWvojgA= X-Google-Smtp-Source: ALg8bN6wYAy6ZuoyqhdWTjkadRVlZRCC7C0HV7imTtJ533E5mUNGBOkMmYRKtSbopHfbwWKFM4IGeQ== X-Received: by 2002:a19:ced3:: with SMTP id e202mr15016133lfg.13.1548610572330; Sun, 27 Jan 2019 09:36:12 -0800 (PST) Received: from wasted.cogentembedded.com ([31.173.84.150]) by smtp.gmail.com with ESMTPSA id u65sm2678360lff.54.2019.01.27.09.36.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Jan 2019 09:36:11 -0800 (PST) Subject: [PATCH 1/7] sh_eth: rename sh_eth_cpu_data::hw_checksum From: Sergei Shtylyov To: netdev@vger.kernel.org, "David S. Miller" Cc: linux-renesas-soc@vger.kernel.org, linux-sh@vger.kernel.org References: Organization: Cogent Embedded Message-ID: Date: Sun, 27 Jan 2019 20:36:10 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-MW Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 62e04b7e0e3c ("sh_eth: rename 'sh_eth_cpu_data::hw_crc'") renamed the field to 'hw_checksum' for the Ether DMAC "intelligent checksum", however some Ether MACs implement a simpler checksumming scheme, so that name now seems misleading. Rename that filed to 'csmr' as the "intelligent checkmum" is always controlled by the CSMR register. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven --- drivers/net/ethernet/renesas/sh_eth.c | 14 +++++++------- drivers/net/ethernet/renesas/sh_eth.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) Index: net-next/drivers/net/ethernet/renesas/sh_eth.c =================================================================== --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net-next/drivers/net/ethernet/renesas/sh_eth.c @@ -555,7 +555,7 @@ static int sh_eth_soft_reset_gether(stru sh_eth_write(ndev, 0, RDFFR); /* Reset HW CRC register */ - if (mdp->cd->hw_checksum) + if (mdp->cd->csmr) sh_eth_write(ndev, 0, CSMR); /* Select MII mode */ @@ -619,7 +619,7 @@ static struct sh_eth_cpu_data r7s72100_d .no_trimd = 1, .no_ade = 1, .xdfar_rw = 1, - .hw_checksum = 1, + .csmr = 1, .tsu = 1, .no_tx_cntrs = 1, }; @@ -668,7 +668,7 @@ static struct sh_eth_cpu_data r8a7740_da .no_trimd = 1, .no_ade = 1, .xdfar_rw = 1, - .hw_checksum = 1, + .csmr = 1, .tsu = 1, .select_mii = 1, .magic = 1, @@ -793,7 +793,7 @@ static struct sh_eth_cpu_data r8a77980_d .no_trimd = 1, .no_ade = 1, .xdfar_rw = 1, - .hw_checksum = 1, + .csmr = 1, .select_mii = 1, .magic = 1, .cexcr = 1, @@ -1045,7 +1045,7 @@ static struct sh_eth_cpu_data sh7734_dat .no_ade = 1, .xdfar_rw = 1, .tsu = 1, - .hw_checksum = 1, + .csmr = 1, .select_mii = 1, .magic = 1, .cexcr = 1, @@ -1633,7 +1633,7 @@ static int sh_eth_rx(struct net_device * * the RFS bits are from bit 25 to bit 16. So, the * driver needs right shifting by 16. */ - if (mdp->cd->hw_checksum) + if (mdp->cd->csmr) desc_status >>= 16; skb = mdp->rx_skbuff[entry]; @@ -2173,7 +2173,7 @@ static size_t __sh_eth_get_regs(struct n add_reg(MAFCR); if (cd->rtrate) add_reg(RTRATE); - if (cd->hw_checksum) + if (cd->csmr) add_reg(CSMR); if (cd->select_mii) add_reg(RMII_MII); Index: net-next/drivers/net/ethernet/renesas/sh_eth.h =================================================================== --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.h +++ net-next/drivers/net/ethernet/renesas/sh_eth.h @@ -499,7 +499,7 @@ struct sh_eth_cpu_data { unsigned no_ade:1; /* E-DMAC DOES NOT have ADE bit in EESR */ unsigned no_xdfar:1; /* E-DMAC DOES NOT have RDFAR/TDFAR */ unsigned xdfar_rw:1; /* E-DMAC has writeable RDFAR/TDFAR */ - unsigned hw_checksum:1; /* E-DMAC has CSMR */ + unsigned csmr:1; /* E-DMAC has CSMR */ unsigned select_mii:1; /* EtherC has RMII_MII (MII select register) */ unsigned rmiimode:1; /* EtherC has RMIIMODE register */ unsigned rtrate:1; /* EtherC has RTRATE register */