All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: davem@davemloft.net, Rob Herring <robh+dt@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	thomas.petazzoni@bootlin.com, Andrew Lunn <andrew@lunn.ch>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH net-next 1/3] net: pcs: altera-tse: use read_poll_timeout to wait for reset
Date: Tue, 29 Nov 2022 20:35:51 -0800	[thread overview]
Message-ID: <20221129203551.170d93e1@kernel.org> (raw)
In-Reply-To: <20221125131801.64234-2-maxime.chevallier@bootlin.com>

On Fri, 25 Nov 2022 14:17:59 +0100 Maxime Chevallier wrote:
> -	for (i = 0; i < SGMII_PCS_SW_RESET_TIMEOUT; i++) {
> -		if (!(tse_pcs_read(tse_pcs, MII_BMCR) & BMCR_RESET))
> -			return 0;
> -		udelay(1);
> -	}
> -
> -	return -ETIMEDOUT;
> +	return read_poll_timeout(tse_pcs_read, bmcr, (bmcr & BMCR_RESET),
> +				 10, SGMII_PCS_SW_RESET_TIMEOUT, 1,
> +				 tse_pcs, MII_BMCR);

You say "no functional change intended" in the cover letter but you
switch from udelay to usleep and change timeouts here. I presume this
is intentional but should be mentioned in the commit message, I think.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <kuba@kernel.org>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: davem@davemloft.net, Rob Herring <robh+dt@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	thomas.petazzoni@bootlin.com, Andrew Lunn <andrew@lunn.ch>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH net-next 1/3] net: pcs: altera-tse: use read_poll_timeout to wait for reset
Date: Tue, 29 Nov 2022 20:35:51 -0800	[thread overview]
Message-ID: <20221129203551.170d93e1@kernel.org> (raw)
In-Reply-To: <20221125131801.64234-2-maxime.chevallier@bootlin.com>

On Fri, 25 Nov 2022 14:17:59 +0100 Maxime Chevallier wrote:
> -	for (i = 0; i < SGMII_PCS_SW_RESET_TIMEOUT; i++) {
> -		if (!(tse_pcs_read(tse_pcs, MII_BMCR) & BMCR_RESET))
> -			return 0;
> -		udelay(1);
> -	}
> -
> -	return -ETIMEDOUT;
> +	return read_poll_timeout(tse_pcs_read, bmcr, (bmcr & BMCR_RESET),
> +				 10, SGMII_PCS_SW_RESET_TIMEOUT, 1,
> +				 tse_pcs, MII_BMCR);

You say "no functional change intended" in the cover letter but you
switch from udelay to usleep and change timeouts here. I presume this
is intentional but should be mentioned in the commit message, I think.

  reply	other threads:[~2022-11-30  4:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-25 13:17 [PATCH net-next 0/3] net: pcs: altera-tse: simplify and clean-up the driver Maxime Chevallier
2022-11-25 13:17 ` Maxime Chevallier
2022-11-25 13:17 ` [PATCH net-next 1/3] net: pcs: altera-tse: use read_poll_timeout to wait for reset Maxime Chevallier
2022-11-25 13:17   ` Maxime Chevallier
2022-11-30  4:35   ` Jakub Kicinski [this message]
2022-11-30  4:35     ` Jakub Kicinski
2022-11-25 13:18 ` [PATCH net-next 2/3] net: pcs: altera-tse: don't set the speed for 1000BaseX Maxime Chevallier
2022-11-25 13:18   ` Maxime Chevallier
2022-11-25 13:18 ` [PATCH net-next 3/3] net: pcs: altera-tse: remove unnecessary register definitions Maxime Chevallier
2022-11-25 13:18   ` Maxime Chevallier
2022-11-27 17:34 ` [PATCH net-next 0/3] net: pcs: altera-tse: simplify and clean-up the driver Russell King (Oracle)
2022-11-27 17:34   ` Russell King (Oracle)
2022-11-28  8:39   ` Maxime Chevallier
2022-11-28  8:39     ` Maxime Chevallier
2022-11-30  4:40 ` patchwork-bot+netdevbpf
2022-11-30  4:40   ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221129203551.170d93e1@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.