netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Schichan <nschichan@freebox.fr>
To: Leigh Brown <leigh@solinno.co.uk>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Jason Cooper <jason@lakedaemon.net>,
	netdev@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Florian Fainelli <florian@openwrt.org>,
	"David S. Miller" <davem@davemloft.net>,
	linux-arm-kernel@lists.infradead.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: Spurious timeouts in mvmdio
Date: Tue, 17 Dec 2013 14:49:07 +0100	[thread overview]
Message-ID: <52B05653.1000004@freebox.fr> (raw)
In-Reply-To: <a599b2acdb35fa014ed9480f367fe3a7@doppler.thel33t.co.uk>

On 12/16/2013 07:28 PM, Leigh Brown wrote:

> I prefer this patch (which I think you originally proposed) because it is just as
> correct and the code size is a bit smaller in arm mode, and the same size in
> thumb
> mode (on my compiler gcc 4.7.2, at least).  I coded the loop in that way to
> make it
> small.
>
> I don't mind submitting it to David as I made the mistake in the first place.
>
> Regards,
>
> Leigh.
>
> diff --git a/drivers/net/ethernet/marvell/mvmdio.c
> b/drivers/net/ethernet/marvell/mvmdio.c
> index 7354960..a42a750 100644
> --- a/drivers/net/ethernet/marvell/mvmdio.c
> +++ b/drivers/net/ethernet/marvell/mvmdio.c
> @@ -92,6 +92,12 @@ static int orion_mdio_wait_ready(struct mii_bus *bus)
>               if (time_is_before_jiffies(end))
>                   ++timedout;
>               } else {
> +            /* wait_event_timeout does not guarantee a delay of at
> +             * least one whole jiffie, so timeout must be no less
> +             * than two.
> +             */
> +             if (timeout < 2)
> +                 timeout = 2;
>               wait_event_timeout(dev->smi_busy_wait,
>                              orion_mdio_smi_is_done(dev),
>                              timeout);

Hi Leigh,

My original patch changed "timeout" before the entering the while loop, but 
I'm fine with your patch too.

Feel free to add my:

Tested-by: Nicolas Schichan <nschichan@freebox.fr>

Regards,

-- 
Nicolas Schichan
Freebox SAS

  reply	other threads:[~2013-12-17 13:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-02 15:15 Spurious timeouts in mvmdio Nicolas Schichan
2013-12-03 12:23 ` Jason Cooper
2013-12-03 12:40   ` Russell King - ARM Linux
2013-12-03 13:43     ` Jason Cooper
2013-12-03 18:48       ` Nicolas Schichan
2013-12-03 20:57     ` Leigh Brown
2013-12-03 22:45       ` Sebastian Hesselbarth
2013-12-03 23:20         ` Leigh Brown
2013-12-03 23:17           ` Sebastian Hesselbarth
2013-12-03 23:38             ` Leigh Brown
2013-12-03 23:42               ` Russell King - ARM Linux
2013-12-04 11:40                 ` Nicolas Schichan
2013-12-16 18:07                 ` Nicolas Schichan
2013-12-16 18:28                   ` Leigh Brown
2013-12-17 13:49                     ` Nicolas Schichan [this message]
2013-12-16 18:48                   ` Russell King - ARM Linux
2013-12-03 23:45               ` Sebastian Hesselbarth
2013-12-03 13:16   ` [PATCH] net: mvmdio: fix wait_event_timeout() being called with a 1 jiffy timeout Nicolas Schichan
2013-12-03 13:34     ` Russell King - ARM Linux

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=52B05653.1000004@freebox.fr \
    --to=nschichan@freebox.fr \
    --cc=davem@davemloft.net \
    --cc=florian@openwrt.org \
    --cc=jason@lakedaemon.net \
    --cc=leigh@solinno.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=sebastian.hesselbarth@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).