]> git.karo-electronics.de Git - karo-tx-linux.git/commit
net: netcp: ale: use ale_status to size the ale table
authorKaricheri, Muralidharan <m-karicheri2@ti.com>
Fri, 6 Jan 2017 20:37:45 +0000 (15:37 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Jan 2017 02:03:50 +0000 (21:03 -0500)
commit7938a0d75fd64ce419b1cdf16aa182fa0fd1acd6
tree34b903b46d8c5b49cb8fa80b850797adeec87a53
parentca47130a744b47495cfaa0f29f3f8d4c85079cba
net: netcp: ale: use ale_status to size the ale table

ALE h/w on newer version of NetCP (K2E/L/G) does provide a ALE_STATUS
register for the size of the ALE Table implemented in h/w. Currently
for example we set ALE Table size to 1024 for NetCP ALE on
K2E even though the ALE Status/Documentation shows it has 8192 entries.
So take advantage of this register to read the size of ALE table supported
and use that value in the driver for the newer version of NetCP ALE.
For NetCP lite, ALE Table size is much less (64) and indicated by a size
of zero in ALE_STATUS. So use that as a default for now. While at it,
also fix the ale table size on 10G switch to 2048 per User guide
http://www.ti.com/lit/ug/spruhj5/spruhj5.pdf

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw_ale.c
drivers/net/ethernet/ti/netcp_ethss.c