From patchwork Sun Dec 27 23:07:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 7924161 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3DFEBBEEE5 for ; Sun, 27 Dec 2015 23:07:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4C0D720270 for ; Sun, 27 Dec 2015 23:07:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3B2032026D for ; Sun, 27 Dec 2015 23:07:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754814AbbL0XHM (ORCPT ); Sun, 27 Dec 2015 18:07:12 -0500 Received: from mail-lb0-f181.google.com ([209.85.217.181]:32777 "EHLO mail-lb0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754484AbbL0XHL (ORCPT ); Sun, 27 Dec 2015 18:07:11 -0500 Received: by mail-lb0-f181.google.com with SMTP id sv6so77957195lbb.0 for ; Sun, 27 Dec 2015 15:07:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=lGz5DnyhogbnaY9RViuLQt9muuKG1odFcLE+J8hri6k=; b=rBY4K34HYFpPzN+Jswp8cRi9er2WtQqCUEtqrzN6tX+uU+huoU4iVIfqL6GMmhAr6z 3gZrNU50VIZq0N6KO4sKDWshmobNliKM4Xe9fU8OnZmhOSrrXqrGlhxOhnnPszUMMfkC uJ7tsgDwU3rAnl0+vmTcxAVr4vQIthToFWUZ70gkTLxEevVlchGtAXLoJ3S1guRHgDRu OkDBk74VfrXcKxAVUrrfL8KarXRteV8N4nsi7tp9NPBXfp2A7zRNoIZKuZhedn8pzpXD OluQlVFAKnor9jExOQYVV2eIUnU91efjHxqCQ5E7q8WFXI5o5ovpOh55MCGVPvzHXMTK r20A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=lGz5DnyhogbnaY9RViuLQt9muuKG1odFcLE+J8hri6k=; b=GEiyAthjOpSzkNYP+Xl4Lh8Xzn6fROMozmr2szW6b5jDs8ycCC6y6iAEi5/8itiZlT 9dFwGH73VsW1rCdE+fXj0JPFwgYVV7hcFQYTmmvDEf9XceOc77/tekIFXVtUPWwPrrZT /KILu0QsYTzT/bJ6Lr/kt/qBveVeM07y2OC8w59EsioTsJe81x0AkDR4RnKpRIQIBfH5 EcY0WAJXNMF/AylQNgcySfL7ZzhNCMJ3PnpnjKwIMYT5miZ+kovMnY6x881mxMoXUA3C ++w7JzStPw7H+wGBRLpw+omXNwmR9EhbGKlqIaAbV+NK6+lKjtTS3qL45sIgsdtjaRV5 ttbQ== X-Gm-Message-State: ALoCoQm6krJqpfWU037je4iyUuBNL5GVIGzDtkH6RkHiXP5yPDatU4z5OodO1ThCRreEpnVWcYIVNzMNSGUOGDj2j2IzDDB3Dg== X-Received: by 10.112.42.67 with SMTP id m3mr18685560lbl.2.1451257629884; Sun, 27 Dec 2015 15:07:09 -0800 (PST) Received: from wasted.cogentembedded.com ([31.173.80.42]) by smtp.gmail.com with ESMTPSA id re5sm9965060lbb.22.2015.12.27.15.07.08 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 27 Dec 2015 15:07:09 -0800 (PST) From: Sergei Shtylyov To: netdev@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH 1/2] sh_eth: remove EDMAC_BIG_ENDIAN Date: Mon, 28 Dec 2015 02:07:08 +0300 Message-ID: <1789816.9Rg3E9smcf@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.10 (Linux/4.2.8-200.fc22.x86_64; KDE/4.14.14; x86_64; ; ) In-Reply-To: <27915743.MLN0FvErP3@wasted.cogentembedded.com> References: <27915743.MLN0FvErP3@wasted.cogentembedded.com> MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 71557a37adb5 ("[netdrvr] sh_eth: Add SH7619 support") added support for the big-endian EDMAC descriptors. However, it was never used and never worked right until the recent driver fixes. I think we now can just remove this support, it was only burdening the driver from the start. It should be easy to do without disturbing the SH platform code, at least for now... Signed-off-by: Sergei Shtylyov Acked-by: Simon Horman --- drivers/net/ethernet/renesas/sh_eth.c | 18 ++---------------- drivers/net/ethernet/renesas/sh_eth.h | 1 - include/linux/sh_eth.h | 2 +- 3 files changed, 3 insertions(+), 18 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 @@ -971,24 +971,12 @@ static void sh_eth_set_receive_align(str /* CPU <-> EDMAC endian convert */ static inline __u32 cpu_to_edmac(struct sh_eth_private *mdp, u32 x) { - switch (mdp->edmac_endian) { - case EDMAC_LITTLE_ENDIAN: - return cpu_to_le32(x); - case EDMAC_BIG_ENDIAN: - return cpu_to_be32(x); - } - return x; + return cpu_to_le32(x); } static inline __u32 edmac_to_cpu(struct sh_eth_private *mdp, u32 x) { - switch (mdp->edmac_endian) { - case EDMAC_LITTLE_ENDIAN: - return le32_to_cpu(x); - case EDMAC_BIG_ENDIAN: - return be32_to_cpu(x); - } - return x; + return le32_to_cpu(x); } /* Program the hardware MAC address from dev->dev_addr. */ @@ -3097,8 +3085,6 @@ static int sh_eth_drv_probe(struct platf /* get PHY ID */ mdp->phy_id = pd->phy; mdp->phy_interface = pd->phy_interface; - /* EDMAC endian */ - mdp->edmac_endian = pd->edmac_endian; mdp->no_ether_link = pd->no_ether_link; mdp->ether_link_active_low = pd->ether_link_active_low; 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 @@ -513,7 +513,6 @@ struct sh_eth_private { u32 cur_rx, dirty_rx; /* Producer/consumer ring indices */ u32 cur_tx, dirty_tx; u32 rx_buf_sz; /* Based on MTU+slack. */ - int edmac_endian; struct napi_struct napi; bool irq_enabled; /* MII transceiver section. */ Index: net-next/include/linux/sh_eth.h =================================================================== --- net-next.orig/include/linux/sh_eth.h +++ net-next/include/linux/sh_eth.h @@ -4,7 +4,7 @@ #include #include -enum {EDMAC_LITTLE_ENDIAN, EDMAC_BIG_ENDIAN}; +enum {EDMAC_LITTLE_ENDIAN}; struct sh_eth_plat_data { int phy;