Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030308AbVIISIg (ORCPT ); Fri, 9 Sep 2005 14:08:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030309AbVIISIg (ORCPT ); Fri, 9 Sep 2005 14:08:36 -0400 Received: from az33egw01.freescale.net ([192.88.158.102]:29362 "EHLO az33egw01.freescale.net") by vger.kernel.org with ESMTP id S1030308AbVIISIf (ORCPT ); Fri, 9 Sep 2005 14:08:35 -0400 In-Reply-To: References: <200509080125.j881PcL9015847@hera.kernel.org> <431F9899.4060602@pobox.com> <1126184700.4805.32.camel@tsc-6.cph.tpack.net> <1126190554.4805.68.camel@tsc-6.cph.tpack.net> <62AA8EFA-7D65-4E87-B71F-55A07321011E@freescale.com> Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <3D0A0EB3-0C82-4C58-8FE1-11DC9803E4A7@freescale.com> Cc: Linux Kernel Mailing List , Netdev Content-Transfer-Encoding: 7bit From: Andy Fleming Subject: Re: [PATCH] 3c59x: read current link status from phy Date: Fri, 9 Sep 2005 13:08:24 -0500 To: Bogdan Costescu X-Mailer: Apple Mail (2.734) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1330 Lines: 34 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/