realtime problem

Harti Brandt brandt at fokus.fraunhofer.de
Fri Apr 11 00:53:38 PDT 2003


On Thu, 10 Apr 2003, Mike Silbersack wrote:

MS>Yes, it should take the early return I added, which is what I think it did
MS>for my 3Com cards, back when I tested it.  You might want to add some
MS>debug code and poke at it more, because the benefits were huge when I
MS>tried it.

Somehow the patch has botched the logic. After patching it looks like:

	mii->mii_media_status = IFM_AVALID;
	mii->mii_media_active = IFM_ETHER;

	bmsr = PHY_READ(phy, MII_BMSR);

	/* Link status is latched, so if we read a 1, nothing has changed. */
	if ((bmsr & BMSR_LINK) && (bmsr & BMSR_ACOMP) &&
		(mii->mii_media_status & IFM_ACTIVE))
		return;

So, of course, it never takes the early return. When I remove the first
assignment it seems to work. In this case I get a mean time for
xl_status_update of 205usec which is ok I suppose.

To be correct shouldn't the if() test for
		(mii->mii_media_status & IFM_AVALID) &&
		(mii->mii_media_status & IFM_ACTIVE))

harti
-- 
harti brandt,
http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private
brandt at fokus.fraunhofer.de, harti at freebsd.org


More information about the freebsd-hackers mailing list