diff mbox

[U-Boot,1/2] net: zynq_gem: Use wait_for_bit with non breakable

Message ID b7cd06f5a52f919f183a2aac7262424e3d50af9b.1496147318.git.michal.simek@xilinx.com
State Accepted
Commit dea004e41a6d1aa8ebf668c450962db45a41b373
Delegated to: Joe Hershberger
Headers show

Commit Message

Michal Simek May 30, 2017, 12:28 p.m. UTC
From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

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>
---

 drivers/net/zynq_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Joe Hershberger May 30, 2017, 4:49 p.m. UTC | #1
On Tue, May 30, 2017 at 7:28 AM, Michal Simek <michal.simek@xilinx.com> wrote:
> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
>
> 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>
Joe Hershberger June 2, 2017, 7:48 p.m. UTC | #2
Hi Michal,

https://patchwork.ozlabs.org/patch/768585/ was applied to u-boot-net.git.

Thanks!
-Joe
diff mbox

Patch

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 357f8c2917d2..9c0f5fba28cd 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -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;