From patchwork Sat Jan 6 18:53:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 10147993 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1753360153 for ; Sat, 6 Jan 2018 18:55:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05F4E28971 for ; Sat, 6 Jan 2018 18:55:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE7D628975; Sat, 6 Jan 2018 18:55: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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 75ED628971 for ; Sat, 6 Jan 2018 18:55:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753252AbeAFSzV (ORCPT ); Sat, 6 Jan 2018 13:55:21 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:34320 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753209AbeAFSzU (ORCPT ); Sat, 6 Jan 2018 13:55:20 -0500 Received: by mail-lf0-f65.google.com with SMTP id h140so8294418lfg.1 for ; Sat, 06 Jan 2018 10:55:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:user-agent:date:to:cc:subject:mime-version :content-disposition; bh=/W8J507VysWPrOrWSPZWYsEDq7xocRaQertqh3XAiTA=; b=ILfQqrgPjLs2l+btyf9PLmPwznaA+D+jd2HMqpakBll0LRHhzApN7q6fDU4CnsiD6/ FWx6pIvGsKfv00olNgdRPf2wTs3njUL3WI224mjfaC1wuLTs6PxvT9hFwH0x4tL7tdQE jIdu/i0/f9gfHc/57brXdP36Hw97GnIMMdMbsILq/lNuMqmmPxhmYwBdna192SelnSZR Ikb4hCGg4cgPCDOaBz+ru/jI4Wl62pJOoSdzIyYS6Q/z3J/FYceIvmf0kAwOxL+Hl+d6 nnS7g6iaEGmSTAIaCVaf6mXjqtrjxt8pczPJGoKGzeCfHHoAY2sCDI34GjWavH6HeP3w W2yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:user-agent:date:to:cc:subject :mime-version:content-disposition; bh=/W8J507VysWPrOrWSPZWYsEDq7xocRaQertqh3XAiTA=; b=gXT28cO6pfgMr1z5/kuyx5dSIR4kNi2WRxvNGx4L20Au3UDaVl1SEDdizhad5pftdR dxcfsJQYZXM6rZwKBCcjh1l9nWI7bbbC4tmTj8vVWWnRRt61AknXAg/LuXaQFdmXseuq YD8CDYfCUZNXpCu/E/osUl23cVEBivSVzuzsSK/WEpwGJgwh9nqNxdIhOd6xPACcYdfL Ab7HX7GP1mWcyXCbP3dEO6yC4YU+h0JVew87LDgwmxRBdUJBQfQ+VmdeQ9bayFyxIYLZ thIx8FMNLojaI11NtxzCDk6HHjEjeeCJMyKDlG3XlF24YtZvD9wpq0J9NtYi1GgkOa4J mX9A== X-Gm-Message-State: AKGB3mL1lQkxi3YCfG1fYQc6o5brDInNNP/hsumkPkd33i951JQ9aFLC 3XV+6u/CVNQKLkwOmtyfppVyrSeaYVA= X-Google-Smtp-Source: ACJfBoteyqPpwoCjuNFU1iDNDnFfWs2gOFoolexFbu47qUs0wtMSrNRg2nRHFNQ6alixKTLYnWkFOA== X-Received: by 10.46.17.11 with SMTP id f11mr4028947lje.8.1515264918936; Sat, 06 Jan 2018 10:55:18 -0800 (PST) Received: from wasted.cogentembedded.com ([31.173.85.97]) by smtp.gmail.com with ESMTPSA id l77sm304072lfl.72.2018.01.06.10.55.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Jan 2018 10:55:18 -0800 (PST) From: Sergei Shtylyov X-Google-Original-From: "Sergei Shtylyov" Received: by wasted.cogentembedded.com (sSMTP sendmail emulation); Sat, 06 Jan 2018 21:55:15 +0300 Message-Id: <20180106185515.780906193@cogentembedded.com> User-Agent: quilt/0.64 Date: Sat, 06 Jan 2018 21:53:26 +0300 To: Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org Cc: netdev@vger.kernel.org, Sergei Shtylyov Subject: [PATCH 1/2] SolutionEngine771x: fix Ether platform data MIME-Version: 1.0 Content-Disposition: inline; filename=SolutionEngine771x-fix-Ether-platform-data-v2.patch 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 The 'sh_eth' driver's probe() method would fail on the SolutionEngine7710 board and crash on SolutionEngine7712 board as the platform code is hopelessly behind the driver's platform data -- it passes the PHY address instead of 'struct sh_eth_plat_data *'; pass the latter to the driver in order to fix the bug... Fixes: 71557a37adb5 ("[netdrvr] sh_eth: Add SH7619 support") Signed-off-by: Sergei Shtylyov --- Changes in version 2: - added the necessary #include. arch/sh/boards/mach-se/770x/setup.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 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: linux/arch/sh/boards/mach-se/770x/setup.c =================================================================== --- linux.orig/arch/sh/boards/mach-se/770x/setup.c +++ linux/arch/sh/boards/mach-se/770x/setup.c @@ -9,6 +9,7 @@ */ #include #include +#include #include #include #include @@ -115,6 +116,11 @@ static struct platform_device heartbeat_ #if defined(CONFIG_CPU_SUBTYPE_SH7710) ||\ defined(CONFIG_CPU_SUBTYPE_SH7712) /* SH771X Ethernet driver */ +static struct sh_eth_plat_data sh_eth_plat = { + .phy = PHY_ID, + .phy_interface = PHY_INTERFACE_MODE_MII, +}; + static struct resource sh_eth0_resources[] = { [0] = { .start = SH_ETH0_BASE, @@ -132,7 +138,7 @@ static struct platform_device sh_eth0_de .name = "sh771x-ether", .id = 0, .dev = { - .platform_data = PHY_ID, + .platform_data = &sh_eth_plat, }, .num_resources = ARRAY_SIZE(sh_eth0_resources), .resource = sh_eth0_resources, @@ -155,7 +161,7 @@ static struct platform_device sh_eth1_de .name = "sh771x-ether", .id = 1, .dev = { - .platform_data = PHY_ID, + .platform_data = &sh_eth_plat, }, .num_resources = ARRAY_SIZE(sh_eth1_resources), .resource = sh_eth1_resources,