From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18582 invoked by alias); 26 Jul 2005 16:42:37 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 18562 invoked by uid 22791); 26 Jul 2005 16:42:31 -0000 Received: from cipher.hypercom.com (HELO thing2.hypercom.com) (208.248.82.254) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 26 Jul 2005 16:42:31 +0000 Received: from Azphxn01.hypercom.com (azphxn01.hypercom.com [10.0.2.70]) by thing2.hypercom.com (8.12.11/8.12.11) with ESMTP id j6QGgKbb007503; Tue, 26 Jul 2005 09:42:25 -0700 (MST) In-Reply-To: <42E6277C.3020800@carallon.com> To: will_wagner@carallon.com Cc: ecos-discuss@ecos.sourceware.org Message-ID: From: Steve Strublic Date: Tue, 26 Jul 2005 16:42:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Subject: Re: [ECOS] link loss/detection at runtime X-SW-Source: 2005-07/txt/msg00282.txt.bz2 We had a similar issue at my company. We ended up hooking FEC_ETH_PHY_INT, writing an ISR/DSR combination, and running a thread to allow calls to phy_read(). In the thread, we read the contents of the link status register when notified by the DSR that the status has changed. This also allowed us to have multiple notifiers execute upon link status change. Something like: phy_ok = phy_read(PHY_BMSR2, FEC_ETH_PHY, &mii_reg17); if (mii_reg17 & PHY_BMSR2_LINK) link_up_status=true; else link_up_status=false; (pfn_proc_link_status)(link_up_status) ; There may be (probably is) an easier solution, but this one worked for us. HTH, Steve -------- "A chicken doesn't stop scratching just because the worms are scarce." - Grandma Soderquist's Conclusion will_wagner@carallon.com Sent by: ecos-discuss-owner@ecos.sou To rceware.org ecos-discuss@ecos.sourceware.org cc 07/26/2005 05:07 AM Subject [ECOS] link loss/detection at runtime Hi All, Are there any examples of ethernet drivers that cope with link loss/detection after the drivers have been initialised? I am using an MPC860 with AMD PHY. I have hunted through the source but can't find any examples of this. If not can anyone point me to what needs to be done in the bsd stack to bring an interface up/down following a change in link status. Thanks, Will -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss