summaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-3.0/800-fix-etop.patch
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-10-10 15:13:46 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-10-10 15:13:46 +0000
commiteac20bee29a59c0527af99876295984b61f6b955 (patch)
tree0f8c817f0dfc9ae67a7e62306b3070c4b4c8f1c0 /target/linux/lantiq/patches-3.0/800-fix-etop.patch
parent001373d3bc5f5e7be6c83da0a6b476b668878969 (diff)
[lantiq]
* update patches to 3.0 * add basic vr9 support * backport 3.1 fixes * backport 3.2 queue (falcon) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28405 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches-3.0/800-fix-etop.patch')
-rw-r--r--target/linux/lantiq/patches-3.0/800-fix-etop.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.0/800-fix-etop.patch b/target/linux/lantiq/patches-3.0/800-fix-etop.patch
new file mode 100644
index 000000000..c92e08e70
--- /dev/null
+++ b/target/linux/lantiq/patches-3.0/800-fix-etop.patch
@@ -0,0 +1,69 @@
+Index: linux-3.0.3/drivers/net/lantiq_etop.c
+===================================================================
+--- linux-3.0.3.orig/drivers/net/lantiq_etop.c 2011-10-07 11:03:00.140000754 +0200
++++ linux-3.0.3/drivers/net/lantiq_etop.c 2011-10-07 11:03:06.088001008 +0200
+@@ -397,7 +397,10 @@
+ {
+ 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 @@
+ {
+ 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 @@
+ {
+ 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_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 @@
+ 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_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: