From patchwork Sat Aug 17 22:19:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2846058 X-Patchwork-Delegate: lethal@linux-sh.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 104129F271 for ; Sat, 17 Aug 2013 22:18:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3A3D720204 for ; Sat, 17 Aug 2013 22:18:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 605A620200 for ; Sat, 17 Aug 2013 22:18:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754817Ab3HQWS4 (ORCPT ); Sat, 17 Aug 2013 18:18:56 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:48096 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754791Ab3HQWS4 (ORCPT ); Sat, 17 Aug 2013 18:18:56 -0400 Received: by mail-lb0-f174.google.com with SMTP id w20so2147798lbh.5 for ; Sat, 17 Aug 2013 15:18:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:organization:to:subject:date:user-agent :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=lP3ruid4sfD0lpm/9TXy9T9E4P6XKJMDsLwPgsTNFjQ=; b=Ca1oIjYCvUTdFGot5fZN93BrFDl28Y9HLMJKMJ9SGiDwMMtzyzBJ4s4mUBjaLDvkKC CFTgv0xIBCHee7ifRJ0PWVGZENX2T15BP2OXpt18eBRkuzU4FfxhffKOi6vi0gP0tnD4 WfJ0ceHqctOKR2qPVbdqb2MSV0yg0n/mSxlKxjBLl8Wh0Hr7tROJWZ6MzBWwK8g0LaET 8eK2XUGu8X639e9aiM5W0iCzUZtSw1Uz8e/urTshfkZUN/07/9IiG9gjwvZ9TsaVq/KC KDfhZCHBSBcxTwwv7BrgVPnNgv0AC9KNQCN4QkW9BnJbt9YHg8KRA/QJD2FwWdUVHutn mUVg== X-Gm-Message-State: ALoCoQmAUglm0t4O8Zq7AwnYjaEoR6m19vnKnoO/fs89IOVbqlg0ewJsjRiWsdVDrG8GhFhHiUmN X-Received: by 10.112.14.102 with SMTP id o6mr3509256lbc.28.1376777934823; Sat, 17 Aug 2013 15:18:54 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-76-155-153.pppoe.mtu-net.ru. [91.76.155.153]) by mx.google.com with ESMTPSA id b6sm1681344lae.0.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 17 Aug 2013 15:18:54 -0700 (PDT) From: Sergei Shtylyov Organization: Cogent Embedded To: netdev@vger.kernel.org, lethal@linux-sh.org, linux-sh@vger.kernel.org, davem@davemloft.net Subject: [PATCH 2/2] SolutionEngine7724: fix Ether support Date: Sun, 18 Aug 2013 02:19:09 +0400 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.i686.PAE; KDE/4.4.5; i686; ; ) References: <201308180213.23296.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201308180213.23296.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201308180219.09528.sergei.shtylyov@cogentembedded.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Ether platform data is behind the declaration of 'struct sh_eth_plat_data' as it's lacking the initializers for the 'register_type' and 'phy_interface' fields -- it means they'll be implicitly and wrongly set to SH_ETH_REG_GIGABIT and PHY_INTERFACE_MODE_NA. Initialize the fields explicitly and fix off-by-one error in the Ether memory resource end, while at it... Signed-off-by: Sergei Shtylyov Cc: stable@vger.kernel.org --- arch/sh/boards/mach-se/7724/setup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 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: net/arch/sh/boards/mach-se/7724/setup.c =================================================================== --- net.orig/arch/sh/boards/mach-se/7724/setup.c +++ net/arch/sh/boards/mach-se/7724/setup.c @@ -365,7 +365,7 @@ static struct platform_device keysc_devi static struct resource sh_eth_resources[] = { [0] = { .start = SH_ETH_ADDR, - .end = SH_ETH_ADDR + 0x1FC, + .end = SH_ETH_ADDR + 0x1FC - 1, .flags = IORESOURCE_MEM, }, [1] = { @@ -377,6 +377,8 @@ static struct resource sh_eth_resources[ static struct sh_eth_plat_data sh_eth_plat = { .phy = 0x1f, /* SMSC LAN8187 */ .edmac_endian = EDMAC_LITTLE_ENDIAN, + .register_type = SH_ETH_REG_FAST_SH4, + .phy_interace = PHY_INTERFACE_MODE_MII, }; static struct platform_device sh_eth_device = {