]> git.sur5r.net Git - u-boot/commitdiff
net: zynq_gem: Use wait_for_bit with non breakable
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Tue, 30 May 2017 12:28:39 +0000 (14:28 +0200)
committerJoe Hershberger <joe.hershberger@ni.com>
Fri, 2 Jun 2017 19:44:20 +0000 (14:44 -0500)
Use wait_for_bit to be non breakable as using it with
breakable causes issue of un interruptible auto negotiation.
This is due to the ctrlc pressed will taken for wait_for_bit()
abort during phy_read() and hence not coming out of
auto negotiation.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/zynq_gem.c

index f3d6727a9d2939ea949a62c1c2255284809243d2..d3919bee61efff5aaac027b14c62bd4e790a5339 100644 (file)
@@ -192,7 +192,7 @@ static u32 phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
        int err;
 
        err = wait_for_bit(__func__, &regs->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
-                           true, 20000, true);
+                           true, 20000, false);
        if (err)
                return err;
 
@@ -205,7 +205,7 @@ static u32 phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
        writel(mgtcr, &regs->phymntnc);
 
        err = wait_for_bit(__func__, &regs->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
-                           true, 20000, true);
+                           true, 20000, false);
        if (err)
                return err;