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>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Louiz,=0A=0AYes, 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.=0A=0A=
At this time I am using phymask 0x0f for arge0. It looks like that we shoul=
d use phymask 0x00 for this interface as when the etherswitch/arswitch is e=
nabled, it will attach and manage the 4 LAN ports correctly.=A0=0A=0AIf I n=
eed to update the arge1 link status from inside the switch driver, what sho=
uld I do?=A0=0A=0AAlso, the ifnet interfaces are also created during the sw=
itch init. How can I make these interfaces available for infconfig command?=
=A0=0A=0A=0AThanks so much.=A0=0A=0A=0AViet-Ha=A0=0A=0A=0A_________________=
_______________=0A From: Luiz Otavio O Souza <lists.br@gmail.com>=0ATo: Pha=
m Viet Ha <hapvbk@yahoo.co.uk> =0ACc: freebsd-embedded <freebsd-embedded@fr=
eebsd.org> =0ASent: Friday, 23 August 2013, 21:06=0ASubject: Re: Arge1 link=
 status is not updated=0A =0A=0A=0AOn 23 August 2013 17:28, Pham Viet Ha <h=
apvbk@yahoo.co.uk> wrote:=0A=0AHi there,=0A>=0A>I am running nanobsd on a M=
IPS platform, which is an AR7161 CPU with AR8316 switch. Both arge interfac=
es show up however the link status is not correctly updated.=A0=0A>=0A>arge=
1 (the WAN interface) always show active, even there is no ethernet cable p=
lugged in.=A0=0A>=0A>In a post, Adrian mentioned this (http://lists.freebsd=
.org/pipermail/freebsd-embedded/2013-July/001871.html):=0A>=0A>Then arge1 i=
s glued to this "WAN" PHY. It's not owned by arswitch (but=0A>it could be!)=
 as then arge1 couldn't link to it to get notifications=0A>about link, spee=
d/duplex changes.=0A>=0A>My question is how can we make arge1 update its li=
nk status (no carrier/active) when the link is disconnected/connected?=A0=
=0A>=0A>Should it be in arge driver or in the switch driver?=A0=0A>=0A>At t=
his time I compiled and load the switch in a separated module.=A0=0A>=0A>=
=0A>The log from boot:=A0=0A>argemdio0: <Atheros AR71xx built-in ethernet i=
nterface, MDIO controller> at mem 0x19000000-0x19000fff on nexus0=0A>mdio0:=
 <MDIO> on argemdio0=0A>mdioproxy0: <MII/MDIO proxy, MDIO side> on mdio0=0A=
>arge0: <Atheros AR71xx built-in ethernet interface> at mem 0x19000000-0x19=
000fff irq 2 on nexus0=0A>arge0: Overriding MAC from EEPROM=0A>arge0: arge_=
attach: overriding MII mode to 'RGMII'=0A>arge0: sc->arge_mac_unit 0 phymas=
k 15=0A>arge0: finishing attachment, phymask 000f, proxy null=0A>miibus0: <=
MII bus> on arge0=0A>ukphy0: <Generic IEEE 802.3u media interface> PHY 0 on=
 miibus0=0A>ukphy0: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX=
, 1000baseT-FDX, 1000baseT-FDX-master, auto=0A>ukphy1: <Generic IEEE 802.3u=
 media interface> PHY 1 on miibus0=0A>ukphy1: =A0none, 10baseT, 10baseT-FDX=
, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto=0A>uk=
phy2: <Generic IEEE 802.3u media interface> PHY 2 on miibus0=0A>ukphy2: =A0=
none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000ba=
seT-FDX-master, auto=0A>ukphy3: <Generic IEEE 802.3u media interface> PHY 3=
 on miibus0=0A>ukphy3: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-=
FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto=0A>arge0: Ethernet address: =
00:03:7f:12:20:00=0A>arge1: <Atheros AR71xx built-in ethernet interface> at=
 mem 0x1a000000-0x1a000fff irq 3 on nexus0=0A>arge1: arge_attach: overridin=
g MII mode to 'RGMII'=0A>arge1: sc->arge_mac_unit 1 phymask 16=0A>arge1: fi=
nishing attachment, phymask 0010, proxy null=0A>arge1: No PHY, use hard-cod=
ed values: arge_multiphy_mediachange, arge_multiphy_mediastatus.=0A>arge1: =
Ethernet address: 00:03:7f:12:20:01=0A>=0A=0ALooks like your setup is somew=
hat different or misconfigured because you have 4 PHYs on arge0 (which is n=
ot common).=0A=0ACan you share your board model and you setup ? We maybe ab=
le to help you get it right.=0A=0ARegards,=0ALuiz=A0
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;
 t=1377350116; 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/p5aggMF3URO9X3IX3mgA1dl4qV4NdQ=
