From patchwork Fri Jun 30 05:46:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106661 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904628qge; Thu, 29 Jun 2017 22:47:09 -0700 (PDT) X-Received: by 10.98.50.71 with SMTP id y68mr11061760pfy.2.1498801629410; Thu, 29 Jun 2017 22:47:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801629; cv=none; d=google.com; s=arc-20160816; b=x/sRNt5dgSkn39kXXuIgzAmjkQXDlD+13S42TfzgG2dtgDRWcwF3BYP/vEo+/4naHb 8GLbqP3X9zLhf5sQYRRRc0WmsJfbfYOI0xbzBzJPJdUsBKi/k5n662yq7s5KOIQmCGPY BZj+9sAQVmtZajyEL5rNJpIaMmQL68C7uXprvKcpsBgojCtywPdvqeccn6XhkAPvWLQR LfXMOGk2GewFI5wPn2Dmmr0xwyJGKLB8K5CGmvinqM0tfrKrAUD7uuWzbKuMyJG99zfJ zsu4CGIhWKp1NyuUTcp3b+7Ho/WoEQPyUhgHfcH6T9TvFdTK+193oeKDKNcYjJsyTnWC sVrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=J69Vt3U6dX0U+0OWZZcrhHM+CdlAe2nM+1U9UmvaE8Q=; b=bDgaa0YdwUlciZzXcBpV0MpSJvu5WGf67YNk8AFy7XhUnFVe09diNihy7y9IZD2mQ7 xo4x4nMv/0xj/EuTwoEpfqp30/TOMyV6f3nlzkGYF7Vq5P0mOelaFbwP8t+FWrSy1gRV QdA2/F1YCh2kXTnhXp5mZ/9yYpjgCYepQUHwktbwv8hByWfETna7BgvkTFhndCkiC5Dg sM9zMFdXkDeX1ezgBWHXcUd9J5WAjfCIhsU3dhDuAfPC9S9BQuG9ECH1/CuQ3EAcwzGj szPEWteHIfqh5WvNCXxC1XjGv/N5zDzQS+t25CplOaTOtbCrWQsyTvp/zoqYyl5OaBZ1 nMng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=U6sL3xNt; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si1658852plk.568.2017.06.29.22.47.09; Thu, 29 Jun 2017 22:47:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=U6sL3xNt; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751941AbdF3Fqv (ORCPT + 6 others); Fri, 30 Jun 2017 01:46:51 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:33935 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751333AbdF3Fqt (ORCPT ); Fri, 30 Jun 2017 01:46:49 -0400 Received: by mail-pf0-f179.google.com with SMTP id s66so61544077pfs.1 for ; Thu, 29 Jun 2017 22:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J69Vt3U6dX0U+0OWZZcrhHM+CdlAe2nM+1U9UmvaE8Q=; b=U6sL3xNtVjTVcnCG+6jAGI17waXo2AHoAzAU96Zzdd3fKuNppVxXB/cljlUCKvOqgK o9q6RHZxRxobAhS2nxYn1vFiDmHUVIIELq6wZWU4ofFf8uAeokA2mmo8YF4PN2xNA+qK f4L5yqKRezGdE2FqaOC/IBaOT4ZXE4wDjK8N0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J69Vt3U6dX0U+0OWZZcrhHM+CdlAe2nM+1U9UmvaE8Q=; b=nKzSiI50en9me755T+MqhFhHoYs2Z2s+oQ/PQXQizUNzz8EEI5no+sQIX0dZ9raEy0 k+BCv/sipSQLunSe4RiWyl779L9FURFcRfKWkhWiQuJelKZYdNob2pVFOl80vRIOPBJD SOCmoNzREazTG9mEqbYWqLoUFYeNbBm7GrMF8EUp3XhsDhy/crI47iuTc8bWLNF/MPEt Fib48MhwRZUDwG40zApympeHgvtYJdHylOPyR9UQLFwVRCKvYzfUH9vKP3dp+Dc5vu/2 pr16H5rbtaeDHAXcyw7nqImVTCzRoJCD16bV362NF3wLOM4pdN4HKe868wbsrDDfKuV8 FXIg== X-Gm-Message-State: AKS2vOzoGSrex1dpx2f+idTb7OLS7E+JYaO+mdzJySAcT9Y+A0/jo7eo FAzW9C76bVogb7MZ X-Received: by 10.84.233.204 with SMTP id m12mr22232054pln.292.1498801608706; Thu, 29 Jun 2017 22:46:48 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.46.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:46:47 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Jon Mason , Florian Fainelli Subject: [PATCH for-4.4 01/16] ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags Date: Fri, 30 Jun 2017 11:16:25 +0530 Message-Id: <1498801600-20896-2-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jon Mason commit 0c2bf9f95983fe30aa2f6463cb761cd42c2d521a upstream. GIC_PPI flags were misconfigured for the timers, resulting in errors like: [ 0.000000] GIC: PPI11 is secure or misconfigured Changing them to being edge triggered corrects the issue Suggested-by: Rafał Miłecki Signed-off-by: Jon Mason Fixes: d27509f1 ("ARM: BCM5301X: add dts files for BCM4708 SoC") Signed-off-by: Florian Fainelli [AmitP: Resolved minor cherry-pick conflict] Signed-off-by: Amit Pundir --- To be cherry-picked on linux-3.18.y as well. arch/arm/boot/dts/bcm5301x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi index 6f50f672efbd..de8ac998604d 100644 --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi @@ -54,14 +54,14 @@ timer@0200 { compatible = "arm,cortex-a9-global-timer"; reg = <0x0200 0x100>; - interrupts = ; + interrupts = ; clocks = <&clk_periph>; }; local-timer@0600 { compatible = "arm,cortex-a9-twd-timer"; reg = <0x0600 0x100>; - interrupts = ; + interrupts = ; clocks = <&clk_periph>; }; From patchwork Fri Jun 30 05:46:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106663 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904637qge; Thu, 29 Jun 2017 22:47:10 -0700 (PDT) X-Received: by 10.99.175.87 with SMTP id s23mr19595543pgo.240.1498801630099; Thu, 29 Jun 2017 22:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801630; cv=none; d=google.com; s=arc-20160816; b=N35bBr0B5c5vYg+Ydmj7c9ylPPk5nOtt4xFBZXWiglDKHnOZb0mqPZaj1rVPPvO272 5/WQVReKjFtTt4y2zzKkh3NCPMaoYzvT2AT6iAzsOezlV3YZBjbWg06tphkankuiKCdc SuOB3vQGSlYYuSYHFjkuQCFzagXCpXr+ErzSmg5d+c/tBkWD3g5H15i6hM0YQVJKZJr3 fW+Pka5v4843JSZWnZ5pWg+MOPOtDmnmeDjzTq2+o4EvQZRg/Hj892bwWQviNPm2O8d1 3r6LNI9Yx1SBKGbsRHOPINB5CfpZzK1sS8axCrlCiQwk0jxH9g0ouGF43dn8tPxLqQLn xlgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=N4rPQfGduSWWHKsC/TlMuUVQqta2CIIjOg1MwW593zA=; b=uZ/35t72cN+EqWZgFgQ2XtmQCDLKmJMj0GdHUFjZk6rQDNweqsHlASu4FaXdKqKAvL MXwOsV7enRm9c4k8MmVeJfmYIQNfJM9UJ/EQGKRX0prg0x/+4945pAzsRmJnYq1UuqB/ 2vIGFasAO+MWqrUm3PytM8dLV6Fn/dUhMrIVFjoQYDU3Ms8KTlLAzVxuphsP8Ia92vtQ 0wDSjkC3Niuod0pz7C6ONWiTtysvQSEeeo3ZLAYuKCF7Uv8O6exFOJGKzK332PV9qumK g23VLPTxaJIPHUMi/Fep9I1aLe3FOvdGG+Rey6FXk5qLW1AJGMCgk4Xj3B7Zt/B2ghpo 3uCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=ATwZ3OsE; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si1658852plk.568.2017.06.29.22.47.09; Thu, 29 Jun 2017 22:47:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=ATwZ3OsE; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751930AbdF3Fq7 (ORCPT + 6 others); Fri, 30 Jun 2017 01:46:59 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:35069 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751942AbdF3Fq5 (ORCPT ); Fri, 30 Jun 2017 01:46:57 -0400 Received: by mail-pf0-f179.google.com with SMTP id c73so61635949pfk.2 for ; Thu, 29 Jun 2017 22:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=N4rPQfGduSWWHKsC/TlMuUVQqta2CIIjOg1MwW593zA=; b=ATwZ3OsE8YzuR3uiKZImDFE4mE+S5CUGUbnsjlZ3fDOaUanQt22zns1yOp/gRfedCj zNA+8gF1U7SS71iqaL/D5gLObJ5p8wrqc2yHny8ZgVVhheX3ryQD8QNWcLTqPu8Az1Db o6EoQCUq5XQ6T5rt9JviUDm/vBmlppUcbBy0Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=N4rPQfGduSWWHKsC/TlMuUVQqta2CIIjOg1MwW593zA=; b=EPtpfhC9iodRMZ0X57w1t7CgFZglv8qjVGqcL/u9KzgLubZkEA9YD7r/rV4HUPDp6V PQg0Qt78xkQENHcdTsR6law0Z2jr+hkvGKoln73TKY+c5t6iLVmt1etBpP93YW9Fl7lG z1JOCRo8bMxCaomhskJxovjoyl2l21lJVcPb/gbuZ9T7FT+tbA9NODAemy4+7YmbQ1Mn T0LEBDF3VNJIoIc07c0hAKn89HCaplrZ7MaE/8P0IRzW4atEEh3zX2I8pUJPhQZut+nH OtvgrSonXlacBNYAr6GZZMs6dQwaQIJaeqJCSsb8AAMstZunPZyf1KDef0cdEi7TYwxA jqNw== X-Gm-Message-State: AKS2vOxhDeNwouivxTSv7CrpySD545TGiMNjdyQQ86ETbxJuN1AZMZOj X05fFvtpwVJJi0aW X-Received: by 10.84.234.22 with SMTP id m22mr4307095plk.268.1498801611711; Thu, 29 Jun 2017 22:46:51 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.46.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:46:50 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Gregory CLEMENT , "David S . Miller" Subject: [PATCH for-4.4 02/16] net: mvneta: Fix for_each_present_cpu usage Date: Fri, 30 Jun 2017 11:16:26 +0530 Message-Id: <1498801600-20896-3-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Gregory CLEMENT commit 129219e4950a3fcf9323b3bbd8b224c7aa873985 upstream. This patch convert the for_each_present in on_each_cpu, instead of applying on the present cpus it will be applied only on the online cpus. This fix a bug reported on http://thread.gmane.org/gmane.linux.ports.arm.kernel/468173. Using the macro on_each_cpu (instead of a for_each_* loop) also ensures that all the calls will be done all at once. Fixes: f86428854480 ("net: mvneta: Statically assign queues to CPUs") Reported-by: Stefan Roese Suggested-by: Jisheng Zhang Suggested-by: Russell King Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller Signed-off-by: Amit Pundir --- drivers/net/ethernet/marvell/mvneta.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 71ec9cb08e06..15056f06754a 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -2446,7 +2446,7 @@ static void mvneta_start_dev(struct mvneta_port *pp) mvneta_port_enable(pp); /* Enable polling on the port */ - for_each_present_cpu(cpu) { + for_each_online_cpu(cpu) { struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu); napi_enable(&port->napi); @@ -2472,7 +2472,7 @@ static void mvneta_stop_dev(struct mvneta_port *pp) phy_stop(pp->phy_dev); - for_each_present_cpu(cpu) { + for_each_online_cpu(cpu) { struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu); napi_disable(&port->napi); @@ -2902,13 +2902,11 @@ err_cleanup_rxqs: static int mvneta_stop(struct net_device *dev) { struct mvneta_port *pp = netdev_priv(dev); - int cpu; mvneta_stop_dev(pp); mvneta_mdio_remove(pp); unregister_cpu_notifier(&pp->cpu_notifier); - for_each_present_cpu(cpu) - smp_call_function_single(cpu, mvneta_percpu_disable, pp, true); + on_each_cpu(mvneta_percpu_disable, pp, true); free_percpu_irq(dev->irq, pp->ports); mvneta_cleanup_rxqs(pp); mvneta_cleanup_txqs(pp); From patchwork Fri Jun 30 05:46:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106662 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904632qge; Thu, 29 Jun 2017 22:47:09 -0700 (PDT) X-Received: by 10.98.73.65 with SMTP id w62mr2801587pfa.61.1498801629764; Thu, 29 Jun 2017 22:47:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801629; cv=none; d=google.com; s=arc-20160816; b=peOTH6xZG1sSiKr44SDY2bBl8z72K4Acy9PAhWQFX+vMMmtFfaqfTaJ3wtLG7wqpY3 WRqOyluyVqOC46+JB83/os1WBcCjIogjrqO21CfYCfT2RKBPBME1MNCwW7qB6pqk+To2 zcIf8jSAQ7WqVkuL1snMxqZ1YB51pjML2YuOksC/fIMXgiQAcDMbnF18ngFZDSh8qr/8 gCejqzstsIpsP/N4uukJuNmM3NUM+PzNXORsCovrr8Hy+6QteRqDXoNoKsp9IluHWId8 jm36FLt1go+TPOMqUGfclz6a8SrDfL6k0QN4SSNdGvbsELbRscoBfL+YlJDarsK702mx /+BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=fsLLYHBPsKKb3mLCINlcyWXRGaZKhhkZ1uczRcer8+E=; b=cZFRNadMn2I67CafcN/mu2i6GaAJ+P9bdYEwLM0CWNJmdz+Q4viQ2pGe/NgxfQ4bbT iBq90aRW+7a8XlYwtP+Ij2zlH1Fe37gBF9g00YE4sXp7wUlNwiitsLY5hnnhZ+YcygyE MeBOIF/4UQ4pWymdkLDnGgkf3FmLY+DPZWKdyPKTLNYU3GqScRH8fvL0MZwzWVYVVsjT SPMuR5bvuzTEan8ofvQtub9vYZtRwPPU1aiay3UnP/h6cz/3oroc/cOT/XJ9/r5JvWBc Ebqono7Nau8tbya9ED5fdVbCsa3Z8aOUKnPhVuLusd+BMh2hR/dtGRc3pvhrxMAnMeuV sIUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=D1st9FoL; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si1658852plk.568.2017.06.29.22.47.09; Thu, 29 Jun 2017 22:47:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=D1st9FoL; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751944AbdF3Fq5 (ORCPT + 6 others); Fri, 30 Jun 2017 01:46:57 -0400 Received: from mail-pg0-f51.google.com ([74.125.83.51]:33311 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751333AbdF3Fq4 (ORCPT ); Fri, 30 Jun 2017 01:46:56 -0400 Received: by mail-pg0-f51.google.com with SMTP id f127so58488422pgc.0 for ; Thu, 29 Jun 2017 22:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fsLLYHBPsKKb3mLCINlcyWXRGaZKhhkZ1uczRcer8+E=; b=D1st9FoLBFC4Za2WgU3p2+GZJedey80aG+b1rVtReiOgENQ3MNNnQiob0qq3S2kOVk 0AwMEdEaHlfrdYV3Df7eAUxlZlIrVfVYZ2kW6lkO5gBqxRxtx3qeXeN61JTZxvqJbvRr 0gdTrLq7bSGyrUq7yfPo35SxK2Vf4VPTM1fJs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fsLLYHBPsKKb3mLCINlcyWXRGaZKhhkZ1uczRcer8+E=; b=ddR93YvUerzCqH18gkmoTKLm5V3iJhxr9p+Nip0mjl5eHgEIf84OGyBSOThq/B68+v M5F7Qj1JUEdkcQ8rPDfDJNbYXLy1/n+Vj1yh6v254Q1ZuE0Sbo/pNdeFqrHBTN1dlRqH 560Gb6oeC7RN5Q6oeftTTXj9e4OIUNz4JKVCza/XruAlTLV798XOhcnyZlgCGKyZavLB 0EPdgb3Ej8gwcy6akB4oREhLLOaFrll6t6wPfpor3MrnO6OcNI3S3VLr8Oocv+SdLUBF xWpvNioV7kOEP3wg7UhwJd5/BBdmbJRizvuFpDZDmSRMmSLE1AO127UtTC+pFlOXTrxv ZzQg== X-Gm-Message-State: AKS2vOwk7KUcFOT6942BPnWBE5fYEY1ynmBMQ3TXBC9VPIVzDKT0RaHb xc8OvX3hiA/G+Mlh X-Received: by 10.84.212.151 with SMTP id e23mr22617577pli.115.1498801615303; Thu, 29 Jun 2017 22:46:55 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.46.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:46:54 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Felix Fietkau , Alban Bedel , sergei.shtylyov@cogentembedded.com, linux-mips@linux-mips.org, Ralf Baechle Subject: [PATCH for-4.4 03/16] MIPS: ath79: fix regression in PCI window initialization Date: Fri, 30 Jun 2017 11:16:27 +0530 Message-Id: <1498801600-20896-4-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Felix Fietkau commit 9184dc8ffa56844352b3b9860e562ec4ee41176f upstream. ath79_ddr_pci_win_base has the type void __iomem *, so register offsets need to be a multiple of 4. Cc: Alban Bedel Fixes: 24b0e3e84fbf ("MIPS: ath79: Improve the DDR controller interface") Signed-off-by: Felix Fietkau Cc: sergei.shtylyov@cogentembedded.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13258/ Signed-off-by: Ralf Baechle Signed-off-by: Amit Pundir --- arch/mips/ath79/common.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) -- 2.7.4 diff --git a/arch/mips/ath79/common.c b/arch/mips/ath79/common.c index 3cedd1f95e0f..8ae4067a5eda 100644 --- a/arch/mips/ath79/common.c +++ b/arch/mips/ath79/common.c @@ -76,14 +76,14 @@ void ath79_ddr_set_pci_windows(void) { BUG_ON(!ath79_ddr_pci_win_base); - __raw_writel(AR71XX_PCI_WIN0_OFFS, ath79_ddr_pci_win_base + 0); - __raw_writel(AR71XX_PCI_WIN1_OFFS, ath79_ddr_pci_win_base + 1); - __raw_writel(AR71XX_PCI_WIN2_OFFS, ath79_ddr_pci_win_base + 2); - __raw_writel(AR71XX_PCI_WIN3_OFFS, ath79_ddr_pci_win_base + 3); - __raw_writel(AR71XX_PCI_WIN4_OFFS, ath79_ddr_pci_win_base + 4); - __raw_writel(AR71XX_PCI_WIN5_OFFS, ath79_ddr_pci_win_base + 5); - __raw_writel(AR71XX_PCI_WIN6_OFFS, ath79_ddr_pci_win_base + 6); - __raw_writel(AR71XX_PCI_WIN7_OFFS, ath79_ddr_pci_win_base + 7); + __raw_writel(AR71XX_PCI_WIN0_OFFS, ath79_ddr_pci_win_base + 0x0); + __raw_writel(AR71XX_PCI_WIN1_OFFS, ath79_ddr_pci_win_base + 0x4); + __raw_writel(AR71XX_PCI_WIN2_OFFS, ath79_ddr_pci_win_base + 0x8); + __raw_writel(AR71XX_PCI_WIN3_OFFS, ath79_ddr_pci_win_base + 0xc); + __raw_writel(AR71XX_PCI_WIN4_OFFS, ath79_ddr_pci_win_base + 0x10); + __raw_writel(AR71XX_PCI_WIN5_OFFS, ath79_ddr_pci_win_base + 0x14); + __raw_writel(AR71XX_PCI_WIN6_OFFS, ath79_ddr_pci_win_base + 0x18); + __raw_writel(AR71XX_PCI_WIN7_OFFS, ath79_ddr_pci_win_base + 0x1c); } EXPORT_SYMBOL_GPL(ath79_ddr_set_pci_windows); From patchwork Fri Jun 30 05:46:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106664 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904640qge; Thu, 29 Jun 2017 22:47:10 -0700 (PDT) X-Received: by 10.99.104.136 with SMTP id d130mr19138904pgc.236.1498801630449; Thu, 29 Jun 2017 22:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801630; cv=none; d=google.com; s=arc-20160816; b=D4cEJhRfepHdGf0zOuP7aE3mGnOJu1ao5j6dACmxdbOkuW4uaeiSfDFGXYrz75wLcE t015kWRF0W539SXgfmzGTKKr7lLelNGz5wrN5BnHBys3CCqs3+QXnNc/k6O9ymKm/WwR VE/jCHVW29F40oBL2h3bwb6JyYAJsISfRn5sEzCYZyTrgsLii/aOvKOeBoHPc2odt1dQ x2FqZyGzIEubiVMhB7eecegw5EZYiCMEZbFcRMiinpcpaadSFz/Jl4JUGLSM6yLr9cj5 LeibNIeIMkJE3UNvcV2zzkqwlTVV7mAKKrCbLQSRtdUka8wsJhmmmvM5AKR+JkezIDsV BwWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=YKb3SKp+YykpyYGPW7DjF12C4OYgDfq9gXRJePx0N3Y=; b=ZAUtkkvaoCl5+14MLrJRCQIX5lDb1Qf5o6Am/TNT710IpEm8VjeTTNTaW8Oe7nXa46 xx5TO3JES/qv1W9Zs/dyNGBq6EY2X0RMW2449hEQZXdmI42ekNZbSb1tXU00dwLYPINy 3Kz7JSmDvy+kOF8fcUgwKDuHo28RAKKEkf4e+CczgcnPtk0QynlgIomGO0zF/XvwdyYI sMOs5BcWn+/HWg9VykFMTf4VzQa6OAY5T4A6Y1pr5uglpUsVIzMWSlUPTE+iqW3XxJR7 JqMKByv6WgBAvoqNPfbuDh3GtlgvGecYMCQe2vhfyOdCPq7Dct2zcD+TxIrDXOajLd0E 8Z2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=QMNYtpds; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si1658852plk.568.2017.06.29.22.47.10; Thu, 29 Jun 2017 22:47:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=QMNYtpds; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751942AbdF3FrA (ORCPT + 6 others); Fri, 30 Jun 2017 01:47:00 -0400 Received: from mail-pg0-f45.google.com ([74.125.83.45]:33325 "EHLO mail-pg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751333AbdF3Fq7 (ORCPT ); Fri, 30 Jun 2017 01:46:59 -0400 Received: by mail-pg0-f45.google.com with SMTP id f127so58489041pgc.0 for ; Thu, 29 Jun 2017 22:46:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YKb3SKp+YykpyYGPW7DjF12C4OYgDfq9gXRJePx0N3Y=; b=QMNYtpds0wgytrB7TUNhPc3lvEnHra5FpNjVgBpzk0Ey/FD+0Kvd4lHUB5Unz2KyC+ X/8/3a5v9v69mAJn+Qr2sPRgKVs0D2H9hXOzFTRZoIKY4DpnsIRfe67yYk0uLutd0WFQ B4ZS2TALWzoQmobCP8ZdU334UUkMft1JwTx/0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YKb3SKp+YykpyYGPW7DjF12C4OYgDfq9gXRJePx0N3Y=; b=FbLOSZ58YsiWSi1/Rc1312gj0Gp9P+1l7eSvQxZEIrE52zDobb3Y93j7IDdp4LGX1Z 8EYBZBkNDorDuFIjCOc0QSwVohM4ujr4cpazq/HZx0Yu4jzAQi/V42nAqYFrgdDYcyjx qS4+wh+syAzBBotiTS9b9IuGNyynQrRL95Ow/Qpk1LO3X6UkOp3NfIeBajnKAp6vq7mi /PezYFEX10KkS+GK+8V+OXmTAfEXBbTaiEhV0iRu8E966TIlqYegJ/1BnnhyM4+ayCRN 1RkOb7ula2MXOGlbovhGzMjxESaeXVidSS8Z9fQF1kKoFRZx+tr0ejaxisJaw7whjQ3G 6m/A== X-Gm-Message-State: AKS2vOxsAJWt2jpVtV1nXjlXXLUleZhJ2ioiksj0nLcx8dQDk+yVhZk1 tlWdxGtJu4LW5T6n X-Received: by 10.101.83.135 with SMTP id x7mr19669062pgq.63.1498801618257; Thu, 29 Jun 2017 22:46:58 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.46.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:46:57 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Florian Fainelli , "David S . Miller" Subject: [PATCH for-4.4 04/16] net: korina: Fix NAPI versus resources freeing Date: Fri, 30 Jun 2017 11:16:28 +0530 Message-Id: <1498801600-20896-5-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Florian Fainelli commit e6afb1ad88feddf2347ea779cfaf4d03d3cd40b6 upstream. Commit beb0babfb77e ("korina: disable napi on close and restart") introduced calls to napi_disable() that were missing before, unfortunately this leaves a small window during which NAPI has a chance to run, yet we just freed resources since korina_free_ring() has been called: Fix this by disabling NAPI first then freeing resource, and make sure that we also cancel the restart task before doing the resource freeing. Fixes: beb0babfb77e ("korina: disable napi on close and restart") Reported-by: Alexandros C. Couloumbis Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Amit Pundir --- To be cherry-picked on linux-3.18.y and linux-4.9.y as well. drivers/net/ethernet/korina.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index d74f5f4e5782..07eabf72c480 100644 --- a/drivers/net/ethernet/korina.c +++ b/drivers/net/ethernet/korina.c @@ -900,10 +900,10 @@ static void korina_restart_task(struct work_struct *work) DMA_STAT_DONE | DMA_STAT_HALT | DMA_STAT_ERR, &lp->rx_dma_regs->dmasm); - korina_free_ring(dev); - napi_disable(&lp->napi); + korina_free_ring(dev); + if (korina_init(dev) < 0) { printk(KERN_ERR "%s: cannot restart device\n", dev->name); return; @@ -1064,12 +1064,12 @@ static int korina_close(struct net_device *dev) tmp = tmp | DMA_STAT_DONE | DMA_STAT_HALT | DMA_STAT_ERR; writel(tmp, &lp->rx_dma_regs->dmasm); - korina_free_ring(dev); - napi_disable(&lp->napi); cancel_work_sync(&lp->restart_task); + korina_free_ring(dev); + free_irq(lp->rx_irq, dev); free_irq(lp->tx_irq, dev); free_irq(lp->ovr_irq, dev); From patchwork Fri Jun 30 05:46:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106665 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904646qge; Thu, 29 Jun 2017 22:47:10 -0700 (PDT) X-Received: by 10.99.104.74 with SMTP id d71mr19934058pgc.7.1498801630775; Thu, 29 Jun 2017 22:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801630; cv=none; d=google.com; s=arc-20160816; b=CyN5ScF+PGihkWsAWuO1X6x9ZLA0G6i1YLTd+hdfBRlv2aaOrEp87v0xV+KSxIIRdD 03OakjN4u6IdXBnWRpblpYlIaEBK48WdUDBx/qqOo2cPzMvM3CRyrPWgOkq1ncWRZnts w9TYdX80FcrUQhdB6RxQZsiaZ8IliGqu1Ds1U82kBFwTHhabO4cLW7b8nR6Q3iuF6rWd rdpEXLocnNcdZkAEAHEmYCnaqphEkmIAGUdIZb0ERwer0OUhF0t4jSkNnt1MA5y7EIrw JH5ZC2sON6KmNjhS42lMcyhnn3ikZip7YTWAvzfVv+mB7tNYbOEpKvdNibxOg8pNs75m OPzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=bgszaRMUw+BG3bVg4C/VGEvC3vNAqyCaaxSzx06C97I=; b=M5FJVNBC+MBruENN7skMF3uVe2/KYZYoRnmuoIaXxSkFGfa7XgArBnvy3oCyNZsaV5 WZKxYKzid7fZjbDFrZ3iQ9PPINmEnmdWONmM4t+4/g3P6ivRuJCGc3A36m+aT4RM8tQW 6gvkYREyg+EW+6Q/TaVWbg8OiGQc/XsLYJcS6Xof0dNNVWikqv6bG2aSa5dOuplwTxkc slb8f3f/o9iCWfbHbvc6ny2eMlI/kbsGbSqlO4izl0SLqlC59Y22wNURy+4cqTvASsvQ j7Zqy+Ci4bB34+YD8n5+17oi3tjaobQJNgW7qKeA5a7zP9Rq0q7k3ibPlig1A8q81Ur+ YvKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=eTOLPzk0; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si1658852plk.568.2017.06.29.22.47.10; Thu, 29 Jun 2017 22:47:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=eTOLPzk0; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751946AbdF3FrH (ORCPT + 6 others); Fri, 30 Jun 2017 01:47:07 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:33985 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751715AbdF3FrH (ORCPT ); Fri, 30 Jun 2017 01:47:07 -0400 Received: by mail-pf0-f181.google.com with SMTP id s66so61546603pfs.1 for ; Thu, 29 Jun 2017 22:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bgszaRMUw+BG3bVg4C/VGEvC3vNAqyCaaxSzx06C97I=; b=eTOLPzk0CY8BwxoTPfUiCQcQvKt4JU6aKMpV5Jxk2rq2TjpR26gieiaB/8V1Gkm2co a7Pm2sgJCQSRy97HV8Y56dzYXw1Q/vvpSIIGfPJG7keAJHdOVcSOsNrscmwcgMWzOSsu vVvtUeOO6vn5jFVQdIyfmyx0Z7UMuX22Mgxqw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bgszaRMUw+BG3bVg4C/VGEvC3vNAqyCaaxSzx06C97I=; b=SkV/wXTDD34icT3eMNboPJi0Zuly9LFOZ3PyYehsUrnPiFvVTWHKP1sOUCrDXxDHZa lbrovK/nXMHvxlGmJE9coyCuM1IShabnCfDt44+aO4hnMQExiQSV2JuAMvbt8hDmZqqQ YE/dGhUnSsUpNSEMWa/qquoIXfJIghCJeqi1Dvls43+IvjNJKIst5T2pGk6VSWzlZdPQ cMeFXc+uT2D8hez/EcUsgV8i+9ztfJFsIaglm8ph0kihwvRW+jaK5gnaAZU9nJN/9p+o DZqnln7zo2chLA4xOwr6XRGWT6SaegwluIWTaQo2ivpgBa/ftsZrr9H/b2XKOPwTNbIv n2Qw== X-Gm-Message-State: AKS2vOxRZ1F2Qu9+IWzo9nRz/aoVIOuS8j7uTLIq3q4puioJ2vfiXVyo MUeaLr4HlqcibSQ0 X-Received: by 10.84.212.1 with SMTP id d1mr21967624pli.26.1498801621374; Thu, 29 Jun 2017 22:47:01 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.46.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:47:00 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , John Crispin , linux-mips@linux-mips.org, Ralf Baechle Subject: [PATCH for-4.4 05/16] MIPS: ralink: MT7688 pinmux fixes Date: Fri, 30 Jun 2017 11:16:29 +0530 Message-Id: <1498801600-20896-6-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: John Crispin commit e906a5f67e5a3337d696ec848e9c28fc68b39aa3 upstream. A few fixes to the pinmux data, 2 new muxes and a minor whitespace cleanup. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11991/ Signed-off-by: Ralf Baechle Signed-off-by: Amit Pundir --- arch/mips/ralink/mt7620.c | 80 +++++++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 30 deletions(-) -- 2.7.4 diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c index dfb04fcedb04..733768e9877c 100644 --- a/arch/mips/ralink/mt7620.c +++ b/arch/mips/ralink/mt7620.c @@ -107,31 +107,31 @@ static struct rt2880_pmx_group mt7620a_pinmux_data[] = { }; static struct rt2880_pmx_func pwm1_grp_mt7628[] = { - FUNC("sdcx", 3, 19, 1), + FUNC("sdxc d6", 3, 19, 1), FUNC("utif", 2, 19, 1), FUNC("gpio", 1, 19, 1), - FUNC("pwm", 0, 19, 1), + FUNC("pwm1", 0, 19, 1), }; static struct rt2880_pmx_func pwm0_grp_mt7628[] = { - FUNC("sdcx", 3, 18, 1), + FUNC("sdxc d7", 3, 18, 1), FUNC("utif", 2, 18, 1), FUNC("gpio", 1, 18, 1), - FUNC("pwm", 0, 18, 1), + FUNC("pwm0", 0, 18, 1), }; static struct rt2880_pmx_func uart2_grp_mt7628[] = { - FUNC("sdcx", 3, 20, 2), + FUNC("sdxc d5 d4", 3, 20, 2), FUNC("pwm", 2, 20, 2), FUNC("gpio", 1, 20, 2), - FUNC("uart", 0, 20, 2), + FUNC("uart2", 0, 20, 2), }; static struct rt2880_pmx_func uart1_grp_mt7628[] = { - FUNC("sdcx", 3, 45, 2), + FUNC("sw_r", 3, 45, 2), FUNC("pwm", 2, 45, 2), FUNC("gpio", 1, 45, 2), - FUNC("uart", 0, 45, 2), + FUNC("uart1", 0, 45, 2), }; static struct rt2880_pmx_func i2c_grp_mt7628[] = { @@ -143,21 +143,21 @@ static struct rt2880_pmx_func i2c_grp_mt7628[] = { static struct rt2880_pmx_func refclk_grp_mt7628[] = { FUNC("reclk", 0, 36, 1) }; static struct rt2880_pmx_func perst_grp_mt7628[] = { FUNC("perst", 0, 37, 1) }; -static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 15, 38) }; +static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 38, 1) }; static struct rt2880_pmx_func spi_grp_mt7628[] = { FUNC("spi", 0, 7, 4) }; static struct rt2880_pmx_func sd_mode_grp_mt7628[] = { FUNC("jtag", 3, 22, 8), FUNC("utif", 2, 22, 8), FUNC("gpio", 1, 22, 8), - FUNC("sdcx", 0, 22, 8), + FUNC("sdxc", 0, 22, 8), }; static struct rt2880_pmx_func uart0_grp_mt7628[] = { FUNC("-", 3, 12, 2), FUNC("-", 2, 12, 2), FUNC("gpio", 1, 12, 2), - FUNC("uart", 0, 12, 2), + FUNC("uart0", 0, 12, 2), }; static struct rt2880_pmx_func i2s_grp_mt7628[] = { @@ -171,7 +171,7 @@ static struct rt2880_pmx_func spi_cs1_grp_mt7628[] = { FUNC("-", 3, 6, 1), FUNC("refclk", 2, 6, 1), FUNC("gpio", 1, 6, 1), - FUNC("spi", 0, 6, 1), + FUNC("spi cs1", 0, 6, 1), }; static struct rt2880_pmx_func spis_grp_mt7628[] = { @@ -188,28 +188,44 @@ static struct rt2880_pmx_func gpio_grp_mt7628[] = { FUNC("gpio", 0, 11, 1), }; -#define MT7628_GPIO_MODE_MASK 0x3 - -#define MT7628_GPIO_MODE_PWM1 30 -#define MT7628_GPIO_MODE_PWM0 28 -#define MT7628_GPIO_MODE_UART2 26 -#define MT7628_GPIO_MODE_UART1 24 -#define MT7628_GPIO_MODE_I2C 20 -#define MT7628_GPIO_MODE_REFCLK 18 -#define MT7628_GPIO_MODE_PERST 16 -#define MT7628_GPIO_MODE_WDT 14 -#define MT7628_GPIO_MODE_SPI 12 -#define MT7628_GPIO_MODE_SDMODE 10 -#define MT7628_GPIO_MODE_UART0 8 -#define MT7628_GPIO_MODE_I2S 6 -#define MT7628_GPIO_MODE_CS1 4 -#define MT7628_GPIO_MODE_SPIS 2 -#define MT7628_GPIO_MODE_GPIO 0 +static struct rt2880_pmx_func wled_kn_grp_mt7628[] = { + FUNC("rsvd", 3, 35, 1), + FUNC("rsvd", 2, 35, 1), + FUNC("gpio", 1, 35, 1), + FUNC("wled_kn", 0, 35, 1), +}; + +static struct rt2880_pmx_func wled_an_grp_mt7628[] = { + FUNC("rsvd", 3, 35, 1), + FUNC("rsvd", 2, 35, 1), + FUNC("gpio", 1, 35, 1), + FUNC("wled_an", 0, 35, 1), +}; + +#define MT7628_GPIO_MODE_MASK 0x3 + +#define MT7628_GPIO_MODE_WLED_KN 48 +#define MT7628_GPIO_MODE_WLED_AN 32 +#define MT7628_GPIO_MODE_PWM1 30 +#define MT7628_GPIO_MODE_PWM0 28 +#define MT7628_GPIO_MODE_UART2 26 +#define MT7628_GPIO_MODE_UART1 24 +#define MT7628_GPIO_MODE_I2C 20 +#define MT7628_GPIO_MODE_REFCLK 18 +#define MT7628_GPIO_MODE_PERST 16 +#define MT7628_GPIO_MODE_WDT 14 +#define MT7628_GPIO_MODE_SPI 12 +#define MT7628_GPIO_MODE_SDMODE 10 +#define MT7628_GPIO_MODE_UART0 8 +#define MT7628_GPIO_MODE_I2S 6 +#define MT7628_GPIO_MODE_CS1 4 +#define MT7628_GPIO_MODE_SPIS 2 +#define MT7628_GPIO_MODE_GPIO 0 static struct rt2880_pmx_group mt7628an_pinmux_data[] = { GRP_G("pmw1", pwm1_grp_mt7628, MT7628_GPIO_MODE_MASK, 1, MT7628_GPIO_MODE_PWM1), - GRP_G("pmw1", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK, + GRP_G("pmw0", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK, 1, MT7628_GPIO_MODE_PWM0), GRP_G("uart2", uart2_grp_mt7628, MT7628_GPIO_MODE_MASK, 1, MT7628_GPIO_MODE_UART2), @@ -233,6 +249,10 @@ static struct rt2880_pmx_group mt7628an_pinmux_data[] = { 1, MT7628_GPIO_MODE_SPIS), GRP_G("gpio", gpio_grp_mt7628, MT7628_GPIO_MODE_MASK, 1, MT7628_GPIO_MODE_GPIO), + GRP_G("wled_an", wled_an_grp_mt7628, MT7628_GPIO_MODE_MASK, + 1, MT7628_GPIO_MODE_WLED_AN), + GRP_G("wled_kn", wled_kn_grp_mt7628, MT7628_GPIO_MODE_MASK, + 1, MT7628_GPIO_MODE_WLED_KN), { 0 } }; From patchwork Fri Jun 30 05:46:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106666 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904656qge; Thu, 29 Jun 2017 22:47:11 -0700 (PDT) X-Received: by 10.99.172.67 with SMTP id z3mr18877183pgn.246.1498801631725; Thu, 29 Jun 2017 22:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801631; cv=none; d=google.com; s=arc-20160816; b=U17znsDiDav3pfkgRakv8VnB+YHJfO7UfwVXf1I/KKvaPTE0ZOpSD1PTJ0fXb4hlpx Zd69ICwtNiCalGCWF6D+5kzc6Y0Bc5xGw/6a6d8ZC1BEq4NDs2CgXn2OD6FccE3quwUa v6xXHDnPTrQbGQR7ITcFLfnEltdosD/xVko0wnr7xse1lpl1hmL4Qm1JSlBad4/r3c8+ xWkeAq+H4lkA8LjyjQqEPeRRQKfIhPAS/g5L4fP0ROY4aACc0VE/ABXfb5pE64EmRByh BET5/2ELlFOpe4vvJclm3u6V/+cE6lEdCanbKrH0NTOzbJ4iWrEhhKrwjX18v6nx9zOC vl5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=qsQw8YfTN4V/2RxuF5rUjMkS3vhgniLUlofFz0Ul2P4=; b=qEB+GDLY9GK7LhuE6UaRTZBU7rPQ6EEBnHUPW8B9rGdbXXgU3hckMjOTCZ152c4gbY 2fEomtSF0XtY5DAg31+2n5C6HktWmTKqpX+exB/fBl8SufOzLJLT3qj8FGltmiBCRx91 yJ5eUKvXjUVqHZ/RvdPf2NE5n0O1CAt7/Tfpu5vv7qgr8CcWD0w/7B8J1gHhp9CSj4cF JyC9YFMcJF8gUCON7q6+g/6oLS2I+cAwQTw+hcZRZA7oletsH99Cy6WFQNCCHXbFeoYD zpt/n2M8hfY1wm9fb23UkXYPJmnOw6qOFBeJHeCtAzL7m/EfmNQh8nDlsFWnBCUcs3b4 fMtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=POl0Ew+L; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si1658852plk.568.2017.06.29.22.47.11; Thu, 29 Jun 2017 22:47:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=POl0Ew+L; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751947AbdF3FrK (ORCPT + 6 others); Fri, 30 Jun 2017 01:47:10 -0400 Received: from mail-pg0-f46.google.com ([74.125.83.46]:35626 "EHLO mail-pg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751715AbdF3FrK (ORCPT ); Fri, 30 Jun 2017 01:47:10 -0400 Received: by mail-pg0-f46.google.com with SMTP id j186so58458405pge.2 for ; Thu, 29 Jun 2017 22:47:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qsQw8YfTN4V/2RxuF5rUjMkS3vhgniLUlofFz0Ul2P4=; b=POl0Ew+LBNego56svIblaXg+OIKC2zQafP+IvAPJE+1bidbGDgLxXsgBD2ra1zaa3I TOEqpacTX5HRqVee2fV4uz/BQYQXa2+pWPiVOVPiOzmJudL2S1zW7HwvXV9FfbEAgJyT KqvYQ0ir8PH580YUul8MSv0py78f9WrSzqoH8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qsQw8YfTN4V/2RxuF5rUjMkS3vhgniLUlofFz0Ul2P4=; b=D5XLmByfCjBR+QM5FKlerNSCUOU5MQh7quub+ViLBjo3HSwMlSoURWcWhS3Fmk/jT9 FvZohn9Uv9Nya/FcPUoKg2wR1dtl8BgdkYLsbVMH9G8QMuDJZxlTDOMcEQqK1FihsPuY GvqwAzOwoY1X5QqDrzc9iOXeuBkQ5iJoBgeYVatwacH4YpPm5IGKdsji9nH+w/qeFWW8 55ADzugeoYcHgu1a89QThUEOYZYN76onInPSDDTQvUfIhZqWMgn6P78bsc3Du2tQhi0H 1dH57aM38RJteBeO2Oo39+oX0W9EotbyyiIcEiFwBicZvQXmE67mb7jCvkghMfvaFbMn zguA== X-Gm-Message-State: AKS2vOwG8kTDBKYwwFaxNiYBXbq+I/b6i1Zlq9NRekugxEJOzB/mvZf3 RI0OOfp1Fex7Wa4B X-Received: by 10.99.4.6 with SMTP id 6mr19792491pge.126.1498801624614; Thu, 29 Jun 2017 22:47:04 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.47.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:47:03 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , John Crispin , linux-mips@linux-mips.org, Ralf Baechle Subject: [PATCH for-4.4 06/16] MIPS: ralink: fix USB frequency scaling Date: Fri, 30 Jun 2017 11:16:30 +0530 Message-Id: <1498801600-20896-7-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: John Crispin commit fad2522272ed5ed451d2d7b1dc547ddf3781cc7e upstream. Commit 418d29c87061 ("MIPS: ralink: Unify SoC id handling") was not fully correct. The logic for the SoC check got inverted. We need to check if it is not a MT76x8. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11992/ Signed-off-by: Ralf Baechle Signed-off-by: Amit Pundir --- arch/mips/ralink/mt7620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c index 733768e9877c..4c17dc6e8ae9 100644 --- a/arch/mips/ralink/mt7620.c +++ b/arch/mips/ralink/mt7620.c @@ -459,7 +459,7 @@ void __init ralink_clk_init(void) ralink_clk_add("10000c00.uartlite", periph_rate); ralink_clk_add("10180000.wmac", xtal_rate); - if (IS_ENABLED(CONFIG_USB) && is_mt76x8()) { + if (IS_ENABLED(CONFIG_USB) && !is_mt76x8()) { /* * When the CPU goes into sleep mode, the BUS clock will be * too low for USB to function properly. Adjust the busses From patchwork Fri Jun 30 05:46:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106673 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904905qge; Thu, 29 Jun 2017 22:47:39 -0700 (PDT) X-Received: by 10.84.224.11 with SMTP id r11mr22741780plj.267.1498801659328; Thu, 29 Jun 2017 22:47:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801659; cv=none; d=google.com; s=arc-20160816; b=L6n7EINraKZu+EuRdMCrElfNKSdEmu7Hx7xajTNeDmCGk7Ans5rkH3JecVVY0cqG3M mZchIub2AOrKHTH9IFvN+7GkWhSnnFj8CQbOlREQD7mpSqQmFnW9kIwbEJZNpO4CKV0I uhZudZGe96WEx3lt0awXniNFvUqnpyv8MO7noqCdanR/sTkcIqihvPZ9OArwgKE9vfRj W8XNzXD4X4FnFagzvEaooHDBgvdH7FZ6U/Y7pEyfySI1pbPHLbETnxQqHlzFI1TrCOhF DQvk7RD1oRfOaeNCn7sdehqpo/OMwBtppBI2Wnn95h0luuzne3GHPJOcYWG7I2erCo/E T+pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=PNf+3ZdwA0pkw3e3Ly13LkN0CHKMZ6CDCOKI2VxOsC0=; b=gjTP6YmYyxI5AKKfxyYtE2tZasJoMMmi/8HengjvhXvfL6+Z/iJlmn5Y/CP47JGaoI y5E4gPH+Gaq/qacRuX6cHADBL0JHqtYGO2m8M3iVdjXziinMohdfqO2k/lu3pMHgJEg9 Cg61L2fqHJzY2aoLFa4gHPmQgeVen1MwZEErLUS7o81ToODu5505t7ygSSm5CdNgCctn PODFLcS5ZLjvPds6T5rOPKfqdY4WOy4VAg/IoO5ECV18sonIjr15z6TBHw4v+6WfwX/a KQEJHrnVlLZZ5avJEZsdO6FLcf4xBjrQP4lj3ngrgZeSI6TSLI6bKLabihyml4QWUN5B 4ILw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=daNU1VF1; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si4519277pgj.463.2017.06.29.22.47.39; Thu, 29 Jun 2017 22:47:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=daNU1VF1; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752071AbdF3Frh (ORCPT + 6 others); Fri, 30 Jun 2017 01:47:37 -0400 Received: from mail-pg0-f53.google.com ([74.125.83.53]:35639 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751973AbdF3FrN (ORCPT ); Fri, 30 Jun 2017 01:47:13 -0400 Received: by mail-pg0-f53.google.com with SMTP id j186so58459059pge.2 for ; Thu, 29 Jun 2017 22:47:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PNf+3ZdwA0pkw3e3Ly13LkN0CHKMZ6CDCOKI2VxOsC0=; b=daNU1VF1Nj0sLN79j/jQhOFcsy3HCsY0wFIFQWib+U3BZ7/COA/pbMYEnklW6Bsdac syIDqOXtoBb6BA5W7StOu++qINIolIIyZiIGnocY/p+GLOXEijkMEjx2YwOH4f+pSCBu u4QKrauok7qjQv6lX84p/w2eOF+6bBtzsOwiM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PNf+3ZdwA0pkw3e3Ly13LkN0CHKMZ6CDCOKI2VxOsC0=; b=CtdccT6iTU4Cy+i7DuP7Bkg3mN7Ptbe2xLiIqE5iiOlWvWKrq8VNFnHrYfuiZZRm/U UageUUWINgxrv1Yz6hM1U6t90Qez4IFN5R1xt1oWyuI/N8nqVRpFvL2Eo8ekWJ3hO7qt yMNk1JpzVV7m4QzP0ZgD6P194IzDXm//d03upfsOfR8ooFRae87N+g+6FMH2c7DftAHa r2g7WGRJa0uuR5CKq6YUDwyDopfjU+FszIDBqcQQJtJZPqFvzHE7nu3wUZs/UVL0cDor 4HJ0oCWqwj2xwGj4SAysjrS9KaZH94OtuUP0KjQdW+2yNNQQkiffhvxRGwKaIj+CtA4H vHtA== X-Gm-Message-State: AKS2vOwD9ZDaZ/Pl7xIkmBfBMYZ7JBP/Zb08h0eWvx9aVCUTmsDOuJ56 pqlHKvjMGitcnwlv X-Received: by 10.101.85.206 with SMTP id k14mr18987953pgs.153.1498801627575; Thu, 29 Jun 2017 22:47:07 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.47.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:47:06 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , John Crispin , linux-mips@linux-mips.org, Ralf Baechle Subject: [PATCH for-4.4 07/16] MIPS: ralink: Fix invalid assignment of SoC type Date: Fri, 30 Jun 2017 11:16:31 +0530 Message-Id: <1498801600-20896-8-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: John Crispin commit 0af3a40f09a2a85089037a0b5b51471fa48b229e upstream. Commit 418d29c87061 ("MIPS: ralink: Unify SoC id handling") introduced broken code. We obviously need to assign the value. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11993/ Signed-off-by: Ralf Baechle Signed-off-by: Amit Pundir --- arch/mips/ralink/rt288x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/arch/mips/ralink/rt288x.c b/arch/mips/ralink/rt288x.c index 15506a1ff22a..9dd67749c592 100644 --- a/arch/mips/ralink/rt288x.c +++ b/arch/mips/ralink/rt288x.c @@ -109,5 +109,5 @@ void prom_soc_init(struct ralink_soc_info *soc_info) soc_info->mem_size_max = RT2880_MEM_SIZE_MAX; rt2880_pinmux_data = rt2880_pinmux_data_act; - ralink_soc == RT2880_SOC; + ralink_soc = RT2880_SOC; } From patchwork Fri Jun 30 05:46:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106667 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904675qge; Thu, 29 Jun 2017 22:47:13 -0700 (PDT) X-Received: by 10.98.8.132 with SMTP id 4mr20819507pfi.109.1498801633778; Thu, 29 Jun 2017 22:47:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801633; cv=none; d=google.com; s=arc-20160816; b=IiZ4cWzTxQxqGpQx44RbMJqWzv8EwLaC3ApJRdttB6nglDSlne4yEKbh6y2ja3vSfd eXaIglxCMtm8EwVDvH2xhqD7WWXFNDbKRRRdWpDeb00/xkPZDin+AUzK9Zta884Lz/Qm Ys1J4QtVvnlopNuVGtAyPBnJnG6mzHXA7JXKttdq2CjMJiL1JUnVBbiDvRoUrP1x0F7i fg6iiqa0eWR9SLaPGGUzx9LErvC//b04KmWKFjaQbbaX9NdpGQig/Vuo+S6S4D2WqTJv YjKN140ChtMloGNntaChsGSGY831tIVEENEQa2UTAoVYLao3Ytpc7nwqFXWR6gMml4aY EMtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=dgUFbN42bUExTBiKQuWWHB0EIV0fAWCgdJ5DTTjMntQ=; b=y0wAa/hKcugbTS2OZqxgkbHrJXMFLGaAqO3DXPsc0W/2Cx+ACOEvhkk0iYqEiSE1Qi h+CVfn1PqfudT9DC01CuBhGGUjwuxxmp9DEUIAPqtJspjgk9ZvM3jw0Z/vb/UssM58wG B0vR1udG0bmVqjhamHJgJuUK6u7ewemhBH/NblKBg73raeF3yv/t8h14G+tlqYfRSiuB fZKQrVGNy2Ar0AQNYerPXUqXkQwAYvaYfCWrrJYbtm614IL1qnXFZSBsDJsb97AGH00i JVC3wYlhl0ET6ZeCZhXTAI2RCB1azc4D5S0osc4UR5d2tbqaw14VP2EinypGkzSm/WAU xo0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=WP4SYZov; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si1658852plk.568.2017.06.29.22.47.13; Thu, 29 Jun 2017 22:47:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=WP4SYZov; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751954AbdF3FrM (ORCPT + 6 others); Fri, 30 Jun 2017 01:47:12 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:34022 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751951AbdF3FrL (ORCPT ); Fri, 30 Jun 2017 01:47:11 -0400 Received: by mail-pf0-f176.google.com with SMTP id s66so61548343pfs.1 for ; Thu, 29 Jun 2017 22:47:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dgUFbN42bUExTBiKQuWWHB0EIV0fAWCgdJ5DTTjMntQ=; b=WP4SYZov6wJipxSoTDlGjARFHLQ1OQhlc/LVEdPbepsJ0idTX0QTOaPohNi28UhTFT g7asy32Q0y/w+al/uD5IwH8YHzmuAGlmWQd0QHhmpE4aYcH3yZSwqFWCr54FS0a62Wlj aU5NPY3tksCGTArlAelmhnNOrKLQw2+o665No= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dgUFbN42bUExTBiKQuWWHB0EIV0fAWCgdJ5DTTjMntQ=; b=MEFejAZwSLk8Jn9LXXCnX0cY7F4M/pjiygbV5RxWV8ywJhwVDVTLuADVQ/kt3Zqn5k 7Tj5Hc65Mabq/j4vGkU2V4xb+1WIVMDwtgi3vqloElTRlYJxD6A2Mv3bk/EhQiZ3SfD2 UOcKM5gEd6j9Wdke9WyNrg9/2tMDxhN6iz/FlzD1u56Jk3AuWk0A6MuEzXqekj8bhYDK w9ShAYDJUHsZOzMokxeyYn1+BkDDrIQQDzBJ9FZtOKVNLPFcb3838CJzTRQF7dOk2+EI c5i7FiTDzNgydkpnykliV/pISrlg/ssk2Ph+LJw55TuN2mnNY4PEAbHTE+eyjZkq+Xs/ R0uA== X-Gm-Message-State: AKS2vOxey+NbLAhDOsjFaUnWaITFNb2kAR1SOhuLfcQJgIuC4FwR2GVO aieR5roebaXEca1kqPHGVg== X-Received: by 10.84.216.26 with SMTP id m26mr22626914pli.112.1498801631078; Thu, 29 Jun 2017 22:47:11 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.47.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:47:09 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_?= =?utf-8?q?Rojas?= , john@phrozen.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Ralf Baechle Subject: [PATCH for-4.4 08/16] MIPS: ralink: fix MT7628 pinmux typos Date: Fri, 30 Jun 2017 11:16:32 +0530 Message-Id: <1498801600-20896-9-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Álvaro Fernández Rojas commit d7146829c9da24e285cb1b1f2156b5b3e2d40c07 upstream. Signed-off-by: Álvaro Fernández Rojas Cc: john@phrozen.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13306/ Signed-off-by: Ralf Baechle Signed-off-by: Amit Pundir --- arch/mips/ralink/mt7620.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c index 4c17dc6e8ae9..37cfc7d3c185 100644 --- a/arch/mips/ralink/mt7620.c +++ b/arch/mips/ralink/mt7620.c @@ -223,9 +223,9 @@ static struct rt2880_pmx_func wled_an_grp_mt7628[] = { #define MT7628_GPIO_MODE_GPIO 0 static struct rt2880_pmx_group mt7628an_pinmux_data[] = { - GRP_G("pmw1", pwm1_grp_mt7628, MT7628_GPIO_MODE_MASK, + GRP_G("pwm1", pwm1_grp_mt7628, MT7628_GPIO_MODE_MASK, 1, MT7628_GPIO_MODE_PWM1), - GRP_G("pmw0", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK, + GRP_G("pwm0", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK, 1, MT7628_GPIO_MODE_PWM0), GRP_G("uart2", uart2_grp_mt7628, MT7628_GPIO_MODE_MASK, 1, MT7628_GPIO_MODE_UART2), From patchwork Fri Jun 30 05:46:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106670 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904829qge; Thu, 29 Jun 2017 22:47:30 -0700 (PDT) X-Received: by 10.84.224.11 with SMTP id r11mr22741228plj.267.1498801650491; Thu, 29 Jun 2017 22:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801650; cv=none; d=google.com; s=arc-20160816; b=BRma6R+8t2N6FFHTOv2dwCXd1gE8fLMHMMAwwwvadoLUW5ln4AyDphQNypitQ213dq i3fZRjXFBNVrCPRH5zy4EjV7ynMmISEZzAMdKzv7girdh42XGvH28M0tVJ7Si8fTTFZ9 PXhX8cf3bwY15Z9BGFDA7wQeSFX96MveuBkA17hct3l778SnYv9JHdZlp5+eqQ/0wKn4 4slFJaj2ddC0QCCDjY5MZ97zNLs3mx9X3cu83x9ZBu+jG83siOrAq8FVHCmnDOZwsc+v aYQuZBGKqR0iQjm3u/st76mlL9o8pCl1CTIkRMT+Lv055BJnMzVhXLuUUVma4u3yQPM/ w69Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=aMenFKOAKyew1mPxTjmyWJhwoCdAERrBySI0YLSsh3g=; b=nIku9Q1AdqnifwcFDUSeD2VJ4pfuv4OFrsHq1i6iTrKaU2sDbUakkjNvtW5X6E2ifc N8e0XlLjNN+fQ75to0d5bEC7iYrnH0uzv80cgSM1526G3czlMlTbjseH4l5B3/P+olr5 Lgw9Q6luNPftB+0U4uLcARCXXqdpM/8C5KKwvIlvrC31uQ7UR1MqGq2SUJOBMMUa0xqw JZCV8onjCdasPTgxiqZYdoa+YOahpHDxZM8aGvuKqNW5tc0diAcyS3LweaskJ9UALZZi vtfnMY9adtAbpW+MRQgSlFrIx4e0/IFP8wimwVZ58k+0exQYLGlH9qORPiETvpsgL3q4 oFdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=V4oBLx0G; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si4519277pgj.463.2017.06.29.22.47.30; Thu, 29 Jun 2017 22:47:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=V4oBLx0G; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752076AbdF3FrY (ORCPT + 6 others); Fri, 30 Jun 2017 01:47:24 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:34046 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752071AbdF3FrX (ORCPT ); Fri, 30 Jun 2017 01:47:23 -0400 Received: by mail-pf0-f181.google.com with SMTP id s66so61549494pfs.1 for ; Thu, 29 Jun 2017 22:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aMenFKOAKyew1mPxTjmyWJhwoCdAERrBySI0YLSsh3g=; b=V4oBLx0GDi/9EW8P9MnFoHkYktDp+fuls6hiNNyxdFTN59agXInC2Sm0PnNjryvFnM lvRcFcdWQvT65VGm7oNA3jcXOs4meKlwwRyM5b80T+5nel+CxMXzntDP2nD9aILx/ENj CQci3Z5C9O8K2HjcXegO0kjcdVXV2KDdFox7I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aMenFKOAKyew1mPxTjmyWJhwoCdAERrBySI0YLSsh3g=; b=j9K9eWFApl/tBz698jwFF2Yt/0O9A+Zuh5USqTJfEBLHzK9xrl41jKL9jdOJL/xBf5 AV3D1DJ/x7ntt5y8eVU/wWN3VWYMPTyrreU50kpuFg3oyxzPfR614eC9BXM0sre+gMtX ETInwHff9+MtPRosv4rW8Y5srNQJu9VpkPXhoUajinyGtN3bAfsOng8P6YjXBLrTjx/c gAI1B34PpYOdx53vNP0TBsJu338YwZYk2X82mAmnGtLuq0WfrO0lCB/hN3caXzSuzk/C 4UaSBtslU3SfVh5+ASzQ1LgCih6awRre7Ucd4fCcqXuwy93xLZTfnhtphf1IlpAXYx0S qsdA== X-Gm-Message-State: AKS2vOy3V57ejtPgi7oDJV2wFMg6VR47EvNRQ7UIWNggyV3R4VOS7kVq 5cgvvps+FkcWdewK X-Received: by 10.98.144.132 with SMTP id q4mr20066225pfk.8.1498801637541; Thu, 29 Jun 2017 22:47:17 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.47.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:47:16 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Brian Norris Subject: [PATCH for-4.4 10/16] mtd: bcm47xxpart: limit scanned flash area on BCM47XX (MIPS) only Date: Fri, 30 Jun 2017 11:16:34 +0530 Message-Id: <1498801600-20896-11-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rafał Miłecki commit 2a36a5c30eab9cd1c9d2d08bd27cd763325d70c5 upstream. We allowed using bcm47xxpart on BCM5301X arch with commit: 9e3afa5f5c7 ("mtd: bcm47xxpart: allow enabling on ARCH_BCM_5301X") BCM5301X devices may contain some partitions in higher memory, e.g. Netgear R8000 has board_data at 0x2600000. To detect them we should use size limit on MIPS only. Signed-off-by: Rafał Miłecki Signed-off-by: Brian Norris Signed-off-by: Amit Pundir --- To be cherry-picked on linux-3.18.y as well. drivers/mtd/bcm47xxpart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/mtd/bcm47xxpart.c b/drivers/mtd/bcm47xxpart.c index 5abab8800891..546170a77466 100644 --- a/drivers/mtd/bcm47xxpart.c +++ b/drivers/mtd/bcm47xxpart.c @@ -118,8 +118,8 @@ static int bcm47xxpart_parse(struct mtd_info *master, /* Parse block by block looking for magics */ for (offset = 0; offset <= master->size - blocksize; offset += blocksize) { - /* Nothing more in higher memory */ - if (offset >= 0x2000000) + /* Nothing more in higher memory on BCM47XX (MIPS) */ + if (config_enabled(CONFIG_BCM47XX) && offset >= 0x2000000) break; if (curr_part >= BCM47XXPART_MAX_PARTS) { From patchwork Fri Jun 30 05:46:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106669 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904822qge; Thu, 29 Jun 2017 22:47:29 -0700 (PDT) X-Received: by 10.99.95.70 with SMTP id t67mr19109601pgb.104.1498801649746; Thu, 29 Jun 2017 22:47:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801649; cv=none; d=google.com; s=arc-20160816; b=puJ+ph8u7zrxpbfDOhue6Nt6w3gfsaAxJSrwpKHb9lD6jMEUUhrN99no5w6dANBAgQ FoFYKJWnAXhalsuNMJGlOUAUTB+BQlxcW9vVNxEcDRoQVIlnYafbh6rWwGbeoK41XcuK ekvZXaRNFoqZJ9bVCm/ZYVh0fxAl+y8fTBt93B5meH+V/ln/wJHKC/T5FE3FZcDemPCM aPNI/RXWMHsq2fZPryzCz0uHnFHRLBcEpqChbhPE+LxureNzeDVbVbR9zAtnu6b+ft1J fdRuQZvAePsu44OFg2QQoKOMPRl/AzeOFXgwyMEsI2vyAt6h+1Dkbb7311O92+yQcfH6 syjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=wicEyYw9JzmNpQanabgN3sSxgPtIrxn7Ux9/TFdua4U=; b=rqscQll8sq4oi6Um2PDmIEcqTSTxmR4gW7k50E2Fkap4ahO8k0k22L+PsfaB9MoHi3 2ghx6mlnAfVsAyQKwjojWnGEvFVZSSonPr61K8WV+Ux1JzrzfuyPAnM0xCxNMNmzvoir tjOFDuA4Y7EIvc+Kt2uNrhvInetaZegAZEpxA5zhfegGRjdtP0/JA+qe9eBaji1YXYPi PbLthCRW1jeKp/X8OJBHBQ/doHFeQ6A+r82WU6Ox9V3NFPSqHRjZTJ/Qd61TnKXLa4ni /r2L5+Ky8yMj5AOkvOftGXrby4ke5BV0yOQtWvwkaEEVY4OHiGvLjFRBuQUIimXVLqRd Lxdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=KqpLIiII; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si4519277pgj.463.2017.06.29.22.47.29; Thu, 29 Jun 2017 22:47:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=KqpLIiII; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751918AbdF3FrW (ORCPT + 6 others); Fri, 30 Jun 2017 01:47:22 -0400 Received: from mail-pg0-f50.google.com ([74.125.83.50]:36155 "EHLO mail-pg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752071AbdF3FrV (ORCPT ); Fri, 30 Jun 2017 01:47:21 -0400 Received: by mail-pg0-f50.google.com with SMTP id u62so58465658pgb.3 for ; Thu, 29 Jun 2017 22:47:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wicEyYw9JzmNpQanabgN3sSxgPtIrxn7Ux9/TFdua4U=; b=KqpLIiIIcP+AiNCmcUw4jLNJvvJRjuWpeQg5EoPunfQSwoVohD+gsbwJxqbDl1RUw8 NIBbCi7NVTgEasAqAK7lNayHLAPxHuxhkcEqEEsjo9+st6TFkQH+0JdoRSSF3/WhkaS/ iQNukXSItaq69cc7BRpzSXi7tPtNfYxp6GGik= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wicEyYw9JzmNpQanabgN3sSxgPtIrxn7Ux9/TFdua4U=; b=q6HjiCUxxjsQBSbQjGlxCJTyIdwOCBC5XDyqsPHAUokMXtzNukK7nXw57E3+q06Vhn +5m9MuYICzIzAfqZIMOen+h8LDgUupOOhAni6174Hx+F0M9jAHLIoNbHcjvyZMtg/4Wy QMIqfpZA9EpczSCqyBTzR5d/ur9K0wbuBmzGXAUPuyu9xPleP2lGUmGCIrj44LJhLZoy 4i6vbIrZ9w9EBrt7WqcsqOxavoaCxFfLiupn05IbUyTU55F6kjG/XT7emrSp4zOrcRh+ 6W9rW/jYLesOjFTL1001GqWRMgpYcXInfvnzuh0hhZFlOR7AxJYwGweFhH3AtcLe+MX7 QvFQ== X-Gm-Message-State: AKS2vOxv4o0G69kxCOQIpk2GkUOAOYZz8fLusr5lrrMtkFL7VCpzQz4v yRMPc68JGyRfJI2m X-Received: by 10.84.225.4 with SMTP id t4mr22806553plj.274.1498801640451; Thu, 29 Jun 2017 22:47:20 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.47.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:47:19 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Brian Norris Subject: [PATCH for-4.4 11/16] mtd: bcm47xxpart: don't fail because of bit-flips Date: Fri, 30 Jun 2017 11:16:35 +0530 Message-Id: <1498801600-20896-12-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rafał Miłecki commit 36bcc0c9c2bc8f56569cd735ba531a51358d7c2b upstream. Bit-flip errors may occur on NAND flashes and are harmless. Handle them gracefully as read content is still reliable and can be parsed. Signed-off-by: Rafał Miłecki Signed-off-by: Brian Norris Signed-off-by: Amit Pundir --- drivers/mtd/bcm47xxpart.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) -- 2.7.4 diff --git a/drivers/mtd/bcm47xxpart.c b/drivers/mtd/bcm47xxpart.c index 546170a77466..9190057535e6 100644 --- a/drivers/mtd/bcm47xxpart.c +++ b/drivers/mtd/bcm47xxpart.c @@ -66,11 +66,13 @@ static const char *bcm47xxpart_trx_data_part_name(struct mtd_info *master, { uint32_t buf; size_t bytes_read; + int err; - if (mtd_read(master, offset, sizeof(buf), &bytes_read, - (uint8_t *)&buf) < 0) { - pr_err("mtd_read error while parsing (offset: 0x%X)!\n", - offset); + err = mtd_read(master, offset, sizeof(buf), &bytes_read, + (uint8_t *)&buf); + if (err && !mtd_is_bitflip(err)) { + pr_err("mtd_read error while parsing (offset: 0x%X): %d\n", + offset, err); goto out_default; } @@ -95,6 +97,7 @@ static int bcm47xxpart_parse(struct mtd_info *master, int trx_part = -1; int last_trx_part = -1; int possible_nvram_sizes[] = { 0x8000, 0xF000, 0x10000, }; + int err; /* * Some really old flashes (like AT45DB*) had smaller erasesize-s, but @@ -128,10 +131,11 @@ static int bcm47xxpart_parse(struct mtd_info *master, } /* Read beginning of the block */ - if (mtd_read(master, offset, BCM47XXPART_BYTES_TO_READ, - &bytes_read, (uint8_t *)buf) < 0) { - pr_err("mtd_read error while parsing (offset: 0x%X)!\n", - offset); + err = mtd_read(master, offset, BCM47XXPART_BYTES_TO_READ, + &bytes_read, (uint8_t *)buf); + if (err && !mtd_is_bitflip(err)) { + pr_err("mtd_read error while parsing (offset: 0x%X): %d\n", + offset, err); continue; } @@ -252,10 +256,11 @@ static int bcm47xxpart_parse(struct mtd_info *master, } /* Read middle of the block */ - if (mtd_read(master, offset + 0x8000, 0x4, - &bytes_read, (uint8_t *)buf) < 0) { - pr_err("mtd_read error while parsing (offset: 0x%X)!\n", - offset); + err = mtd_read(master, offset + 0x8000, 0x4, &bytes_read, + (uint8_t *)buf); + if (err && !mtd_is_bitflip(err)) { + pr_err("mtd_read error while parsing (offset: 0x%X): %d\n", + offset, err); continue; } @@ -275,10 +280,11 @@ static int bcm47xxpart_parse(struct mtd_info *master, } offset = master->size - possible_nvram_sizes[i]; - if (mtd_read(master, offset, 0x4, &bytes_read, - (uint8_t *)buf) < 0) { - pr_err("mtd_read error while reading at offset 0x%X!\n", - offset); + err = mtd_read(master, offset, 0x4, &bytes_read, + (uint8_t *)buf); + if (err && !mtd_is_bitflip(err)) { + pr_err("mtd_read error while reading (offset 0x%X): %d\n", + offset, err); continue; } From patchwork Fri Jun 30 05:46:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106672 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904897qge; Thu, 29 Jun 2017 22:47:38 -0700 (PDT) X-Received: by 10.98.103.18 with SMTP id b18mr20425748pfc.171.1498801658334; Thu, 29 Jun 2017 22:47:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801658; cv=none; d=google.com; s=arc-20160816; b=pfJ3p6HRJC7vSRdgpj30qeOwEVodlfJW/J82B/0KzRGmZtRFfIF7WcqYHkhigzEjdh m2BHhuq5kT9YcGttv98A0gA/hCQb6HAqsT4sEx8mKBjK9P01Vqh9oMrtZynWmuKkSpiX HlY49ba++mUuNdnbH5nmeJncIpuCcepeIaRSK7Du1unm+nBVuDQ/eyayYlOjpFYO640A bflr78BPHlC5ZEi09JteGbvU70qAFMRivy55uG5KOCMw67WuHNz35vXNwQ8pQIMKJz// f6h/jz07gasU3lO8qpxJ4accFKh76LcidrAHPqyOGrDJPDHA7r2cWqKgVuz0Zhqsjavl nrSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=GsegNdTqjU2IqSIX6ahbN1smnKBB+hrS5MXnKypGrvw=; b=ycJoA1SArQiKqqkrDg6Hab0J7dGc90b7vPmS81Ckk70XUwJ+X3n9C4YVQcasUQPF0A 7D2yxOKEVYPJyMURqILNOnpv3UFYr95q+iKxi8rbpYbNLAwcmsgHOayZ6Bbx/dyH61KK edCXHGrYwCKNAyp462l5FYhPEwEm/o/J+k+J3zN89Yu2fcWUgq/IcdCtWoets+A2bvWN 8EY9+RokgyJ2aE1JIW815ulQEAnmcn+KBUXZ6YaZehOFMrI8oJb59mk2rNSU3WCVgi9u iIf1knJD/pIFiEE1idrHFp8MjRrBcnOTCXonCiI/ksm5uu+xP36J8LvBENXz8ykJpICY 0ujQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=fu4SnNJK; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si4519277pgj.463.2017.06.29.22.47.38; Thu, 29 Jun 2017 22:47:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=fu4SnNJK; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752086AbdF3Frg (ORCPT + 6 others); Fri, 30 Jun 2017 01:47:36 -0400 Received: from mail-pg0-f43.google.com ([74.125.83.43]:34184 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752071AbdF3Fre (ORCPT ); Fri, 30 Jun 2017 01:47:34 -0400 Received: by mail-pg0-f43.google.com with SMTP id t186so58776128pgb.1 for ; Thu, 29 Jun 2017 22:47:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GsegNdTqjU2IqSIX6ahbN1smnKBB+hrS5MXnKypGrvw=; b=fu4SnNJKCZpfBLJDBHtNL5ueDEwPwZiHbrRh07lRvY7fejIZsIKI5K1RpVQRp/P+nh feMmKVNAuql62viiCBUWJmbQ2GJROkIiDm54jFV+pGBWWDxR9BNT2POZCEo5z1uJ3rCg xE4oDWuU055JudtU384C/PKXhcfMJNjNwxFOo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GsegNdTqjU2IqSIX6ahbN1smnKBB+hrS5MXnKypGrvw=; b=mIbwfel7qHak9R43PzDiw4Aw2ef1cOTJ/coAhGec3ZnzjDdJRd2ZucixAXfzx2WbfN zCymiXiuGPNa6gOK+aTAF46J8K6dhMbsZPUKNrdtZCvy5+Q12xht+6k8EWLTzWL0YxmV tgAW3mJLf4hCVHP4MI8ds4fejgO9JtkTowZJta8q9toR3osMuq6LiBhhQxJwOrI7npm/ 8nHJDAr/ADuthPkXXMyqMCv2vY8LQ70HAWop5S2YdSDfcvMAgWvLXjl2v8T6mINo7vlW +BBx9e+r/r2bpna6R+1kOTLQwbRadDt2SjF53YuxQdYKLuKsfIqU/MhLBODaNFbf0P3C WY2w== X-Gm-Message-State: AKS2vOz42uE4P9HUg2PKt47Ap7Hu/tyrKiOO+V2RBlhpbHXnDrc9/RAf Rgh0inSqTQpwjzVkQebb/w== X-Received: by 10.98.9.205 with SMTP id 74mr20185009pfj.77.1498801643415; Thu, 29 Jun 2017 22:47:23 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.47.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:47:22 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , wangweidong , "David S . Miller" Subject: [PATCH for-4.4 12/16] bgmac: fix a missing check for build_skb Date: Fri, 30 Jun 2017 11:16:36 +0530 Message-Id: <1498801600-20896-13-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: wangweidong commit f1640c3ddeec12804bc9a21feee85fc15aca95f6 upstream. when build_skb failed, it may occure a NULL pointer. So add a 'NULL check' for it. Signed-off-by: Weidong Wang Signed-off-by: David S. Miller Signed-off-by: Amit Pundir --- drivers/net/ethernet/broadcom/bgmac.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.7.4 diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c index b56c9c581359..b7e10e1b9131 100644 --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c @@ -469,6 +469,11 @@ static int bgmac_dma_rx_read(struct bgmac *bgmac, struct bgmac_dma_ring *ring, len -= ETH_FCS_LEN; skb = build_skb(buf, BGMAC_RX_ALLOC_SIZE); + if (unlikely(skb)) { + bgmac_err(bgmac, "build_skb failed\n"); + put_page(virt_to_head_page(buf)); + break; + } skb_put(skb, BGMAC_RX_FRAME_OFFSET + BGMAC_RX_BUF_OFFSET + len); skb_pull(skb, BGMAC_RX_FRAME_OFFSET + From patchwork Fri Jun 30 05:46:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106671 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904866qge; Thu, 29 Jun 2017 22:47:35 -0700 (PDT) X-Received: by 10.84.224.199 with SMTP id k7mr21747984pln.207.1498801655572; Thu, 29 Jun 2017 22:47:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801655; cv=none; d=google.com; s=arc-20160816; b=Pl299C7hdGvlu1pgR1XBQIwd+oAPNV9o8D4ztab4tYP4kfhz9QLv3rnKhrsKyFVvQy UeIryEieDNbcUIdX5ejA2+dExXf1KyGNoxflTHC2/YP/NIcyuCfKGicvSFhkrKEIRTBO DSICvG9WDLPr5loYu/J0bVjK3eeeTzDEwCCg8guknenTAbaoug00BOGN6/0Og1+3/aMN RdzUXvplTgKTdGV7S3/c2+WmWHr1O4UjQfbKk1cR16fMVHxn/pv5It6Hiuk2TfNRLArk w41Rz1jFWiZJlGV9burSbu4wYg26jg8vgYrnaYV1YnO+JnWjSzLvXSRW+++wx6qUuCxi RlnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=qML/s3vfAjQVuPGfZvNeTdTTrX2C2ywk5qf2Kci2uJU=; b=l9Gv5T+FDgutqUDZdhakjruhAH2EMIfoyhTsWmZaD4ZxvPyOwNeUXvJRZIAR3u9uEE JhdxVS4Rc/udUcXoZOSrmskpchoUPTqu5LCnyBxwbI5m9UHnqNAw+bd8v/jMuT7ZxLo1 Z9Lzbr52RgE5ZQmzBcI4pI1jNxZIfcfAZIhxS/RBCM820ROoDnPY2XLTRTn3O/Ij//G2 TfYwfIDZxX3Jna3+TWRuGDJiS18F/LSvM7ii5R4zCv0kKT684n4SCLxo00TOOmrukvbT Gim471y2Yk4cDGoCamTJgtFizBBb1B5/lvRg5ielR+U1pJfb4ms/sCihunqnSRWLvmsJ DFcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=ENSIwzdw; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si4519277pgj.463.2017.06.29.22.47.35; Thu, 29 Jun 2017 22:47:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=ENSIwzdw; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752085AbdF3Frd (ORCPT + 6 others); Fri, 30 Jun 2017 01:47:33 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:35202 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752071AbdF3Frb (ORCPT ); Fri, 30 Jun 2017 01:47:31 -0400 Received: by mail-pf0-f176.google.com with SMTP id c73so61642443pfk.2 for ; Thu, 29 Jun 2017 22:47:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qML/s3vfAjQVuPGfZvNeTdTTrX2C2ywk5qf2Kci2uJU=; b=ENSIwzdwerBst7RQjkPVKsNji1HOL8BTvzYuaRVbOTi40J+WU29lgbiQImTNRhc6W2 +6ohs12u38YpCv6l9F1riAFcEZZUYvcRO2ZG77xOzAYMN/h+vXUJ4ttpGtlzSS9K1VrW KO4M5YHu7TYwZeP6BxSTfF6SPV1FtCADZcjHI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qML/s3vfAjQVuPGfZvNeTdTTrX2C2ywk5qf2Kci2uJU=; b=JP4sjbb3L8VyTMK1wwU4mzILVeMr6qyRUFCCQUIwVZe5llyIXjrodIQWbPy5G2JuRf 9i5IttOkIGbOxgi5pY+fGD9g59hgVB841MM/SFmZZMOCr8+ZeVk3Jm3wqYcV1BpXUSWJ MIpzEZAi++1mGWbTNFZtaA/Lp4FFslf792P+ubvRqVMm0lOMWRcyVxdoCd/cbzxSVQIH y4Z44ea3/MZNHQlIRKQPT7hjx+sMCWgGKA8HnB2xhp/+ekXEukuqDTqik7M/CoQmgQmc y/Gk1V3wnKDNpNn28joULMgzPOc/vI3nUTv0HPicZ3CMzKCLBpnFFTKCs6dhMTWMiZac ZT/Q== X-Gm-Message-State: AKS2vOz19M0YvFJjk8RPiB3393lR0cxorj1fnEltXkLnNvCrqIIdTNcW D2VGNp6R5CzBqSo7 X-Received: by 10.98.245.22 with SMTP id n22mr20192641pfh.96.1498801646155; Thu, 29 Jun 2017 22:47:26 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.47.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:47:24 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , "David S. Miller" Subject: [PATCH for-4.4 13/16] bgmac: Fix reversed test of build_skb() return value. Date: Fri, 30 Jun 2017 11:16:37 +0530 Message-Id: <1498801600-20896-14-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: "David S. Miller" commit 750afbf8ee9c6a1c74a1fe5fc9852146b1d72687 upstream. Fixes: f1640c3ddeec ("bgmac: fix a missing check for build_skb") Signed-off-by: David S. Miller Signed-off-by: Amit Pundir --- drivers/net/ethernet/broadcom/bgmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c index b7e10e1b9131..20356755b708 100644 --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c @@ -469,7 +469,7 @@ static int bgmac_dma_rx_read(struct bgmac *bgmac, struct bgmac_dma_ring *ring, len -= ETH_FCS_LEN; skb = build_skb(buf, BGMAC_RX_ALLOC_SIZE); - if (unlikely(skb)) { + if (unlikely(!skb)) { bgmac_err(bgmac, "build_skb failed\n"); put_page(virt_to_head_page(buf)); break; From patchwork Fri Jun 30 05:46:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106674 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904910qge; Thu, 29 Jun 2017 22:47:39 -0700 (PDT) X-Received: by 10.99.5.82 with SMTP id 79mr19005051pgf.134.1498801659679; Thu, 29 Jun 2017 22:47:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801659; cv=none; d=google.com; s=arc-20160816; b=yhOnhWO/HyjZJU9nrKk55cOEBKsJy2xXTCMQYoyF8H4tO2jY4YlA4KRMnGNLn8z9h1 9z/Xb4UM1CwzrwK9fUYggJdJ+NhzV8B/LcxPh7k7T9iPpeSX5VrAGQrkTL+CcR0ZZXFd v7Dm1tDP/x2UC6RUU8+oDk04GEtVyvkTKWN4d5Pun1gix0x07Kd4tOsIBFWdGVsg+h8X zgkNqCm/3xEhtb+MZn4CkpwCsU0pp/v3XzKtixVJysNVTSvFetboUiHlzEEORw3NShV8 Ic5ZsUD+KGA/V7AIirLslsDAL89Oea0nmhFhIpKhksQlAqXpCtJGRNnXHgChbGVhQf4E eO4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=OSb0Th8Oe9x9s1WtowPz07KoA6DdEeYHQc4L822q0+c=; b=IDVbt9cbWYBCLsPOPqegjSURnbau7c8sBUJqoLao755gkveqOQPTBp1ka2GR+EEm1T AIq6d2FA9haHw9dPJwi4NVKrZ5n3IFB2AhsxozGt8A53dUjmMAh/v37vyojUWG4VF2RS 5ASc0vQvvm7tUgiBoRVW+nwMFN1Y6BPGRy8s/vjtzoooNCNwgZBZ+YkIjTemX1kLZXXn rBCn0aW4Ux0Cj81ms5sLPYJecLJDBY/sSHmijjlrFQ94/GAlO/f000Bm7O9oQIDjaVGh HzuiuxR/nZXFdOJC7dBH+aTtyVZ6Hgo8mvLuA6UdRLenbqkJQvOkIuzU1Bx+wpuM1IBk eE6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=A4f0fKTG; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si4519277pgj.463.2017.06.29.22.47.39; Thu, 29 Jun 2017 22:47:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=A4f0fKTG; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752089AbdF3Frg (ORCPT + 6 others); Fri, 30 Jun 2017 01:47:36 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:33615 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086AbdF3Fre (ORCPT ); Fri, 30 Jun 2017 01:47:34 -0400 Received: by mail-pf0-f182.google.com with SMTP id e7so61638369pfk.0 for ; Thu, 29 Jun 2017 22:47:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OSb0Th8Oe9x9s1WtowPz07KoA6DdEeYHQc4L822q0+c=; b=A4f0fKTGWi2b0PzOgXm3NCfGhH9CUtVTb2xRFVRvInh9iPXsVcKN+5AsKARH+N6O4X qfFqAsPq0e0sUw48wem8UcGpI3zEpb7fGmVlBiES5uGzyoEkirHwrcMLlFENXWxmfII7 1tLwYAQt3QbwfnhpTjE7eEc2LruVcTo47ZnfE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OSb0Th8Oe9x9s1WtowPz07KoA6DdEeYHQc4L822q0+c=; b=lZYdnGIx6qWS2SHqLf1Yy7JVWsUdqNGVN/AEuhI8WSZqXjxORVlJB7dP4ZkUFdoEhs NqQslZ3Nb876BZ4klreoTieEBGxHlETAT3xA1KASS3M3+qxrXZbBjOP7Awy9sw17u8p3 jLsAVVRflh74q6cIZqd++NMEJ3peiY0AAJ5Jvtlgj1l5sIs5vHjp6r92XRGIoKI/fnca VtYXwirBFcnO6raPGRlOMRhXU9+ptKD8aHGV5Xsq49BSxzfQ7SnBw5BsRrMcA2JeRe/i ndodYOmao2pbiMhEyiQjGHA3St48g8BfbGvPqXrxnD31BKjsSpt4eL1S97P/d44ZgWYl 2yNQ== X-Gm-Message-State: AKS2vOz9Wh9mAgMSNgZrMFJF6MnI+H5dPFvOVJaTX10/sF7aW9iy+A6H FDZBXUUMWPr0tDU5 X-Received: by 10.99.125.88 with SMTP id m24mr10518575pgn.269.1498801649145; Thu, 29 Jun 2017 22:47:29 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.47.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:47:28 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Florian Fainelli , "David S . Miller" Subject: [PATCH for-4.4 14/16] net: bgmac: Fix SOF bit checking Date: Fri, 30 Jun 2017 11:16:38 +0530 Message-Id: <1498801600-20896-15-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Florian Fainelli commit d2b13233879ca1268a1c027d4573109e5a777811 upstream. We are checking for the Start of Frame bit in the ctl1 word, while this bit is set in the ctl0 word instead. Read the ctl0 word and update the check to verify that. Fixes: 9cde94506eac ("bgmac: implement scatter/gather support") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Amit Pundir --- drivers/net/ethernet/broadcom/bgmac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c index 20356755b708..50de83bfcc2e 100644 --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c @@ -255,15 +255,16 @@ static void bgmac_dma_tx_free(struct bgmac *bgmac, struct bgmac_dma_ring *ring) while (ring->start != ring->end) { int slot_idx = ring->start % BGMAC_TX_RING_SLOTS; struct bgmac_slot_info *slot = &ring->slots[slot_idx]; - u32 ctl1; + u32 ctl0, ctl1; int len; if (slot_idx == empty_slot) break; + ctl0 = le32_to_cpu(ring->cpu_base[slot_idx].ctl0); ctl1 = le32_to_cpu(ring->cpu_base[slot_idx].ctl1); len = ctl1 & BGMAC_DESC_CTL1_LEN; - if (ctl1 & BGMAC_DESC_CTL0_SOF) + if (ctl0 & BGMAC_DESC_CTL0_SOF) /* Unmap no longer used buffer */ dma_unmap_single(dma_dev, slot->dma_addr, len, DMA_TO_DEVICE); From patchwork Fri Jun 30 05:46:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106676 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904923qge; Thu, 29 Jun 2017 22:47:41 -0700 (PDT) X-Received: by 10.84.224.199 with SMTP id k7mr21748347pln.207.1498801661115; Thu, 29 Jun 2017 22:47:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801661; cv=none; d=google.com; s=arc-20160816; b=hrp+FHEleGKK4OjTLyPvguZPAQnfByrle+pq/sGjeberhDlZ28MHr0diMynscNcrF7 G0Ja2T5uaonZcNo4Qq0E44uA1y+p1mssWgeJhJhWTx+qXYQwsXFJiW4Tn1pgjlhnrpV6 FfUEvxzFgXZaOrlR/ljF2A/4aaIJ0nhDwismc40fMMts4xiErYzaPJuFYWlg7vqPrFQ4 loLLXdhElso4S52b8d59X1CmV6W0P2s2pjc3eCVKZTRbAWB/p9nfpv0CFeOlXA5y+Llu 58l3oR0lvqiHQ+0x20kV0Mb0lgiZ4hCLTlg5GKhXgWEXqWzowxI7oKDtA+MIo9OcaZBU wgqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=42RpSaEvunaq+2xHeGGIHCa6HiRtly5UAtfz4Bac/sI=; b=Z9wkplzW6EHv/680Hed4K84pJ4MlsFc6pnqyMoEE4EAHvhmd+05zpD6x+Zl9bpfgC0 c2vFOkOmf0XW264c1EUDUZFpZk5YGavkWZUA0FqzjZS8YRn/SUC2lZvJCPoRnhYOqoPg +/CHza2B1W25SxiXyANb9Rj8cMlXSeJQOWu72SQa9k0t2ZuyxWD+dmmlzjjdS5rOKyiU jlrm61b9+zzWvPZOEuDOwgOIaAcliipQ8XzIymRJiYrBzeDFjn7v8BnTGEQj7U1X3aYX SLXbYA+EYKoNJDTI6XzVS0+seg4HZPfDJsa1WzuBP50QuI/J/LqhTJcU+vlTMVGl+DWD TEhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=NiZ5ZhJI; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si4519277pgj.463.2017.06.29.22.47.40; Thu, 29 Jun 2017 22:47:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=NiZ5ZhJI; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752087AbdF3Frj (ORCPT + 6 others); Fri, 30 Jun 2017 01:47:39 -0400 Received: from mail-pg0-f52.google.com ([74.125.83.52]:33463 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751973AbdF3Fri (ORCPT ); Fri, 30 Jun 2017 01:47:38 -0400 Received: by mail-pg0-f52.google.com with SMTP id f127so58495590pgc.0 for ; Thu, 29 Jun 2017 22:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=42RpSaEvunaq+2xHeGGIHCa6HiRtly5UAtfz4Bac/sI=; b=NiZ5ZhJIrSBIbLJSf2jBBLcAkF+QCVhQKAcrva8tHwcSomfNIpe5F4KZ71rYkX5y+i J334WhiKxmct3AmrqbMbgl/HK0YIVh/Q9Jq+NM6LHUGOcmnq3eHVcMMSaLzgPUH0BLdZ nbDTxyFhFIUg8WcrYAhoHQofrqSkAuns1fwXw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=42RpSaEvunaq+2xHeGGIHCa6HiRtly5UAtfz4Bac/sI=; b=tMjClZoYaEvHs/AuD5nC+jOLdA5WoCXQ3M940mRPlImDzbBQ6gYduFsrMyL02hPDXi JZe2ZNklyfZtU8LgfjJiD7AqWWk8MufxJ+WZC5+5LH0GqFi0GlJ4TJMUvD1SbqMfXMuJ snI5vbljsVryrZpM2gAdvy390YKsrW5nLdQx3e3J9XdmQ/T6S21oqD+1n0nRNDKeQAk5 /9o0RPdpk4Crd2ZHE4/Pxkb1rxSuFR5ZaW5foLJAvEJnxeZcmG8m0NXSi0C6xzmM11wC jvJafVr2sCmj6f2XFLouYFSWY+A+vvtpme3YVjrjG9DvgzYv/c2YNH7TKx5HOFJgOEXu ip8Q== X-Gm-Message-State: AKS2vOw0SuNSOdtKwpqQpPvsQ48VeFZkL8ZPkEWbsQhmnKxYmwxuejA7 u9TpBnqZVrFdRp7TVsgmBg== X-Received: by 10.99.101.132 with SMTP id z126mr18981463pgb.194.1498801652310; Thu, 29 Jun 2017 22:47:32 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.47.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:47:30 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Florian Fainelli , "David S . Miller" Subject: [PATCH for-4.4 15/16] net: bgmac: Start transmit queue in bgmac_open Date: Fri, 30 Jun 2017 11:16:39 +0530 Message-Id: <1498801600-20896-16-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Florian Fainelli commit c3897f2a69e54dd113fc9abd2daf872e5b495798 upstream. The driver does not start the transmit queue in bgmac_open(). If the queue was stopped prior to closing then re-opening the interface, we would never be able to wake-up again. Fixes: dd4544f05469 ("bgmac: driver for GBit MAC core on BCMA bus") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Amit Pundir --- drivers/net/ethernet/broadcom/bgmac.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.7.4 diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c index 50de83bfcc2e..a01f62ec12bb 100644 --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c @@ -1309,6 +1309,9 @@ static int bgmac_open(struct net_device *net_dev) phy_start(bgmac->phy_dev); netif_carrier_on(net_dev); + + netif_start_queue(net_dev); + return 0; } From patchwork Fri Jun 30 05:46:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106675 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1904915qge; Thu, 29 Jun 2017 22:47:40 -0700 (PDT) X-Received: by 10.99.3.216 with SMTP id 207mr19230406pgd.161.1498801660390; Thu, 29 Jun 2017 22:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498801660; cv=none; d=google.com; s=arc-20160816; b=wNGocBzQN/tyHWkPw7rqeZRlbzM3W2LdkqIBxu/6wa5GO4/kDXRdc7zHofI5PlW5TA +Nf4Jj9b8bPbW9Kay+md97pOjC9MvEDViHuIIYgsjl5giXxIOjCGrDNbkQhIvx2UUvnv oNPOWJ4BdSa/iiBAa5NxMXy2tqVqs/PheCiLaddOYK44+EV690/Ntz9yaQsnTC8I2kf7 SKWrvA3LRltrZi/gTFSTQFaV7FgwMXygkNeoY89XldX2Bkls/UBx1MdUmxLNZfuq5084 hfLNqWginjORG0c8pK5gcxfrVwIlC9xLkrV6R2lRfsKZQ7VIml+pUlT2CvaTecScWlCI PqPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=r/fACoYiFik/Y/lawDmgBYOqr+/ZcgrbnJWZK+GRe5k=; b=OhqGoVdoihRF5aTihGwLW1lIgMWC5DDnbLHS9VLDXS9ARDwkKNkJme2guwO8PjNm7P dBv/WJZlh9/Digt4WsLRUkcoLceHgUAF7k33bWYdL2QEfWB8ucLCCmDnBEWQqTaGJYSZ p1Yy2dzPbSSgZlG6313pzioYXXt6RcU6OKiZLU+RqpkcSES4sC7jLV/K+MfNIuip6NlX 0oKc+dV7GyvIE967J+73KyFMenf2kbQpbZXojxTIuZqOEIn5Pbdx//AA1nvDNXP+Xi9P G9JnUBuE9zztlqcG2xUe1LJ6ecLiPr7qjPBy4KdjWTx8HLYt+aYorA18I6x8Z40eoaSz iTmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=g+RDsMzb; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si4519277pgj.463.2017.06.29.22.47.40; Thu, 29 Jun 2017 22:47:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=g+RDsMzb; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752098AbdF3Fri (ORCPT + 6 others); Fri, 30 Jun 2017 01:47:38 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:35237 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752087AbdF3Frg (ORCPT ); Fri, 30 Jun 2017 01:47:36 -0400 Received: by mail-pf0-f171.google.com with SMTP id c73so61644183pfk.2 for ; Thu, 29 Jun 2017 22:47:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=r/fACoYiFik/Y/lawDmgBYOqr+/ZcgrbnJWZK+GRe5k=; b=g+RDsMzb4n091vnzhKhc2vSEI0dmtFDySVPwoBSS9aIMwZNKsa8G/KZ87fn2FWSqnh Fn2PRUOPvD0V2uHdq23mtZTeNc6e+eoImWqptOBZNFAKvHhfZMzhvGtU4WUZjOj+JDr4 GL2JzVodBTjRivSzmIuNqctreOorYqrz3gnzk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=r/fACoYiFik/Y/lawDmgBYOqr+/ZcgrbnJWZK+GRe5k=; b=poapr4kwsRm0iaa5uwVsa9Uq9HWsoaspwz1GydZyn3yKJBSyVUVCzmC0PE2SkgQXcf q9RVZyI0HoU5ABwdxsWyf+H7UtGTSXh5SMRhAXgm0Kth/+m9pMvTzoWdPBqhiiAm/FmD B4rZiFBx12jLm9G5/K7oWT31BOT85/HXgkNFxPJ+Dukb4xdYZ8bLn4+ZDoz4ACgVbX5y t25LdIzNkOoCPZ/xFylatJ0H6grZ+BqJ+uIUBEWIR7yPoa4R12ZatErdpSrGCfTlbByx RZle4p4peLIbX058kinrBER3UwtiQke/oUEGV9c/3NTyZNASjosFkH80EJsN61qPW3vd uk/A== X-Gm-Message-State: AKS2vOy+E7T3xXGVp8zzYMWGCkCgxb7LrxC37I7JKLWn0GpOY0xY31kC ItPNGWFHR0oDUk8n X-Received: by 10.98.87.29 with SMTP id l29mr20528326pfb.3.1498801655360; Thu, 29 Jun 2017 22:47:35 -0700 (PDT) Received: from localhost.localdomain ([106.51.129.233]) by smtp.gmail.com with ESMTPSA id a187sm11405550pgc.37.2017.06.29.22.47.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 22:47:34 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Florian Fainelli , "David S . Miller" Subject: [PATCH for-4.4 16/16] net: bgmac: Remove superflous netif_carrier_on() Date: Fri, 30 Jun 2017 11:16:40 +0530 Message-Id: <1498801600-20896-17-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> References: <1498801600-20896-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Florian Fainelli commit 3894396e64994f31c3ef5c7e6f63dded0593e567 upstream. bgmac_open() calls phy_start() to initialize the PHY state machine, which will set the interface's carrier state accordingly, no need to force that as this could be conflicting with the PHY state determined by PHYLIB. Fixes: dd4544f05469 ("bgmac: driver for GBit MAC core on BCMA bus") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Amit Pundir --- drivers/net/ethernet/broadcom/bgmac.c | 2 -- 1 file changed, 2 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c index a01f62ec12bb..70da30095b89 100644 --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c @@ -1308,8 +1308,6 @@ static int bgmac_open(struct net_device *net_dev) phy_start(bgmac->phy_dev); - netif_carrier_on(net_dev); - netif_start_queue(net_dev); return 0;