From patchwork Wed Jan 25 09:56:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 719618 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 3v7gW01f5Xz9ryZ for ; Wed, 25 Jan 2017 20:59:08 +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="SR/a6Pd2"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A79A7B3867; Wed, 25 Jan 2017 10:58:48 +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 qkBIcAYjgNHp; Wed, 25 Jan 2017 10:58:48 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 38CD9B3903; Wed, 25 Jan 2017 10:58:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AAD3AB3892 for ; Wed, 25 Jan 2017 10:58:14 +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 A3TulmXmO4-p for ; Wed, 25 Jan 2017 10:58:14 +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-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by theia.denx.de (Postfix) with ESMTPS id 32BF1B388A for ; Wed, 25 Jan 2017 10:57:49 +0100 (CET) Received: by mail-pg0-f65.google.com with SMTP id 194so19296541pgd.0 for ; Wed, 25 Jan 2017 01:57:49 -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=4ru3F8/mw7Z0r2bB47oOndoJP63gZlL5q7cFBoJdbU0=; b=SR/a6Pd26IKpc6k656+/YCDs7DvPi8mdAjoJB3J2BSYYbT2ZGSbXL6Ry205T+1DDJW I4M5HaI0hSazEI7SGcKj5/K0ngHBnyDeeRqjvjrr7Bq5x/UxdYQlQrQbtSfWYZbWLOx7 6m/02rc9t5no5dtBfIz3isOB8LHQj2uAesHy3gaCcgVCQkCFHcWX5Jrnru2m9IQ2T9LG Ntvvg4NEfEX+EqfpvRxuxnNc4O/n7yi3IWGlnQ9651G0Fv2VBbCP97Y64Raabr5XW9pb f1YcgbfMzjnJRdCThFwLl7MX/WkLMfb2Ce4HKm7VDMnTmm3O9wIL0A/F/o0aLc/1Hqyv 1vfg== 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=4ru3F8/mw7Z0r2bB47oOndoJP63gZlL5q7cFBoJdbU0=; b=qPZE/NDhunbRSa4OP/vYijvxhUTYGHFKjNypXL88RYkwLg+JxrATPE0C3iBs8Tk9/i AWwxzoOHk5uqafRMgt9fsOl+IwbKiw0k8vniY06hL0vayUmWpV2DHQi1tQNKhP7SlKKB fYxFV9ewRbv0Gtt438sV8/Es5jNcuymbeDz2/LhYal6bDOtA+4vdofTsaxLcYACO0pZd ECWNJbALvjczY7e86q9dXXlm6zXoPt4aFFk9KqWNr2ezzxBWE75FZlBMKzyz520mCpy1 9Ye52+gufzp8pn0EHV+F6NwK0ydfrXqM8cc3KbzvgZHFmuqRRNhv/krqbe4ymM3DBgXi g6jQ== X-Gm-Message-State: AIkVDXLIgV5GAEdTCyUf1QfcPa+aaMYb60XimMt+PU5r4zcKrv7sAw48ViFcWPVZKdgM/w== X-Received: by 10.98.217.209 with SMTP id b78mr45294492pfl.53.1485338268026; Wed, 25 Jan 2017 01:57:48 -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.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Jan 2017 01:57:47 -0800 (PST) From: Chris Packham To: u-boot@lists.denx.de, Joe Hershberger Date: Wed, 25 Jan 2017 22:56:22 +1300 Message-Id: <20170125095622.20326-12-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, Chris Packham , luka.kovacica@gmail.com, reed@fb.com, Chris Packham Subject: [U-Boot] [RFC PATCH v3 11/11] net: tsec: enable promiscuous mode 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 multicast groups or it needs to support multicast/promiscuous mode. For the sake of simplicity the latter approach has been taken. Signed-off-by: Chris Packham 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 but for now I want to concentrate on getting the rest of the IPv6 code in good shape. Changes in v3: None Changes in v2: None drivers/net/tsec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 7df4c63acfd7..d97bafec1eb2 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -515,6 +515,10 @@ static void startup_tsec(struct tsec_private *priv) if ((SVR_MAJ(svr) == 1) || IS_SVR_REV(svr, 2, 0)) redundant_init(priv); #endif +#ifdef CONFIG_NET6 + /* Enable promiscuous mode */ + setbits_be32(®s->rctrl, 0x8); +#endif /* Enable Transmit and Receive */ setbits_be32(®s->maccfg1, MACCFG1_RX_EN | MACCFG1_TX_EN);