DomainKey-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,=0A=0AThanks for the quick answer.=A0=0A=0AAre you talking about =
the WAN port? On my device, arge1 connects to WAN port and arge0 connect to=
 the LAN ports.=A0=0A=0A=0AViet-Ha=A0=0A=0AP/S: I resent this email since t=
he last time I sent it to Adrian without sending to the list (I did not hit=
 Reply All).=A0=0A=0A=0A________________________________=0A From: Adrian Ch=
add <adrian@freebsd.org>=0ATo: Pham Viet Ha <hapvbk@yahoo.co.uk> =0ACc: fre=
ebsd-embedded <freebsd-embedded@freebsd.org> =0ASent: Friday, 23 August 201=
3, 17:21=0ASubject: Re: Arge1 link status is not updated=0A =0A=0A=0AThe se=
cond port doesn't have a link status per se. It's connected to the AR8316 s=
witch PHY.=0A=0AUse etherswitchcfg to see the link status of the child swit=
ch ports.=0A=0A=0A=0A-adrian=0A=0A=0A=0A=0AOn 23 August 2013 13:28, Pham Vi=
et Ha <hapvbk@yahoo.co.uk> wrote:=0A=0AHi there,=0A>=0A>I am running nanobs=
d 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.=A0=0A>=
=0A>arge1 (the WAN interface) always show active, even there is no ethernet=
 cable plugged in.=A0=0A>=0A>In a post, Adrian mentioned this (http://lists=
.freebsd.org/pipermail/freebsd-embedded/2013-July/001871.html):=0A>=0A>Then=
 arge1 is glued to this "WAN" PHY. It's not owned by arswitch (but=0A>it co=
uld be!) as then arge1 couldn't link to it to get notifications=0A>about li=
nk, speed/duplex changes.=0A>=0A>My question is how can we make arge1 updat=
e its link status (no carrier/active) when the link is disconnected/connect=
ed?=A0=0A>=0A>Should it be in arge driver or in the switch driver?=A0=0A>=
=0A>At this time I compiled and load the switch in a separated module.=A0=
=0A>=0A>=0A>The log from boot:=A0=0A>argemdio0: <Atheros AR71xx built-in et=
hernet interface, MDIO controller> at mem 0x19000000-0x19000fff on nexus0=
=0A>mdio0: <MDIO> on argemdio0=0A>mdioproxy0: <MII/MDIO proxy, MDIO side> o=
n mdio0=0A>arge0: <Atheros AR71xx built-in ethernet interface> at mem 0x190=
00000-0x19000fff irq 2 on nexus0=0A>arge0: Overriding MAC from EEPROM=0A>ar=
ge0: arge_attach: overriding MII mode to 'RGMII'=0A>arge0: sc->arge_mac_uni=
t 0 phymask 15=0A>arge0: finishing attachment, phymask 000f, proxy null=0A>=
miibus0: <MII bus> on arge0=0A>ukphy0: <Generic IEEE 802.3u media interface=
> PHY 0 on miibus0=0A>ukphy0: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100=
baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto=0A>ukphy1: <Generic I=
EEE 802.3u media interface> PHY 1 on miibus0=0A>ukphy1: =A0none, 10baseT, 1=
0baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, =
auto=0A>ukphy2: <Generic IEEE 802.3u media interface> PHY 2 on miibus0=0A>u=
kphy2: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-F=
DX, 1000baseT-FDX-master, auto=0A>ukphy3: <Generic IEEE 802.3u media interf=
ace> PHY 3 on miibus0=0A>ukphy3: =A0none, 10baseT, 10baseT-FDX, 100baseTX, =
100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto=0A>arge0: Ethernet=
 address: 00:03:7f:12:20:00=0A>arge1: <Atheros AR71xx built-in ethernet int=
erface> at mem 0x1a000000-0x1a000fff irq 3 on nexus0=0A>arge1: arge_attach:=
 overriding MII mode to 'RGMII'=0A>arge1: sc->arge_mac_unit 1 phymask 16=0A=
>arge1: finishing attachment, phymask 0010, proxy null=0A>arge1: No PHY, us=
e hard-coded values: arge_multiphy_mediachange, arge_multiphy_mediastatus.=
=0A>arge1: Ethernet address: 00:03:7f:12:20:01=0A>=0A>=0A>Thank you so much=
.=0A>=0A>Viet-Ha Pham=0A>_______________________________________________=0A=
>freebsd-embedded@freebsd.org mailing list=0A>http://lists.freebsd.org/mail=
man/listinfo/freebsd-embedded=0A>To unsubscribe, send any mail to "freebsd-=
embedded-unsubscribe@freebsd.org"=0A>


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