From owner-freebsd-embedded@FreeBSD.ORG Sat Aug 24 01:06:07 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D57EEF77 for ; Sat, 24 Aug 2013 01:06:07 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: from mail-we0-x22d.google.com (mail-we0-x22d.google.com [IPv6:2a00:1450:400c:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 57ECE208D for ; Sat, 24 Aug 2013 01:06:07 +0000 (UTC) Received: by mail-we0-f173.google.com with SMTP id x54so1125041wes.18 for ; Fri, 23 Aug 2013 18:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fAfRPyNozbEqKGNtjctpwcyPP14YA5h1uy3a0hxg8w4=; b=C83TlHFEj7Pwg1kbxKi9l+tIGnDf8nWVrk4c9DhXasRnCrPF587n4MAf3csv8n+U6O 8haEC4XNZ+Yhpy5WWjgFKYbo8NyASQsxp2K+TEnMuuFcLfZw0Gj05uLcWC9mk+n/ZaNK lItzPl8VZkpa7nfBIl3GqeyqHoOyP4s0AcB74kRNpLY7ie0Rt83aP9WbjD4otbNCSQeO G1LIF3YPBkhNYLRBCD9tFc+b2rj6mithXFPaeNHj/QzbJcspsz6uXcSYfh6QAwMy6aZR Jek8IMsqGNDnVOugVAPLtKljCMsTWALvj2JDv2tNw+3930LWtiI5tt3oBW5Cz7zlV3x3 AM7g== MIME-Version: 1.0 X-Received: by 10.180.77.49 with SMTP id p17mr4028316wiw.36.1377306365682; Fri, 23 Aug 2013 18:06:05 -0700 (PDT) Received: by 10.216.75.140 with HTTP; Fri, 23 Aug 2013 18:06:05 -0700 (PDT) In-Reply-To: <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com> References: <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com> Date: Fri, 23 Aug 2013 22:06:05 -0300 Message-ID: Subject: Re: Arge1 link status is not updated From: Luiz Otavio O Souza To: Pham Viet Ha Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Aug 2013 01:06:07 -0000 On 23 August 2013 17:28, Pham Viet Ha wrote: > Hi there, > > I am running nanobsd on a MIPS platform, which is an AR7161 CPU with > AR8316 switch. Both arge interfaces show up however the link status is not > correctly updated. > > arge1 (the WAN interface) always show active, even there is no ethernet > cable plugged in. > > In a post, Adrian mentioned this ( > http://lists.freebsd.org/pipermail/freebsd-embedded/2013-July/001871.html > ): > > Then arge1 is glued to this "WAN" PHY. It's not owned by arswitch (but > it could be!) as then arge1 couldn't link to it to get notifications > about link, speed/duplex changes. > > My question is how can we make arge1 update its link status (no > carrier/active) when the link is disconnected/connected? > > Should it be in arge driver or in the switch driver? > > At this time I compiled and load the switch in a separated module. > > > The log from boot: > argemdio0: > at mem 0x19000000-0x19000fff on nexus0 > mdio0: on argemdio0 > mdioproxy0: on mdio0 > arge0: at mem > 0x19000000-0x19000fff irq 2 on nexus0 > arge0: Overriding MAC from EEPROM > arge0: arge_attach: overriding MII mode to 'RGMII' > arge0: sc->arge_mac_unit 0 phymask 15 > arge0: finishing attachment, phymask 000f, proxy null > miibus0: on arge0 > ukphy0: PHY 0 on miibus0 > ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto > ukphy1: PHY 1 on miibus0 > ukphy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto > ukphy2: PHY 2 on miibus0 > ukphy2: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto > ukphy3: PHY 3 on miibus0 > ukphy3: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto > arge0: Ethernet address: 00:03:7f:12:20:00 > arge1: at mem > 0x1a000000-0x1a000fff irq 3 on nexus0 > arge1: arge_attach: overriding MII mode to 'RGMII' > arge1: sc->arge_mac_unit 1 phymask 16 > arge1: finishing attachment, phymask 0010, proxy null > arge1: No PHY, use hard-coded values: arge_multiphy_mediachange, > arge_multiphy_mediastatus. > arge1: Ethernet address: 00:03:7f:12:20:01 > Looks like your setup is somewhat different or misconfigured because you have 4 PHYs on arge0 (which is not common). Can you share your board model and you setup ? We maybe able to help you get it right. Regards, Luiz