On Fri, Feb 07, 2003 at 08:37:05AM +0100, Steven Scholz wrote:
> Tom Rini wrote:
> >...
> >Okay.  Moving along the process, I have a comment:
> >
> >
> >>@@ -2285,6 +2278,39 @@
> >>    fep->old_status = 0;
> >>#endif      /* CONFIG_USE_MDIO */
> >>
> >>+#ifdef CONFIG_USE_MDIO
> >>+# ifndef PHY_INTERRUPT
> >>+#  error Want to use MII, but PHY_INTERRUPT not defined!
> >>+# endif
> >>+   /* before requesting the irq, we should wait until PHY is discovered
> >>+    * to avoid race conditions
> >>+    */
> >>+   while (!fep->phy_id_done) {
> >>+           udelay(5);
> >>+   }
> >
> >
> >I believe this is wrong, in that trying to udelay() here is a bad idea.
> >I don't have the time right now, but I suspect google, or #kernelnewbies
> >might be able to suggest a more appropriate way of waiting here.
> >
> >Or perhaps classes have fried my mind, and this is correct.
> No. I bet you're right.
> But can you make any suggestion on how to wait for some I/O to become ready?

How about what Dan mentioned, with a function pointer and whatnot?

--
Tom Rini
http://gate.crashing.org/~trini/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/



Reply via email to