Received: by 10.223.185.116 with SMTP id b49csp6378988wrg; Wed, 28 Feb 2018 08:26:39 -0800 (PST) X-Google-Smtp-Source: AH8x22758O0gA9liMGAuMBbnWAiCXHn5yH2F0gshb7lo5VrEMY2Wb+q/GaEhMwJNSV830CxW554m X-Received: by 10.98.110.71 with SMTP id j68mr16435564pfc.93.1519835199844; Wed, 28 Feb 2018 08:26:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519835199; cv=none; d=google.com; s=arc-20160816; b=fTY/jDj/vPwzjBY2hDscIPIBD0EmEcLh2Pet6UrjhNIjSHVFmC/1hj2AklT/Nu56OU ToweOxdZ19X4EOurPvg4WlKGb8PRYCQknfkLCFlVSo+owxVBoz5vPop3w8M1oZQd+OJo nFZyltHuyfmjVUhkVw/uovgca/HEkNVvxhGIjiR5Hevloy6x0+9ZAPILeiWKYZQ3HvgN uXpTndGfx0IO8V0k3cyvgBxYQFEvtdJETWdwowhf51Gw3WZAuF/7IMzsLrAox8PtQ8mp iJHpR879Vt+5tCt7N3pMS/ybdbZoI4f1QOT89ppMH/H72HKTlztdk/vL5g4X02ihUUN7 9Emg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=a0Xmm1Ddp7FLCce0fS8uPV1WptdFjCrj4u7M5MmXNXg=; b=eMKwgPxndF2uJWK88Ws+USfi/y/GoTAySSXIoaKMieER68J5IWnPrq+KeSAPTSE8Wp sdrKAvrNC1DlZ8KBCLmLiBDBJFNGOwpGGVPqBWhW3znFiRpBhNttoC/br8dQasuDMD7q s9KhfLNYltjumCsGu1TYrLYOnE3a6l05x7KD+Plr6mUU30qWYoRlUOw9RP8F/eqsqwJV YWDMQAb/bb5qZmRn5q6BriEnVSamj+Kr6aPDTZs/AzCH9H0H9gSr8AkIpkQLrHYbRMiG P7bh2vockTwiP0MTfPxXO2AKaO9ciWEOHBJE/L3qpclx7oJNO1YuJcTNREyoUyYWclLm BNww== 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 v32-v6si1489109plb.301.2018.02.28.08.26.25; Wed, 28 Feb 2018 08:26:39 -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 S935107AbeB1QUU (ORCPT + 99 others); Wed, 28 Feb 2018 11:20:20 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35330 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935024AbeB1QUR (ORCPT ); Wed, 28 Feb 2018 11:20:17 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yq-0006Xl-5q; Wed, 28 Feb 2018 15:22:28 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yj-0000FO-J5; Wed, 28 Feb 2018 15:22:21 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Sergei Shtylyov" , "David S. Miller" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 196/254] SolutionEngine771x: fix Ether platform data In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Sergei Shtylyov commit 195e2addbce09e5afbc766efc1e6567c9ce840d3 upstream. 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: Ben Hutchings --- 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,