aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fs_enet/fs_enet-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/fs_enet/fs_enet-main.c')
-rw-r--r--drivers/net/fs_enet/fs_enet-main.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index f2a4d399a6e5..c83bd6560088 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -96,9 +96,6 @@ static int fs_enet_rx_napi(struct napi_struct *napi, int budget)
96 u16 pkt_len, sc; 96 u16 pkt_len, sc;
97 int curidx; 97 int curidx;
98 98
99 if (!netif_running(dev))
100 return 0;
101
102 /* 99 /*
103 * First, grab all of the stats for the incoming packet. 100 * First, grab all of the stats for the incoming packet.
104 * These get messed up if we get called due to a busy condition. 101 * These get messed up if we get called due to a busy condition.
@@ -897,14 +894,21 @@ static void fs_get_regs(struct net_device *dev, struct ethtool_regs *regs,
897static int fs_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) 894static int fs_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
898{ 895{
899 struct fs_enet_private *fep = netdev_priv(dev); 896 struct fs_enet_private *fep = netdev_priv(dev);
897
898 if (!fep->phydev)
899 return -ENODEV;
900
900 return phy_ethtool_gset(fep->phydev, cmd); 901 return phy_ethtool_gset(fep->phydev, cmd);
901} 902}
902 903
903static int fs_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) 904static int fs_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
904{ 905{
905 struct fs_enet_private *fep = netdev_priv(dev); 906 struct fs_enet_private *fep = netdev_priv(dev);
906 phy_ethtool_sset(fep->phydev, cmd); 907
907 return 0; 908 if (!fep->phydev)
909 return -ENODEV;
910
911 return phy_ethtool_sset(fep->phydev, cmd);
908} 912}
909 913
910static int fs_nway_reset(struct net_device *dev) 914static int fs_nway_reset(struct net_device *dev)