Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp53315ybg; Mon, 8 Jun 2020 16:13:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVECsQKOLMd9CW9qOruL4qrYAI+9XdNtMjU7O1zPYLh9TPCspLXq01+nK6jpfQvux5TEfi X-Received: by 2002:a17:906:6888:: with SMTP id n8mr22346195ejr.526.1591658013208; Mon, 08 Jun 2020 16:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591658013; cv=none; d=google.com; s=arc-20160816; b=ogjb5EcM4E0AFUdXYmVWYOY1rtqy+kJJjbrm/HoIrWnvvKmKUpMsAzwXZbqBG87aRL +dwub6phIdGjzyaEkizFJsyc8nG2fktzp4c7mZU6dDVLZrmNc0zqDkeRP9Ymn77T+965 J26Y6KJIiaxWWX7MD5O06MCsW/zLPFaVOxWomsYJDQqlcL5MkEAM2dypd02dwBY5ETVC lMNZj3BIt8zpIlh1HNr352ywyI9tBgC2upIioe7q254q6v97CFmUduJfS0VXFuOXs27N grn2PhrCiH9sKLCwG+FFLPs9AdjL9vPoSOd+rFiXZ7qMzsnoXfIWqVqdWBG1HOOZPOsz L1iA== 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; bh=n2fzpyGocFZZMageCa3sG/4xYKVDTv3sTVUF4LZwcYc=; b=l/+P/KyakUkq18haRUjQ+KUA3OhlJXvoM7zwkr1iRc0kp3u8lMLalOO5Ca2TUBOPY7 Vqp4r3YssYWBEAJqtaiUfQ0BCdL0agBINvVM6h5sCiPVYzA7/VFcECYPd8FezsOccvRt +JeQkZRYPB28owEOlwQNvOiH9opby3PteOfjR3fnq4bGS+4S553eIeHJfP4pxSv+5klm uz16hiXOOCSigl1dhv7iiBk2IzAQ+FCmCJPDxD0ooo6QlOtw5l2PRuJ8Ku5kI5fEHZKv dIzOeioCpexc1oVSDBOqI6rXD0hD4QSJXPTkyIEVwghRDhIaYxO9a7HWkfimavNXzSxg OJSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2MRGUJyf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h26si10378108edj.196.2020.06.08.16.13.10; Mon, 08 Jun 2020 16:13:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2MRGUJyf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728619AbgFHXKS (ORCPT + 99 others); Mon, 8 Jun 2020 19:10:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:54914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728371AbgFHXJN (ORCPT ); Mon, 8 Jun 2020 19:09:13 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2FF1A20E65; Mon, 8 Jun 2020 23:09:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657753; bh=sI8qGZ67vRCEu32jaQy/usE2cJJy7oZBz5RPrSs/cAY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2MRGUJyfMnV47DfEwgVcDd6yQCn+s+eZ6hFMRT4kU31qW2UaCBboCy9wd2Y0xaPj3 lTA5JMkhLb2Hybhsqr/QxV+jbviyJn2WpEHWghZhVzlDh34quij4RA2z2RigaZn9Fv pq3HmAKy+TtmSN/s4Dbu2DDan3kXH/0/IzCwx3lk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Doug Berger , Florian Fainelli , "David S . Miller" , Sasha Levin , bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.7 139/274] net: bcmgenet: set Rx mode before starting netif Date: Mon, 8 Jun 2020 19:03:52 -0400 Message-Id: <20200608230607.3361041-139-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Doug Berger [ Upstream commit 72f96347628e73dbb61b307f18dd19293cc6792a ] This commit explicitly calls the bcmgenet_set_rx_mode() function when the network interface is started. This function is normally called by ndo_set_rx_mode when the flags are changed, but apparently not when the driver is suspended and resumed. This change ensures that address filtering or promiscuous mode are properly restored by the driver after the MAC may have been reset. Fixes: b6e978e50444 ("net: bcmgenet: add suspend/resume callbacks") Signed-off-by: Doug Berger Acked-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 79636c78127c..38bdfd4b46f0 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -70,6 +70,9 @@ #define GENET_RDMA_REG_OFF (priv->hw_params->rdma_offset + \ TOTAL_DESC * DMA_DESC_SIZE) +/* Forward declarations */ +static void bcmgenet_set_rx_mode(struct net_device *dev); + static inline void bcmgenet_writel(u32 value, void __iomem *offset) { /* MIPS chips strapped for BE will automagically configure the @@ -2803,6 +2806,7 @@ static void bcmgenet_netif_start(struct net_device *dev) struct bcmgenet_priv *priv = netdev_priv(dev); /* Start the network engine */ + bcmgenet_set_rx_mode(dev); bcmgenet_enable_rx_napi(priv); umac_enable_set(priv, CMD_TX_EN | CMD_RX_EN, true); -- 2.25.1