was: FEC on MPC860T & race condition
Steven Scholz
steven.scholz at imc-berlin.de
Sat Feb 8 04:15:21 EST 2003
Tom Rini schrieb:
> 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?
As I admitted in my mail to Dan, I am not sure if I understand excactly what mean...
Steven
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list