was: FEC on MPC860T & race condition

Steven Scholz steven.scholz at imc-berlin.de
Fri Feb 7 18:37:05 EST 2003


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?


Steven


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





More information about the Linuxppc-embedded mailing list