multicast filtering doesn't work for ODROID C1+ with if_dwc even after r301693

Jared McNeill jmcneill at invisible.ca
Sat Jun 11 19:59:06 UTC 2016


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
>


More information about the freebsd-arm mailing list