Re: [PATCH] 3c59x: read current link status from phy

From: Andy Fleming
Date: Fri Sep 09 2005 - 13:08:55 EST



On Sep 9, 2005, at 05:10, Bogdan Costescu wrote:

On Thu, 8 Sep 2005, Andy Fleming wrote:


Is the cost of an extra read every minute really too high?


You probably didn't look at the code. The MII registers are not exposed in the PCI space, they need to be accessed through a serial protocol, such that each MII register read is in fact about 200 (in total) of outw and inw/inl operations.

I certainly looked at the code. I'm aware that there are probably about 150 microseconds of work, tops, to do each read. Do it outside of interrupt time, and separate from the normal thread of the driver (like a task struct), and it shouldn't take up that much CPU time. And if it's being done every minute, it's really not a big deal, is it?

Anyway, it's not a big deal to me. I agree that doing only one read, if the link is reported as up, is a good idea. I'll be sure to put it in the next rev of the PHY Layer.

I also agree that polling should be done every 5 seconds, at least when the link is down.

Andy Fleming
Freescale Open Source Team
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/