Received: by 10.223.185.116 with SMTP id b49csp8502374wrg; Fri, 2 Mar 2018 03:01:06 -0800 (PST) X-Google-Smtp-Source: AG47ELufmlVM6PsYb1pxkIGUGR16e+5lDP5JbxPwjxjCB+8zO/XYVywgUtwaHAaKShDQs3Xu2wTi X-Received: by 10.99.122.86 with SMTP id j22mr4236523pgn.351.1519988466373; Fri, 02 Mar 2018 03:01:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519988466; cv=none; d=google.com; s=arc-20160816; b=rJBk8tHlSi0/JZP0fssBaychk3AW/v0h29alEyBKY9RqsCH4lIMIbwHe0LJdxWSiVK a2gb8G4gfiiPTQno2ZVJouzLGhDX9UWC4/fd3m0sQnqWzRhc78WuDO5M0ymDpRJl/sKZ 61q3n7erVRrW5+DzjDveqgKSR9+TnnF+MHZrWu5xTvSyKhGRcSQxfdf0uTIrVd5cIdGD a3r3bEVYsUCFWvuYlkop89iDP9XtxGx226EKN3fBzgEM7cqPmTIm1ikn2QxRn2QNWv1/ 5hna6Ava0mKi5cB+TYg1BuRN25AN/GMb+YA57rW0H7oqk2ABTK52K47onbk0PrYLzXI1 APrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=fdP8GqDuYWsLgKZL5YrfvA50SHyFbHtHIdVvOzmjdvU=; b=plylxZOcVKaTnlqbOLf4kzcncK8BXt67ujmq4VXS3bmWW4GwsM7v8ebA/qguGgiqR0 yJnhbkG/DzMkMCwQ6lOjxYYzhqoweU+6pMQG1JGlXIEGkU5bD30zBix2UwM6fMN4EOhS pDYS0LA5WhGikmidh1bUOvOOLwCCEwu0HjYSeuIoOeehemEeI+gtHtMFp/JxPVgLH/G/ 4quoLejXRo+vwJtLMZB9hU1/ksd50S2EGgWwAP+ouxbk/Gl8IhbBce0itnoAC5bKMtgv BES+0BWLsTDQ9348moHu5nf0qB5RP5Tvt0LvGhQ1eHv+OXvR/Vq75zdYJ2dTc13b7GSj oMnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11-v6si4683512plk.189.2018.03.02.03.00.51; Fri, 02 Mar 2018 03:01:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946423AbeCBK7x (ORCPT + 99 others); Fri, 2 Mar 2018 05:59:53 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50948 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423766AbeCBIz6 (ORCPT ); Fri, 2 Mar 2018 03:55:58 -0500 Received: from localhost (clnet-b04-243.ikbnet.co.at [83.175.124.243]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 24EF31231; Fri, 2 Mar 2018 08:55:57 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sergei Shtylyov , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 29/34] SolutionEngine771x: fix Ether platform data Date: Fri, 2 Mar 2018 09:51:25 +0100 Message-Id: <20180302084437.868320664@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180302084435.842679610@linuxfoundation.org> References: <20180302084435.842679610@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sergei Shtylyov [ Upstream commit 195e2addbce09e5afbc766efc1e6567c9ce840d3 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/sh/boards/mach-se/770x/setup.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- a/arch/sh/boards/mach-se/770x/setup.c +++ b/arch/sh/boards/mach-se/770x/setup.c @@ -8,6 +8,7 @@ */ #include #include +#include #include #include #include @@ -114,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, @@ -131,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, @@ -154,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,