From patchwork Tue Jul 4 11:44:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106947 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp897802qge; Tue, 4 Jul 2017 04:44:46 -0700 (PDT) X-Received: by 10.99.181.66 with SMTP id u2mr15228166pgo.83.1499168686571; Tue, 04 Jul 2017 04:44:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499168686; cv=none; d=google.com; s=arc-20160816; b=YYurud3FgWDq/Vi4KN7dOjGUZH/eZ3Izz/9oMdmYCQUvVxVwalh0ml7t+758FbKksW FMItqK6YqCnjNxHkFGrKPXPeNBFhclViBVwnzSjiYpRG2kl+KbXw0y7+xxS/IjtrKA6f LlPXRa+kwmkpFS7IpUOZWuPrlhWjR3rCE6bBc/ZbMBjVYKPBwpncVxqctJDeBDt4VOyZ SiQW6EnrgIAE6jhnsAxddR872PivBuOYcsnk6YUz1uBnlVzxmwe8h9WLwrqwOoKncR7Y vOBVpVwb5gp4me/m5rzqToqOvbvvKsh95TOlPlABoKqa6ZKHT4xhtp2cYW94UJRAk0EZ 0ddA== 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=Ll5mQuVKYeHGae0PeLX7GB7g5hUv55r1yemAKf28CW0=; b=ouTBFMjBg1CAyoXPcslfHXdxyKVonaOJnBpwnXzOLaLYY3Lv/U/sK1Fm0tyvkG0veo 0EvZAtZwVa3rb1LmB2J4WJNbeDWd4zHDqUnQc90EMwETq/O1x7Kvci1a+zS4ViSh1CUZ sybqjY+MWhF73KiWXlMcg3OfFa+4b4XAeih2wAMmw65Wxt1bSNAg/kVzS2LE9gnaq+dn XApeaPubjq/sk+61REoJLCsrMFFqUt9rbBL0rojTJtZ5m27t7eFGPJRISdoGn80x22Yl BpMZ8vvXKTW2lKX8A1byDGfzK3RBrsiauUhRGeU1BufFqtRv1czUt9A7AO5KxZy1AlXi DRiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=Juh3UCwf; 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 x10si14416295pfi.192.2017.07.04.04.44.46; Tue, 04 Jul 2017 04:44:46 -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=Juh3UCwf; 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 S1752099AbdGDLop (ORCPT + 6 others); Tue, 4 Jul 2017 07:44:45 -0400 Received: from mail-pg0-f44.google.com ([74.125.83.44]:34211 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752040AbdGDLop (ORCPT ); Tue, 4 Jul 2017 07:44:45 -0400 Received: by mail-pg0-f44.google.com with SMTP id t186so109750283pgb.1 for ; Tue, 04 Jul 2017 04:44:45 -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=Ll5mQuVKYeHGae0PeLX7GB7g5hUv55r1yemAKf28CW0=; b=Juh3UCwfj9dhsm/p0jN4TMh0CDEljtUi+fmZ0cdxj3Q8cagwVGUX4Iki8206NvSZg9 M5GwDHTy/Bq75IDyJJgwDuqFJVCjvfoHTkIlaeG0s6Je0DYnzb2DNxyYOUfUB1R2xbKI 9e+3mhN1dWVUiy7Cx0p0bReBFGRbrBRWw++Lg= 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=Ll5mQuVKYeHGae0PeLX7GB7g5hUv55r1yemAKf28CW0=; b=hg6FEujwLG2TqPqP/+LtsF/tAVWUPa5xHMn9lNiJydJ6p8XcnOLkN7yQU7iEu2nsYY Of1vjDje2wB3uar6WYLTO1iPQD+h0bdAcqGBBjDIv+12789oqH1ihPBnBtHtRio4BEu2 NGoeHt8TRdR0G8LfQ+hgViZIyAO0VFVWiggTM31wRVonVxBNy4KYIAsKsRcFx/Iu5g/G x4lj6tPRV49pr6z5Fdj2KQ54YKpVfw1HvSl9r9vP3yejgWFwoyDPpD2CoNjDDDcbHURk Fvtdmlj2dsvuAevP4PXpo6sH39wksIJn6lcia4QbievncDxVcA+s7MmPP9/T5YhidT4h McTw== X-Gm-Message-State: AIVw112od4Hychhyf7Ye7pTntJuRm4kAvtWG8Zk06NOf3UeDLrrHhxIx hxqXEn6ulFZsN6xRLe5CaQ== X-Received: by 10.98.84.199 with SMTP id i190mr14707257pfb.69.1499168684536; Tue, 04 Jul 2017 04:44:44 -0700 (PDT) Received: from localhost.localdomain ([106.51.234.165]) by smtp.gmail.com with ESMTPSA id t83sm39782750pfg.91.2017.07.04.04.44.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Jul 2017 04:44:43 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Felix Fietkau , "David S . Miller" Subject: [PATCH for-3.18 3/5] bgmac: reset & enable Ethernet core before using it Date: Tue, 4 Jul 2017 17:14:22 +0530 Message-Id: <1499168664-25980-4-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499168664-25980-1-git-send-email-amit.pundir@linaro.org> References: <1499168664-25980-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 b4dfd8e92956b396d3438212bc9a0be6267b8b34 upstream. This fixes Ethernet on D-Link DIR-885L with BCM47094 SoC. Felix reported similar fix was needed for his BCM4709 device (Buffalo WXR-1900DHP?). I tested this for regressions on BCM4706, BCM4708A0 and BCM47081A0. Cc: Felix Fietkau Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller Signed-off-by: Amit Pundir --- To be cherry-picked on linux-4.4.y as well. 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 54a7da860a2d..2b58df0c4f48 100644 --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c @@ -1438,6 +1438,11 @@ static int bgmac_probe(struct bcma_device *core) dev_warn(&core->dev, "Using random MAC: %pM\n", mac); } + /* This (reset &) enable is not preset in specs or reference driver but + * Broadcom does it in arch PCI code when enabling fake PCI device. + */ + bcma_core_enable(core, 0); + /* Allocation and references */ net_dev = alloc_etherdev(sizeof(*bgmac)); if (!net_dev)