Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Aug 2013 14:13:19 +0100 (BST)
From:      Pham Viet Ha <hapvbk@yahoo.co.uk>
To:        Luiz Otavio O Souza <lists.br@gmail.com>
Cc:        freebsd-embedded <freebsd-embedded@freebsd.org>
Subject:   Re: Arge1 link status is not updated
Message-ID:  <1377349999.56818.YahooMailNeo@web171203.mail.ir2.yahoo.com>
In-Reply-To: <CAB=2f8zYj2RtN7Cqi8785ySnwHHdHuRdOrEyha7OeSJxTNyy1A@mail.gmail.com>
References:  <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com> <CAB=2f8zYj2RtN7Cqi8785ySnwHHdHuRdOrEyha7OeSJxTNyy1A@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

Hi Louiz,

Yes, the LAN ports are on arge0 with 4 PHY ports (0-3). The WAN port is on arge1 with PHY4. This is an AG300H board from Buffalo.

At this time I am using phymask 0x0f for arge0. It looks like that we should use phymask 0x00 for this interface as when the etherswitch/arswitch is enabled, it will attach and manage the 4 LAN ports correctly. 

If I need to update the arge1 link status from inside the switch driver, what should I do? 

Also, the ifnet interfaces are also created during the switch init. How can I make these interfaces available for infconfig command? 


Thanks so much. 


Viet-Ha 


________________________________
 From: Luiz Otavio O Souza <lists.br@gmail.com>
To: Pham Viet Ha <hapvbk@yahoo.co.uk> 
Cc: freebsd-embedded <freebsd-embedded@freebsd.org> 
Sent: Friday, 23 August 2013, 21:06
Subject: Re: Arge1 link status is not updated
 


On 23 August 2013 17:28, Pham Viet Ha <hapvbk@yahoo.co.uk> 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: <Atheros AR71xx built-in ethernet interface, MDIO controller> at mem 0x19000000-0x19000fff on nexus0
>mdio0: <MDIO> on argemdio0
>mdioproxy0: <MII/MDIO proxy, MDIO side> on mdio0
>arge0: <Atheros AR71xx built-in ethernet interface> 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: <MII bus> on arge0
>ukphy0: <Generic IEEE 802.3u media interface> PHY 0 on miibus0
>ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
>ukphy1: <Generic IEEE 802.3u media interface> PHY 1 on miibus0
>ukphy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
>ukphy2: <Generic IEEE 802.3u media interface> PHY 2 on miibus0
>ukphy2:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
>ukphy3: <Generic IEEE 802.3u media interface> 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: <Atheros AR71xx built-in ethernet interface> 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 
From owner-freebsd-embedded@FreeBSD.ORG  Sat Aug 24 13:15:25 2013
Return-Path: <owner-freebsd-embedded@FreeBSD.ORG>
Delivered-To: freebsd-embedded@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTP id 72E6BCF7
 for <freebsd-embedded@freebsd.org>; Sat, 24 Aug 2013 13:15:25 +0000 (UTC)
 (envelope-from hapvbk@yahoo.co.uk)
Received: from nm3-vm0.bullet.mail.ird.yahoo.com
 (nm3-vm0.bullet.mail.ird.yahoo.com [77.238.189.213])
 by mx1.freebsd.org (Postfix) with SMTP id 62AF12DE7
 for <freebsd-embedded@freebsd.org>; Sat, 24 Aug 2013 13:15:23 +0000 (UTC)
Received: from [77.238.189.50] by nm3.bullet.mail.ird.yahoo.com with NNFMP;
 24 Aug 2013 13:15:16 -0000
Received: from [212.82.109.129] by tm3.bullet.mail.ird.yahoo.com with NNFMP;
 24 Aug 2013 13:15:16 -0000
Received: from [127.0.0.1] by omp1036.mail.ird.yahoo.com with NNFMP;
 24 Aug 2013 13:15:16 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 832572.19729.bm@omp1036.mail.ird.yahoo.com
Received: (qmail 46861 invoked by uid 60001); 24 Aug 2013 13:15:16 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024;
 t77350116; bh=VyF5qAkwJ28nz25Z8ljVI9w02yJfgYlnMeqZbnh9ywQ=;
 h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type;
 b=brAieOXFpgN7VYIA1me3k4ApZ3noPClF8NS85MZPhWy1Wr8yrgA6O0nVqJeBjNRiET9vKjdbSVZJFB/37aBuUTv9QQgMVVeBBwTH/t/0+8MVUCuHV8gd1g71e1MY79Nikjytbt3GOPIO/p5aggMF3URO9X3IX3mgA1dl4qV4NdQDomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk;
 h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type;
 b=T05aToQNqjxruFqkh7UudGL9f9t4tNdYdyu/qZy/vObMTGW100ycPHZ89NfcRtlr3xPWO5/QL8OlPeovIze+m5Q7CcU/iSFQtB3bbRqmAAe7fR0+li9mK0UFTq4WKJoevCJYrUcLL3/k25i/PW4qmaQIxJOgFO+VaN6V3RTiqTM=;
