net: phy: xgmiitorgmii: Support generic PHY status read
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Fri, 15 Feb 2019 16:17:08 +0000 (17:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Feb 2019 08:07:25 +0000 (09:07 +0100)
commit618bd2c202b4be4aac47fe520a7264bd041a2764
tree06b971066a53ad023d41f332301c4cab6421be5b
parent1764111c99727258f6e947a12a3bcb376ceaf3ef
net: phy: xgmiitorgmii: Support generic PHY status read

[ Upstream commit 197f9ab7f08ce4b9ece662f747c3991b2f0fbb57 ]

Some PHY drivers like the generic one do not provide a read_status
callback on their own but rely on genphy_read_status being called
directly.

With the current code, this results in a NULL function pointer call.
Call genphy_read_status instead when there is no specific callback.

Fixes: f411a6160bd4 ("net: phy: Add gmiitorgmii converter support")
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/xilinx_gmii2rgmii.c