mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@gmx.net>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>,
	Brian Lazara <blazara@nvidia.com>,
	Christoph Hellwig <hch@infradead.org>,
	Manfred Spraul <manfred@colorfullife.com>,
	Andrew de Quincey <adq@lidskialf.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] new device support for forcedeth.c second try
Date: Sat, 19 Jun 2004 17:08:38 +0200	[thread overview]
Message-ID: <20040619170838.A2300@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <40D44F1D.6090701@gmx.net>; from c-d.hailfinger.kernel.2004@gmx.net on Sat, Jun 19, 2004 at 04:35:09PM +0200

Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@gmx.net> :
[...]
>         //must wait till reset is deasserted
>         while (miicontrol & BMCR_RESET) {
>                 udelay(NV_MIIBUSY_DELAY);
>                 miicontrol = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ);
>                 /* FIXME: 1000 tries seem excessive */
>                 if (tries++ > 1000)
>                         return -1;
>         }
>         return 0;
> }
> 
> 
> Better?

Fine: at least the FIXME clearly says that it must be fixed :o)

NV_MIIBUSY_DELAY is only 50us but it still means a pair of cycles on
nowadays CPU. If memory serves me right, the reset can take quite some
time per 802.3. So I would simply schedule_timeout() if going through
the while() loop is required at all.

--
Ueimor

  parent reply	other threads:[~2004-06-19 15:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-19 13:21 Carl-Daniel Hailfinger
2004-06-19 13:55 ` Francois Romieu
2004-06-19 14:15   ` Bartlomiej Zolnierkiewicz
2004-06-19 14:35     ` Carl-Daniel Hailfinger
2004-06-19 14:56       ` Bartlomiej Zolnierkiewicz
2004-06-19 15:08       ` Francois Romieu [this message]
2004-06-19 16:18 ` Manfred Spraul
2004-06-19 16:50   ` Carl-Daniel Hailfinger
2004-06-19 16:56     ` Christoph Hellwig
2004-06-21  3:06       ` [PATCH] new device support for forcedeth.c third try Carl-Daniel Hailfinger
2004-06-21 17:10 [PATCH] new device support for forcedeth.c second try Brian Lazara
2004-06-21 17:36 ` Carl-Daniel Hailfinger
2004-06-21 19:00   ` Kalin KOZHUHAROV
2004-06-21 19:48     ` Carl-Daniel Hailfinger
2004-06-21 21:38       ` Kalin KOZHUHAROV

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=20040619170838.A2300@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=adq@lidskialf.net \
    --cc=blazara@nvidia.com \
    --cc=c-d.hailfinger.kernel.2004@gmx.net \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.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

all inboxes | Powered by JetHome®