Fix non TBI PHY access; a bad merge undid bug fix in a previous commit.
authorKenth Eriksson <kenth.eriksson@transmode.com>
Tue, 27 Mar 2012 22:05:54 +0000 (22:05 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Apr 2012 20:47:12 +0000 (16:47 -0400)
The merge done in commit b26e478f undid bug fix in commit c3e072f8
("net: fsl_pq_mdio: fix non tbi phy access"), with the result that non
TBI (e.g. MDIO) PHYs cannot be accessed.

Signed-off-by: Kenth Eriksson <kenth.eriksson@transmode.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fsl_pq_mdio.c

index 9eb815941df56a6b207d6211c3d09ae272224dd9..f7f0bf5d037b67db6476bdfb06daef60d52e4ad1 100644 (file)
@@ -356,13 +356,13 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev)
 
                if (prop)
                        tbiaddr = *prop;
-       }
 
-       if (tbiaddr == -1) {
-               err = -EBUSY;
-               goto err_free_irqs;
-       } else {
-               out_be32(tbipa, tbiaddr);
+               if (tbiaddr == -1) {
+                       err = -EBUSY;
+                       goto err_free_irqs;
+               } else {
+                       out_be32(tbipa, tbiaddr);
+               }
        }
 
        err = of_mdiobus_register(new_bus, np);