* [PATCH] net: gem: Reduce timeout of mdio phy idle status check
@ 2021-11-18 12:05 Michal Simek
2021-11-21 19:09 ` Ramon Fried
2022-01-05 9:37 ` Michal Simek
0 siblings, 2 replies; 5+ messages in thread
From: Michal Simek @ 2021-11-18 12:05 UTC (permalink / raw)
To: u-boot, git; +Cc: Ashok Reddy Soma, Joe Hershberger, Ramon Fried
From: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Timeout for checking mdio phy idle status is 20seconds. In case of errors
this timeout will be too much. Reduce it to 100ms.
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
drivers/net/zynq_gem.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index c309c3c95499..033021f1cbfc 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -110,6 +110,8 @@
#define ZYNQ_GEM_DCFG_DBG6_DMA_64B BIT(23)
+#define MDIO_IDLE_TIMEOUT_MS 100
+
/* Use MII register 1 (MII status register) to detect PHY */
#define PHY_DETECT_REG 1
@@ -225,7 +227,7 @@ static int phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
int err;
err = wait_for_bit_le32(®s->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
- true, 20000, false);
+ true, MDIO_IDLE_TIMEOUT_MS, false);
if (err)
return err;
@@ -238,7 +240,7 @@ static int phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
writel(mgtcr, ®s->phymntnc);
err = wait_for_bit_le32(®s->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
- true, 20000, false);
+ true, MDIO_IDLE_TIMEOUT_MS, false);
if (err)
return err;
--
2.33.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] net: gem: Reduce timeout of mdio phy idle status check
2021-11-18 12:05 [PATCH] net: gem: Reduce timeout of mdio phy idle status check Michal Simek
@ 2021-11-21 19:09 ` Ramon Fried
2022-01-05 9:37 ` Michal Simek
1 sibling, 0 replies; 5+ messages in thread
From: Ramon Fried @ 2021-11-21 19:09 UTC (permalink / raw)
To: Michal Simek; +Cc: U-Boot Mailing List, git, Ashok Reddy Soma, Joe Hershberger
On Thu, Nov 18, 2021 at 2:05 PM Michal Simek <michal.simek@xilinx.com> wrote:
>
> From: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
>
> Timeout for checking mdio phy idle status is 20seconds. In case of errors
> this timeout will be too much. Reduce it to 100ms.
>
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> drivers/net/zynq_gem.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
> index c309c3c95499..033021f1cbfc 100644
> --- a/drivers/net/zynq_gem.c
> +++ b/drivers/net/zynq_gem.c
> @@ -110,6 +110,8 @@
>
> #define ZYNQ_GEM_DCFG_DBG6_DMA_64B BIT(23)
>
> +#define MDIO_IDLE_TIMEOUT_MS 100
> +
> /* Use MII register 1 (MII status register) to detect PHY */
> #define PHY_DETECT_REG 1
>
> @@ -225,7 +227,7 @@ static int phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
> int err;
>
> err = wait_for_bit_le32(®s->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
> - true, 20000, false);
> + true, MDIO_IDLE_TIMEOUT_MS, false);
> if (err)
> return err;
>
> @@ -238,7 +240,7 @@ static int phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
> writel(mgtcr, ®s->phymntnc);
>
> err = wait_for_bit_le32(®s->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
> - true, 20000, false);
> + true, MDIO_IDLE_TIMEOUT_MS, false);
> if (err)
> return err;
>
> --
> 2.33.1
>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: gem: Reduce timeout of mdio phy idle status check
2021-11-18 12:05 [PATCH] net: gem: Reduce timeout of mdio phy idle status check Michal Simek
2021-11-21 19:09 ` Ramon Fried
@ 2022-01-05 9:37 ` Michal Simek
1 sibling, 0 replies; 5+ messages in thread
From: Michal Simek @ 2022-01-05 9:37 UTC (permalink / raw)
To: U-Boot, git; +Cc: Ashok Reddy Soma, Joe Hershberger, Ramon Fried
čt 18. 11. 2021 v 13:05 odesílatel Michal Simek
<michal.simek@xilinx.com> napsal:
>
> From: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
>
> Timeout for checking mdio phy idle status is 20seconds. In case of errors
> this timeout will be too much. Reduce it to 100ms.
>
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> drivers/net/zynq_gem.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
> index c309c3c95499..033021f1cbfc 100644
> --- a/drivers/net/zynq_gem.c
> +++ b/drivers/net/zynq_gem.c
> @@ -110,6 +110,8 @@
>
> #define ZYNQ_GEM_DCFG_DBG6_DMA_64B BIT(23)
>
> +#define MDIO_IDLE_TIMEOUT_MS 100
> +
> /* Use MII register 1 (MII status register) to detect PHY */
> #define PHY_DETECT_REG 1
>
> @@ -225,7 +227,7 @@ static int phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
> int err;
>
> err = wait_for_bit_le32(®s->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
> - true, 20000, false);
> + true, MDIO_IDLE_TIMEOUT_MS, false);
> if (err)
> return err;
>
> @@ -238,7 +240,7 @@ static int phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
> writel(mgtcr, ®s->phymntnc);
>
> err = wait_for_bit_le32(®s->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
> - true, 20000, false);
> + true, MDIO_IDLE_TIMEOUT_MS, false);
> if (err)
> return err;
>
> --
> 2.33.1
>
Applied.
M
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: gem: Reduce timeout of mdio phy idle status check
2021-10-29 11:16 Michal Simek
@ 2021-11-01 20:26 ` Ramon Fried
0 siblings, 0 replies; 5+ messages in thread
From: Ramon Fried @ 2021-11-01 20:26 UTC (permalink / raw)
To: Michal Simek; +Cc: U-Boot Mailing List, git, Ashok Reddy Soma, Joe Hershberger
On Fri, Oct 29, 2021 at 2:16 PM Michal Simek <michal.simek@xilinx.com> wrote:
>
> From: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
>
> Timeout for checking mdio phy idle status is 20seconds. In case of errors
> this timeout will be too much. Reduce it to 100ms.
>
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> drivers/net/zynq_gem.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
> index c309c3c95499..033021f1cbfc 100644
> --- a/drivers/net/zynq_gem.c
> +++ b/drivers/net/zynq_gem.c
> @@ -110,6 +110,8 @@
>
> #define ZYNQ_GEM_DCFG_DBG6_DMA_64B BIT(23)
>
> +#define MDIO_IDLE_TIMEOUT_MS 100
> +
> /* Use MII register 1 (MII status register) to detect PHY */
> #define PHY_DETECT_REG 1
>
> @@ -225,7 +227,7 @@ static int phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
> int err;
>
> err = wait_for_bit_le32(®s->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
> - true, 20000, false);
> + true, MDIO_IDLE_TIMEOUT_MS, false);
> if (err)
> return err;
>
> @@ -238,7 +240,7 @@ static int phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
> writel(mgtcr, ®s->phymntnc);
>
> err = wait_for_bit_le32(®s->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
> - true, 20000, false);
> + true, MDIO_IDLE_TIMEOUT_MS, false);
> if (err)
> return err;
>
> --
> 2.33.1
>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] net: gem: Reduce timeout of mdio phy idle status check
@ 2021-10-29 11:16 Michal Simek
2021-11-01 20:26 ` Ramon Fried
0 siblings, 1 reply; 5+ messages in thread
From: Michal Simek @ 2021-10-29 11:16 UTC (permalink / raw)
To: u-boot, git; +Cc: Ashok Reddy Soma, Joe Hershberger, Ramon Fried
From: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Timeout for checking mdio phy idle status is 20seconds. In case of errors
this timeout will be too much. Reduce it to 100ms.
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
drivers/net/zynq_gem.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index c309c3c95499..033021f1cbfc 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -110,6 +110,8 @@
#define ZYNQ_GEM_DCFG_DBG6_DMA_64B BIT(23)
+#define MDIO_IDLE_TIMEOUT_MS 100
+
/* Use MII register 1 (MII status register) to detect PHY */
#define PHY_DETECT_REG 1
@@ -225,7 +227,7 @@ static int phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
int err;
err = wait_for_bit_le32(®s->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
- true, 20000, false);
+ true, MDIO_IDLE_TIMEOUT_MS, false);
if (err)
return err;
@@ -238,7 +240,7 @@ static int phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
writel(mgtcr, ®s->phymntnc);
err = wait_for_bit_le32(®s->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
- true, 20000, false);
+ true, MDIO_IDLE_TIMEOUT_MS, false);
if (err)
return err;
--
2.33.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-01-05 9:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 12:05 [PATCH] net: gem: Reduce timeout of mdio phy idle status check Michal Simek
2021-11-21 19:09 ` Ramon Fried
2022-01-05 9:37 ` Michal Simek
-- strict thread matches above, loose matches on Subject: below --
2021-10-29 11:16 Michal Simek
2021-11-01 20:26 ` Ramon Fried
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.