gianfar: Check if phydev present on ethtool -A
authorClaudiu Manoil <claudiu.manoil@freescale.com>
Wed, 23 Apr 2014 13:38:47 +0000 (16:38 +0300)
committerJiri Slaby <jslaby@suse.cz>
Fri, 3 Mar 2017 10:44:51 +0000 (11:44 +0100)
commitb24cd48cfb7dd16759feb6e6e5f1b0533ed6ae2b
tree7981a83e55807a181691a4c95ac9c6fe94426d8b
parent42e99f1ca072b4e1c0ea6682d7c2c63929f3f3e2
gianfar: Check if phydev present on ethtool -A

commit 98a46d46d1bc983125b6ff9a0e831050a7011713 upstream.

This fixes a seg fault on 'ethtool -A' entry if the
interface is down.  Obviously we need to have the
phy device initialized / "connected" (see of_phy_connect())
to be able to advertise pause frame capabilities.

Fixes: 23402bddf9e56eecb27bbd1e5467b3b79b3dbe58
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/ethernet/freescale/gianfar_ethtool.c