Received: by 10.223.176.5 with SMTP id f5csp808340wra; Sat, 3 Feb 2018 10:45:35 -0800 (PST) X-Google-Smtp-Source: AH8x226wLuxExt0LAU+TeKYS8Z4g/eYTgA9iZngWAL47Vzu4qy5XnvR7Q42kxzeprrP+4yoMVziM X-Received: by 2002:a17:902:b492:: with SMTP id y18-v6mr29977030plr.437.1517683535282; Sat, 03 Feb 2018 10:45:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517683535; cv=none; d=google.com; s=arc-20160816; b=mZiaGjS/UEXHAfOsOeD2AjmeTAYHBZ5hse6Ru0vF6AG6TYJgtq7k/0m2jv/sJmdn9z 25yiV/+cWFO/WXuHN4kC0y0WU1vY0ZiRTSacLkkxCb4xJ3T9A3SDKtFeevKWjFH/hPwX /1ywVuHmxU7fS33XkUX85vOrG/n+b/SHQHa1kycou9nf7YAg7ylodQfPj15H8Dxsm/pP Ib+6QvJE7zX/wnPlasX77miPS1B4ke0vs/QtMFRwJuIfWQ1J2HSxjmWgaN2w3xq2WxhT lWe1AFctohHYJXMy8llthpCXdOe75jcy22fI8NGHUcyVY9HJ66xg7vA7pw6ff3D7KpDu W9cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=7r5T8TbJnp6Gm1qa1qM0MT+GuxfT6df1ttcLhxO9bEo=; b=oP4ju31te4xo0bDp4yzzvsSq+IYQP61W7VK40Kf4owkMC8vm91Kv0iNiCRmRVD+6OM 4+3DxvApOQASDyt8hVGAQNhcgTfuOq+UzRT/2Uve5HcQjf9uTMW8AN+pfaCHquHHrGJ+ 2LzqtQoAl9xAttd8d//W+kCXwOSFkprYNT6wp/FGTBSG3MzDmaT68cA8SAVALVGkm0ik +daTRcZVFXP+l5UtGSUcghmkdjiNYP05gntR3v1/RqRsTlW2PiKjFNEaLY7SDHpgI3sl 8IG0sPBCdew4uPKeNEpCNuyDuO/x856mbjFrJfL0yPJV4MFw0IPN15JZtpFPPdOO5TSu FTgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=HKf6Iq63; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o24-v6si4096092pll.716.2018.02.03.10.45.20; Sat, 03 Feb 2018 10:45:35 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=HKf6Iq63; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755207AbeBCSnf (ORCPT + 99 others); Sat, 3 Feb 2018 13:43:35 -0500 Received: from mail-bl2nam02on0113.outbound.protection.outlook.com ([104.47.38.113]:13185 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753199AbeBCSDC (ORCPT ); Sat, 3 Feb 2018 13:03:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=7r5T8TbJnp6Gm1qa1qM0MT+GuxfT6df1ttcLhxO9bEo=; b=HKf6Iq63CoDGWQESb2pGAuuCUjdvttHRVX9rAbzHvIIwLPCWi1B+U6hCv4XVASyvkcLfZvq58hdgc6mMNJKh0HTj0+NsvY3rpqtoi4WK7B4bGb3ZPQJ0hARRsYXEwTuJ4xP6nRBMKcyUWrvy6NYXtxH6lFq9Qca/upegniodp84= Received: from BL0PR2101MB1027.namprd21.prod.outlook.com (52.132.20.161) by BL0PR2101MB0993.namprd21.prod.outlook.com (52.132.23.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.5; Sat, 3 Feb 2018 18:02:51 +0000 Received: from BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9]) by BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9%3]) with mapi id 15.20.0485.006; Sat, 3 Feb 2018 18:02:51 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Sergei Shtylyov , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 102/110] SolutionEngine771x: fix Ether platform data Thread-Topic: [PATCH AUTOSEL for 4.14 102/110] SolutionEngine771x: fix Ether platform data Thread-Index: AQHTnRkF8/NsMjezAECu33QWLaQ8+g== Date: Sat, 3 Feb 2018 18:01:32 +0000 Message-ID: <20180203180015.29073-102-alexander.levin@microsoft.com> References: <20180203180015.29073-1-alexander.levin@microsoft.com> In-Reply-To: <20180203180015.29073-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BL0PR2101MB0993;7:R7Ip8H7nTlOewNEMejPmySaQGuMkgpoiFLsjWg9jmSySt5ZMD/sZvuQT+k1xVaODBSbV8q/rYOzcLReji/e/L30/jNcNqq0L766JMZ6WztAEPACdonF4h3pgExkpPBKvGFqpV9fT2qjsxyrUULzPXjAfyvhg54z8gvypwkc6tmk4x4YMIHSnqRmu3wTHIPvR5U+s/bmUKZsFJk25scLNm8KLn9VWfTfE/B/M+iO7WQP9GpKK1Fv9RDTTHDBb5N/m x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9862d383-e7c7-4867-d2a3-08d56b3057d6 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:BL0PR2101MB0993; x-ms-traffictypediagnostic: BL0PR2101MB0993: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231101)(2400082)(944501161)(93006095)(93001095)(6055026)(61426038)(61427038)(6041288)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:BL0PR2101MB0993;BCL:0;PCL:0;RULEID:;SRVR:BL0PR2101MB0993; x-forefront-prvs: 05724A8921 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39380400002)(39860400002)(376002)(366004)(396003)(189003)(199004)(6436002)(186003)(3660700001)(8936002)(105586002)(2906002)(6346003)(6116002)(3280700002)(3846002)(97736004)(6486002)(1076002)(2950100002)(6666003)(81156014)(86362001)(76176011)(102836004)(2501003)(5250100002)(26005)(68736007)(10090500001)(81166006)(8676002)(59450400001)(53936002)(5660300001)(22452003)(305945005)(107886003)(7736002)(15760500003)(4326008)(86612001)(36756003)(99286004)(316002)(6512007)(10290500003)(72206003)(6506007)(14454004)(478600001)(25786009)(106356001)(2900100001)(54906003)(110136005)(66066001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR2101MB0993;H:BL0PR2101MB1027.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: ltVt4+XcquEaeRw4++R06YGuayaVCUo6aVMsbbnbzxMHU3SFZumJTXBriG+zGqcg6s0lNCI8Vi+U6drbqosykA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9862d383-e7c7-4867-d2a3-08d56b3057d6 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2018 18:01:32.3315 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB0993 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/sh/boards/mach-se/770x/setup.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/sh/boards/mach-se/770x/setup.c b/arch/sh/boards/mach-se/7= 70x/setup.c index 77c35350ee77..b7fa7a87e946 100644 --- a/arch/sh/boards/mach-se/770x/setup.c +++ b/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_device =3D { #if defined(CONFIG_CPU_SUBTYPE_SH7710) ||\ defined(CONFIG_CPU_SUBTYPE_SH7712) /* SH771X Ethernet driver */ +static struct sh_eth_plat_data sh_eth_plat =3D { + .phy =3D PHY_ID, + .phy_interface =3D PHY_INTERFACE_MODE_MII, +}; + static struct resource sh_eth0_resources[] =3D { [0] =3D { .start =3D SH_ETH0_BASE, @@ -132,7 +138,7 @@ static struct platform_device sh_eth0_device =3D { .name =3D "sh771x-ether", .id =3D 0, .dev =3D { - .platform_data =3D PHY_ID, + .platform_data =3D &sh_eth_plat, }, .num_resources =3D ARRAY_SIZE(sh_eth0_resources), .resource =3D sh_eth0_resources, @@ -155,7 +161,7 @@ static struct platform_device sh_eth1_device =3D { .name =3D "sh771x-ether", .id =3D 1, .dev =3D { - .platform_data =3D PHY_ID, + .platform_data =3D &sh_eth_plat, }, .num_resources =3D ARRAY_SIZE(sh_eth1_resources), .resource =3D sh_eth1_resources, --=20 2.11.0