diff options
author | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-11-03 15:15:52 +0000 |
---|---|---|
committer | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-11-03 15:15:52 +0000 |
commit | dfffaea839fd631ec0b3d4f58540316a04c4f2ad (patch) | |
tree | b174b3a3d03c0c2b4a9b9c980efe38089069a2d4 /target/linux/lantiq/patches/800-fix-etop.patch | |
parent | de6080b7c2e5f3d2a9ed9677e3df0667bfc31842 (diff) |
lantiq: bump to 3.1
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28721 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches/800-fix-etop.patch')
-rw-r--r-- | target/linux/lantiq/patches/800-fix-etop.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches/800-fix-etop.patch b/target/linux/lantiq/patches/800-fix-etop.patch new file mode 100644 index 0000000000..462a2c313d --- /dev/null +++ b/target/linux/lantiq/patches/800-fix-etop.patch @@ -0,0 +1,67 @@ +--- a/drivers/net/lantiq_etop.c ++++ b/drivers/net/lantiq_etop.c +@@ -397,7 +397,10 @@ ltq_etop_get_settings(struct net_device + { + struct ltq_etop_priv *priv = netdev_priv(dev); + +- return phy_ethtool_gset(priv->phydev, cmd); ++ if (priv->phydev) ++ return phy_ethtool_gset(priv->phydev, cmd); ++ else ++ return 0; + } + + static int +@@ -405,7 +408,10 @@ ltq_etop_set_settings(struct net_device + { + struct ltq_etop_priv *priv = netdev_priv(dev); + +- return phy_ethtool_sset(priv->phydev, cmd); ++ if (priv->phydev) ++ return phy_ethtool_sset(priv->phydev, cmd); ++ else ++ return 0; + } + + static int +@@ -413,7 +419,10 @@ ltq_etop_nway_reset(struct net_device *d + { + struct ltq_etop_priv *priv = netdev_priv(dev); + +- return phy_start_aneg(priv->phydev); ++ if (priv->phydev) ++ return phy_start_aneg(priv->phydev); ++ else ++ return 0; + } + + static const struct ethtool_ops ltq_etop_ethtool_ops = { +@@ -615,7 +624,8 @@ ltq_etop_open(struct net_device *dev) + ltq_dma_open(&ch->dma); + napi_enable(&ch->napi); + } +- phy_start(priv->phydev); ++ if (priv->phydev) ++ phy_start(priv->phydev); + netif_tx_start_all_queues(dev); + return 0; + } +@@ -627,7 +637,8 @@ ltq_etop_stop(struct net_device *dev) + int i; + + netif_tx_stop_all_queues(dev); +- phy_stop(priv->phydev); ++ if (priv->phydev) ++ phy_stop(priv->phydev); + for (i = 0; i < MAX_DMA_CHAN; i++) { + struct ltq_etop_chan *ch = &priv->ch[i]; + +@@ -775,7 +786,7 @@ ltq_etop_init(struct net_device *dev) + ltq_etop_set_multicast_list(dev); + err = ltq_etop_mdio_init(dev); + if (err) +- goto err_netdev; ++ pr_warn("etop: mdio probe failed\n");; + return 0; + + err_netdev: |