From 86598e636326ac57d99fbeb3b0b9fbf7442ab9ba Mon Sep 17 00:00:00 2001 From: blogic Date: Mon, 16 Apr 2012 12:31:48 +0000 Subject: [lantiq] adds 3.3 patches and files git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31307 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...ntiq-non-existing-phy-was-not-handled-gra.patch | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 target/linux/lantiq/patches-3.3/0016-NET-MIPS-lantiq-non-existing-phy-was-not-handled-gra.patch (limited to 'target/linux/lantiq/patches-3.3/0016-NET-MIPS-lantiq-non-existing-phy-was-not-handled-gra.patch') diff --git a/target/linux/lantiq/patches-3.3/0016-NET-MIPS-lantiq-non-existing-phy-was-not-handled-gra.patch b/target/linux/lantiq/patches-3.3/0016-NET-MIPS-lantiq-non-existing-phy-was-not-handled-gra.patch new file mode 100644 index 000000000..f18827ac0 --- /dev/null +++ b/target/linux/lantiq/patches-3.3/0016-NET-MIPS-lantiq-non-existing-phy-was-not-handled-gra.patch @@ -0,0 +1,67 @@ +From d6a9d52bfcc2d8f163e95920cf3678847bb97f18 Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Tue, 15 Nov 2011 14:52:21 +0100 +Subject: [PATCH 16/70] NET: MIPS: lantiq: non existing phy was not handled + gracefully + +The code blindly assumed that that a PHY device was present causing a BadVA. +In addition the driver should not fail to load incase no PHY was found. +Instead we print the following line and continue with no attached PHY. + + etop: mdio probe failed + +Signed-off-by: John Crispin +Cc: netdev@vger.kernel.org +--- + drivers/net/ethernet/lantiq_etop.c | 14 ++++++++------ + 1 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c +index e799b88..5a8ca89 100644 +--- a/drivers/net/ethernet/lantiq_etop.c ++++ b/drivers/net/ethernet/lantiq_etop.c +@@ -614,7 +614,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; + } +@@ -626,7 +627,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]; + +@@ -772,9 +774,10 @@ ltq_etop_init(struct net_device *dev) + if (err) + goto err_netdev; + ltq_etop_set_multicast_list(dev); +- err = ltq_etop_mdio_init(dev); +- if (err) +- goto err_netdev; ++ if (!ltq_etop_mdio_init(dev)) ++ dev->ethtool_ops = <q_etop_ethtool_ops; ++ else ++ pr_warn("etop: mdio probe failed\n");; + return 0; + + err_netdev: +@@ -870,7 +873,6 @@ ltq_etop_probe(struct platform_device *pdev) + dev = alloc_etherdev_mq(sizeof(struct ltq_etop_priv), 4); + strcpy(dev->name, "eth%d"); + dev->netdev_ops = <q_eth_netdev_ops; +- dev->ethtool_ops = <q_etop_ethtool_ops; + priv = netdev_priv(dev); + priv->res = res; + priv->pdev = pdev; +-- +1.7.9.1 + -- cgit v1.2.3