From patchwork Fri Oct 18 16:56:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TcOlbnMgUnVsbGfDpXJk?= X-Patchwork-Id: 11199237 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6C2817EE for ; Fri, 18 Oct 2019 16:57:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 93D6D2089C for ; Fri, 18 Oct 2019 16:57:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NonnqnjC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 93D6D2089C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mansr.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=758xN2CkSjbemjGPfjWtImh7JAjRlQLx4bue9BdHeGY=; b=NonnqnjCfkJFAc ZNpkuXgdisFpDhCCGQCQw6peNm06CG8OXPZsYqPHgStJjugvOB7kdkU7hrZ5OvVlT+OnUw522fII6 16RhZpdG5mHOecQqsRiA53/sy+vtz+LtOt8tPh5OUu6Sr4D10l8Z4Se0OlX84Db0wiN/lrasasICx dE3rrGHHugaKVG5b/EL9Xdwgkfnj+sVAaHe+WUHrX/VIlza/zPeUnxPdXx4D7jNJDtoajAMLDcf4D jIy2RloW1RysCkJyBDxF7abY+kanI8vYjPZTTxvFAMdRHJhTUGgrhcL+dVt8Z0YUlqaw1kNhXGsBB Aq7b7M+WfZ/33n4U5grQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iLVYs-0005YM-7n; Fri, 18 Oct 2019 16:57:10 +0000 Received: from unicorn.mansr.com ([2001:8b0:ca0d:8d8e::2]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iLVYp-0005TX-0F for linux-arm-kernel@lists.infradead.org; Fri, 18 Oct 2019 16:57:08 +0000 Received: by unicorn.mansr.com (Postfix, from userid 51770) id 578A81560D; Fri, 18 Oct 2019 17:57:01 +0100 (BST) From: Mans Rullgard To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu Subject: [PATCH v2] net: ethernet: dwmac-sun8i: show message only when switching to promisc Date: Fri, 18 Oct 2019 17:56:58 +0100 Message-Id: <20191018165658.9752-1-mans@mansr.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191018_095707_207335_76C17FEF X-CRM114-Status: GOOD ( 10.21 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Chen-Yu Tsai , "David S. Miller" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Printing the info message every time more than the max number of mac addresses are requested generates unnecessary log spam. Showing it only when the hw is not already in promiscous mode is equally informative without being annoying. Signed-off-by: Mans Rullgard --- Changed in v2: - test only RXALL bit --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c index 79c91526f3ec..c186de64e552 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c @@ -646,7 +646,8 @@ static void sun8i_dwmac_set_filter(struct mac_device_info *hw, } } } else { - netdev_info(dev, "Too many address, switching to promiscuous\n"); + if (!(readl(ioaddr + EMAC_RX_FRM_FLT) & EMAC_FRM_FLT_RXALL)) + netdev_info(dev, "Too many address, switching to promiscuous\n"); v = EMAC_FRM_FLT_RXALL; }