net: stmmac: Populate missing callbacks in HWIF initialization
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 18 May 2018 15:54:38 +0000 (16:54 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 May 2018 17:56:08 +0000 (13:56 -0400)
commiteb38401c779d350e9e31396471ea072fa29aec9b
treeab541afa1af56b98bdd8b0fa1390c811ba0c2ffd
parent80a95a80d358ded600a517ea0a93fe86b8f8da84
net: stmmac: Populate missing callbacks in HWIF initialization

Some HW specific setups, like sun8i, do not populate all the necessary
callbacks, which is what HWIF helpers were expecting.

Fix this by always trying to get the generic helpers and populate them
if they were not previously populated by HW specific setup.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Fixes: 5f0456b43140 ("net: stmmac: Implement logic to automatically
select HW Interface")
Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Cc: Corentin Labbe <clabbe.montjoie@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/hwif.c