From owner-freebsd-arm@freebsd.org Sat Jun 11 19:59:06 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBA43AEFF84 for ; Sat, 11 Jun 2016 19:59:06 +0000 (UTC) (envelope-from jmcneill@invisible.ca) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:c:538::194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 955852950 for ; Sat, 11 Jun 2016 19:59:06 +0000 (UTC) (envelope-from jmcneill@invisible.ca) Received: from mfilter26-d.gandi.net (mfilter26-d.gandi.net [217.70.178.154]) by relay2-d.mail.gandi.net (Postfix) with ESMTP id DC29DC5A3C; Sat, 11 Jun 2016 21:58:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter26-d.gandi.net Received: from relay2-d.mail.gandi.net ([IPv6:::ffff:217.70.183.194]) by mfilter26-d.gandi.net (mfilter26-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id kii_xqocI5xw; Sat, 11 Jun 2016 21:58:54 +0200 (CEST) X-Originating-IP: 47.55.13.40 Received: from [192.168.2.201] (stjhnbsu1kw-047055013040.dhcp-dynamic.FibreOp.nb.bellaliant.net [47.55.13.40]) (Authenticated sender: jmcneill@invisible.ca) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id C4F7DC5A51; Sat, 11 Jun 2016 21:58:52 +0200 (CEST) Date: Sat, 11 Jun 2016 16:57:56 -0300 (ADT) From: Jared McNeill X-X-Sender: jmcneill@invisible.strangled.net To: Guy Yur cc: freebsd-arm Subject: Re: multicast filtering doesn't work for ODROID C1+ with if_dwc even after r301693 In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2016 19:59:06 -0000 Hi Guy -- Nicely spotted! Looking back at r301693 I'm not sure how it worked at all! I was able to use mdns on my Allwinner A20 with it, but I just re-rested with an Allwinner A31 and it didn't work at all. In any case, I just tried your patch and it works great. I'll work on getting it committed. Cheers, Jared On Sat, 11 Jun 2016, Guy Yur wrote: > Hi, > > Multicast filtering doesn't work on my ODROID C1+. > IPv6 connections to the board fail unless the card is put > in promiscuous mode. > > Posting again since I see some changes to if_dwc were done in r301693. > My previous post: > https://lists.freebsd.org/pipermail/freebsd-arm/2016-March/013528.html > > The board uses if_dwc and I am using a newer build than r301693 > which added hashing fixes for DWC_GMAC_ALT_DESC. > Filtering didn't work for me with builds before r301693 either. > > I don't have the dwc manual so I looked at the NetBSD and Linux drivers. > NetBSD only supports the Allwinner configuration with 64 hash entries. > Linux uses snps,multicast-filter-bins dts property when the interface > has more than 64 entries, for example socfpga.dtsi (on FreeBSD it doesn't > have the property, probably older version of the file). > > Both use the upper 6-bits and not the upper 8-bits when the hash table > has only 64 entries. > Linux uses the upper 8-bits when the hash table has 256 entries. > > They also program registers 0x08 and 0x0c instead of > HASH_TABLE_REG(n) 0x500 + (0x4 * n) for 64 entries. > AWIN_GMAC_MAC_HTHIGH and AWIN_GMAC_MAC_HTLOW in NetBSD driver. > > Attached crude patch that uses 6-lower bits (when reversed) instead > of 8-lower bits for DWC_GMAC_ALT_DESC and also uses registers 0x08 > and 0x0c instead. > > With the patch changes I can connect to the board using IPv6. > > Thanks, > Guy >