From patchwork Wed Jan 3 20:08:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 10143057 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 A602560594 for ; Wed, 3 Jan 2018 20:11:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98662292B0 for ; Wed, 3 Jan 2018 20:11:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D4AE292D5; Wed, 3 Jan 2018 20:11:41 +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 15317292B0 for ; Wed, 3 Jan 2018 20:11:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751390AbeACULk (ORCPT ); Wed, 3 Jan 2018 15:11:40 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:37894 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751319AbeACULi (ORCPT ); Wed, 3 Jan 2018 15:11:38 -0500 Received: by mail-wr0-f196.google.com with SMTP id y9so2838363wrb.5 for ; Wed, 03 Jan 2018 12:11:37 -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=+49UtMFW1ppDISWdxDsRbyKsqvp5P/hcmWXBXmBB65c=; b=aqCBihg056QuIp4FcPjCJ/F3FgbjwvqMh3bpV2Z5SCjRDBZfaoTFjCxP4STR7Rox/h +ZppcR4XsXucdSv5a+57zlos/71nHM7O6h2kTJHVj/IQM5j5sMszB4fFP4zyTr6p/QjQ RrEePovs4ALWIlKe0ZbJmxsoyFz6UebqtYvS8tK7h0iQOyzaccPV6+NxT2zuAEw2KrdW AA2wuhYIFxgNL81a1qm33NyCjiywvR8jpCQHbs5DB1Cq5sw5h54S6O93NUb8+SlSMEYL wRIv3w+WuQGCV4IDPwRZvaXgLX5ibWpdECeWKBHIG0t75FhoZIwMv8TJGZQtqYTdutsJ IHMg== 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=+49UtMFW1ppDISWdxDsRbyKsqvp5P/hcmWXBXmBB65c=; b=YE6Yttz0MDm86mzIpQTH+EuXurIkn7l0Myym1yzvDw1NDHka0DIywnXF8e7URUpXcA 8/rP0mBSiHFFuiQpJKJNiZarODwpDO5RU9zGNHmVRVH0W48InfHqf38URsMdPEsuljjF vCYZEvd3kVj/6YNMcPyUz/wHLCYPRRwkx9Os50uOLVW1bmZGG1eKTUrdMUprVwZ3ypAp B4VUsY5Y2IMX8l5KLZp+mf4wzK1eRfMVyXPGSHh45NWhgHbHa7c0FSMGkiCrcAEKoojN 41lVnnDrR+24TFvreV+Y0Y0XEnrjw2dZxmwYWyuUcN4A10CmUlCP3BSmv6xcuFEM0V60 Ub0Q== X-Gm-Message-State: AKGB3mKHX0tTglYE6CeFXplAQQls/lmAKdeeh3YycYguU3GlaDoboAiy zU38ZrXFGnBx8cLNTFbaNe4ZaA== X-Google-Smtp-Source: ACJfBovTd1y12aG0aUwnCJMNuk77UcJCua14yoI0SP12NeXhBst3VgDdXstUpas1tm6HD2Q/m4tMiw== X-Received: by 10.46.74.26 with SMTP id x26mr1490101lja.83.1515010297064; Wed, 03 Jan 2018 12:11:37 -0800 (PST) Received: from wasted.cogentembedded.com ([31.173.87.30]) by smtp.gmail.com with ESMTPSA id p21sm302068ljb.85.2018.01.03.12.11.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jan 2018 12:11:36 -0800 (PST) From: Sergei Shtylyov X-Google-Original-From: "Sergei Shtylyov" Received: by wasted.cogentembedded.com (sSMTP sendmail emulation); Wed, 03 Jan 2018 23:11:33 +0300 Message-Id: <20180103201133.743597164@cogentembedded.com> User-Agent: quilt/0.64 Date: Wed, 03 Jan 2018 23:08:14 +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.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 --- The patch is against Paul Mundt's 'linux-sh.git' repo, 'sh-latest' branch. arch/sh/boards/mach-se/770x/setup.c | 9 +++++++-- 1 file changed, 7 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 @@ -115,6 +115,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 +137,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 +160,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,