From patchwork Wed Jan 25 09:56:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 719616 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3v7gVb0cwDz9ryZ for ; Wed, 25 Jan 2017 20:58:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JNBXiEG1"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 37A97B38A0; Wed, 25 Jan 2017 10:58:34 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tnGHCdzAniHz; Wed, 25 Jan 2017 10:58:34 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 685C3B38C5; Wed, 25 Jan 2017 10:58:16 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7DE5EB3878 for ; Wed, 25 Jan 2017 10:58:13 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dnPfVUifHlMH for ; Wed, 25 Jan 2017 10:58:13 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by theia.denx.de (Postfix) with ESMTPS id 2C136B38C5 for ; Wed, 25 Jan 2017 10:57:45 +0100 (CET) Received: by mail-pf0-f195.google.com with SMTP id y143so14082123pfb.1 for ; Wed, 25 Jan 2017 01:57:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BgVp1ZJYZbRt2tJ5MPrjjlm2gyn6z5ZScKtHXP17HqE=; b=JNBXiEG1nmsEGsHdryMO1DQOkzPnIkRO5AzrFas1WZdijao3H8B4pmYKlK3+HPStRQ ZHi9aLNVU+I/y1xuCd6UiBiSUmg8N5f32Fk9ZR8i68wfPxvOdjigoEAmIbBsIdvUuld9 EAzokfRi5ZFYzIbU6qweJpdWy1i6R6Xd/O6w/bXMkMY7Hw/yDs4QRIsR5eEfkY+aYu4k Is/rdqw3m0gRxTrsWSoBUJqYZLlP+hSiQn0x0Fq6wl8atmN4vPgEdm2hapeWJkQ73xDn 4kCLQm3IcQAw3cjPvDto/7SW+Dmd2cbR7JPW/qnIoVkcUW+hNg2mSDSuwGQD+6RFbiFb TMTQ== 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=BgVp1ZJYZbRt2tJ5MPrjjlm2gyn6z5ZScKtHXP17HqE=; b=gDnI2BbfXiNf0wYM3guBDJBpfWWaufK7oQdVNfILZcrTzdUq2H5BAMf9QWKsjHJ+Hr UtMH8O5iso50elvSooy15rILYwuUMg284gOx8wtk7BrA31Fvr5Thr01PC2f12JItEQVk jKGap439fA/tFZ9OsI+Ezhot0zEuPieV8DdBYCxKNzkG0OWHJ1pU8gIIWMHDOfICz02F Lz+XMiSOjCwsW3+/2gfPH/8Lye2p52JdKWpjmHhTSCR1rZbYzATYZrppy1xkt62xGF/m lTGki2XkWo9nr4MCSwPBNZ0oSoBKA/sxpNLpRt4txABE4I+vAlYPRI/d0oRq+aeSwm8B eeOg== X-Gm-Message-State: AIkVDXI3ZgA3t+zKpwkshmrhutPgenpfx9R+rh3mS8FR05fPImMOX6XCLpR5gNOh5PHvgw== X-Received: by 10.84.241.207 with SMTP id t15mr2333040plm.136.1485338263662; Wed, 25 Jan 2017 01:57:43 -0800 (PST) Received: from chrisp-dl.atlnz.lc ([2001:df5:b000:22:8d2c:469e:c0fc:f3ee]) by smtp.gmail.com with ESMTPSA id t87sm50980162pfe.59.2017.01.25.01.57.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Jan 2017 01:57:43 -0800 (PST) From: Chris Packham To: u-boot@lists.denx.de, Joe Hershberger Date: Wed, 25 Jan 2017 22:56:21 +1300 Message-Id: <20170125095622.20326-11-judge.packham@gmail.com> X-Mailer: git-send-email 2.11.0.24.ge6920cf In-Reply-To: <20170125095622.20326-1-judge.packham@gmail.com> References: <20170125095622.20326-1-judge.packham@gmail.com> Cc: Angga , hannah@marvell.com, jp.tosoni@acksys.fr, luka.kovacica@gmail.com, reed@fb.com, Chris Packham Subject: [U-Boot] [RFC PATCH v3 10/11] net: e1000 enable multicast reception X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" IPv6 neighbor discovery uses various multicast addresses to send the request and receive the response. For neighbor discovery to work properly in U-boot the Ethernet device needs to support joining/leaving various L2 multicast groups or it needs to support multicast/promiscuous mode. For the sake of simplicity the latter approach has been taken. The e1000 hardware has slightly finer grained control in that it is possible to enable support for multicast-promiscuous mode separately from unicast so the extra traffic received is less. Signed-off-by: Chris Packham --- Drivers that support multicast reception have it enabled/disabled with CONFIG_MCAST_TFTP. It wouldn't be too hard to create a separate CONFIG_MCAST that is selected by enabling CONFIG_MCAST_TFTP or CONFIG_NET6. Changes in v3: None Changes in v2: None drivers/net/e1000.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 875682b1b89e..4c26cb4ce68f 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -5067,6 +5067,11 @@ e1000_setup_rctl(struct e1000_hw *hw) rctl &= ~(E1000_RCTL_SZ_4096); rctl |= E1000_RCTL_SZ_2048; rctl &= ~(E1000_RCTL_BSEX | E1000_RCTL_LPE); + +#ifdef CONFIG_NET6 + rctl |= E1000_RCTL_MPE; +#endif + E1000_WRITE_REG(hw, RCTL, rctl); }