X-YMail-OSG: v6DGSOIVM1nq5C96EaOLGik4c2Af3uxfFh6cQ0B8UDKWUTk
 WQex9.v1tiwo.zJWlSNMZFYJFqcAeFbhTo6pvn_4svNZSEBUg9qy9IFY_fej
 _Ln1AM8WIKzfvIXcGTql4BT34GShLGBeDeHX.UDhji0XQaH0R18c7oe46KX6
 U9maSfa7_sibtnEu0JQPIDG_Wutt4QaROPvpWgBe8q4vZhV1mfjjNm2oqnqc
 ck4hBvWz4eBcfj4xZA3pDucKSz26ZjfhRmhersiYHom.P80nLOnK18VOJeFm
 0BYAfVoGQ1DOK5xsrLaE_OHLv8UO5IEEd._uSiIuRyNcYBa8hga9XtP8cglL
 GjVXxUeQLOxVp04.GJq1m3va.AlTgGAIGVLMsM3h1MiiZtqmaNdf0tI8U4zJ
 Ya3OUshIFfvKsP7Ss_6TqhUuvh6F6J6_nkDjoB3rAS2GfszhyBJyg4QwKN2r
 HbSuVJpA32y7s2TnOCg_m_S8JcWkHCdDTUG0Y5gY8LR3aGF2fThpzHk.dcDu
 mwatuwY0ERe7ZOM60T1t4zDyhkfkGKWW9cXVaT6O1QEDT7SnoXiJATsbbl7J
 TigDMBdh4bMxE
Received: from [99.230.158.140] by web171206.mail.ir2.yahoo.com via HTTP;
 Sat, 24 Aug 2013 14:15:16 BST
X-Rocket-MIMEInfo: 002.001,
 SGkgQWRyaWFuLAoKVGhhbmtzIGZvciB0aGUgcXVpY2sgYW5zd2VyLsKgCgpBcmUgeW91IHRhbGtpbmcgYWJvdXQgdGhlIFdBTiBwb3J0PyBPbiBteSBkZXZpY2UsIGFyZ2UxIGNvbm5lY3RzIHRvIFdBTiBwb3J0IGFuZCBhcmdlMCBjb25uZWN0IHRvIHRoZSBMQU4gcG9ydHMuwqAKCgpWaWV0LUhhwqAKClAvUzogSSByZXNlbnQgdGhpcyBlbWFpbCBzaW5jZSB0aGUgbGFzdCB0aW1lIEkgc2VudCBpdCB0byBBZHJpYW4gd2l0aG91dCBzZW5kaW5nIHRvIHRoZSBsaXN0IChJIGRpZCBub3QgaGl0IFJlcGx5IEFsbCkBMAEBAQE-
X-Mailer: YahooMailWebService/0.8.155.576
References: <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com>
 <CAJ-Vmok8j_CMtyZm4WK3DrV6Ju1X9AwVhf3MrL09vAzwuB5Ayw@mail.gmail.com>
Message-ID: <1377350116.46286.YahooMailNeo@web171206.mail.ir2.yahoo.com>
Date: Sat, 24 Aug 2013 14:15:16 +0100 (BST)
From: Pham Viet Ha <hapvbk@yahoo.co.uk>
Subject: Re: Arge1 link status is not updated
To: Adrian Chadd <adrian@freebsd.org>
In-Reply-To: <CAJ-Vmok8j_CMtyZm4WK3DrV6Ju1X9AwVhf3MrL09vAzwuB5Ayw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
Cc: freebsd-embedded <freebsd-embedded@freebsd.org>
X-BeenThere: freebsd-embedded@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: Pham Viet Ha <hapvbk@yahoo.co.uk>
List-Id: Dedicated and Embedded Systems <freebsd-embedded.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-embedded>,
 <mailto:freebsd-embedded-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-embedded>;
List-Post: <mailto:freebsd-embedded@freebsd.org>
List-Help: <mailto:freebsd-embedded-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-embedded>,
 <mailto:freebsd-embedded-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 24 Aug 2013 13:15:25 -0000

Hi Adrian,

Thanks for the quick answer. 

Are you talking about the WAN port? On my device, arge1 connects to WAN port and arge0 connect to the LAN ports. 


Viet-Ha 

P/S: I resent this email since the last time I sent it to Adrian without sending to the list (I did not hit Reply All). 


________________________________
 From: Adrian Chadd <adrian@freebsd.org>
To: Pham Viet Ha <hapvbk@yahoo.co.uk> 
Cc: freebsd-embedded <freebsd-embedded@freebsd.org> 
Sent: Friday, 23 August 2013, 17:21
Subject: Re: Arge1 link status is not updated
 


The second port doesn't have a link status per se. It's connected to the AR8316 switch PHY.

Use etherswitchcfg to see the link status of the child switch ports.



-adrian




On 23 August 2013 13:28, Pham Viet Ha <hapvbk@yahoo.co.uk> 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: <Atheros AR71xx built-in ethernet interface, MDIO controller> at mem 0x19000000-0x19000fff on nexus0
>mdio0: <MDIO> on argemdio0
>mdioproxy0: <MII/MDIO proxy, MDIO side> on mdio0
>arge0: <Atheros AR71xx built-in ethernet interface> 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: <MII bus> on arge0
>ukphy0: <Generic IEEE 802.3u media interface> PHY 0 on miibus0
>ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
>ukphy1: <Generic IEEE 802.3u media interface> PHY 1 on miibus0
>ukphy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
>ukphy2: <Generic IEEE 802.3u media interface> PHY 2 on miibus0
>ukphy2:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
>ukphy3: <Generic IEEE 802.3u media interface> 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: <Atheros AR71xx built-in ethernet interface> 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
>
>
>Thank you so much.
>
>Viet-Ha Pham
>_______________________________________________
>freebsd-embedded@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-embedded
>To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.org"
>

help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1377349999.56818.YahooMailNeo>