]> git.karo-electronics.de Git - karo-tx-linux.git/commit
net: calxedaxgmac: determine number of address filters at runtime
authorRob Herring <rob.herring@calxeda.com>
Mon, 30 Sep 2013 20:12:17 +0000 (15:12 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Oct 2013 20:10:29 +0000 (16:10 -0400)
commit0cf2f380073867e5d0cfb526fdf9bee0e7f8a9c6
tree5576b9f7fe99866eecfeba289b547c34d242ad8f
parent8a8c3f5bebe2455200cd488aea8546d01645b06b
net: calxedaxgmac: determine number of address filters at runtime

Highbank and Midway xgmac h/w have different number of MAC address filter
registers with 7 and 31, respectively. Highbank has been wrong, so fix it
and detect the number of filter registers at run-time. Unfortunately,
the version register is the same on both SOCs, so simply test if write to
the last filter register will take a value. It always reads as 0 if not.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/calxeda/xgmac.c