From owner-freebsd-embedded@FreeBSD.ORG Sat Aug 24 13:13:28 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 A493AC98 for ; Sat, 24 Aug 2013 13:13:28 +0000 (UTC) (envelope-from hapvbk@yahoo.co.uk) Received: from nm12-vm0.bullet.mail.ird.yahoo.com (nm12-vm0.bullet.mail.ird.yahoo.com [77.238.189.196]) by mx1.freebsd.org (Postfix) with SMTP id AC0382DD9 for ; Sat, 24 Aug 2013 13:13:26 +0000 (UTC) Received: from [77.238.189.238] by nm12.bullet.mail.ird.yahoo.com with NNFMP; 24 Aug 2013 13:13:19 -0000 Received: from [212.82.98.105] by tm19.bullet.mail.ird.yahoo.com with NNFMP; 24 Aug 2013 13:13:19 -0000 Received: from [127.0.0.1] by omp1042.mail.ir2.yahoo.com with NNFMP; 24 Aug 2013 13:13:19 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 857537.10076.bm@omp1042.mail.ir2.yahoo.com Received: (qmail 57909 invoked by uid 60001); 24 Aug 2013 13:13:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1377349999; bh=gapNejoKg6zwu+cWtp7lFw7i8nnCuhfetLxxj+3YDOc=; 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=KrhmV1IooFOwgJAfqCkCy2gcPmRPVy5uaxYWTqzQrBkEPHBZmo7Sh4l+AJ5GxI8/sBegT1GIIlHEur9YR3i7OP1vhGhYxspoI3vdpGvbBX052WOIVjowVUoejeabmlhzwdHUvjIJpjERK9x4CaozK+MNn2yn36sOJaKTP7npHdI= 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=nH9DXayHvrpSW/VOn9GNu93y96DxUJ72ZBeBSct9SktK7m1Nfkdpx4ZH4fmc4PNe+ZUl7a50rbwj0DT0MA8u2y8aq1gcTA/PTvKsrF5lIeE2rMSU4LMl3+CgqhbEEG7yqjbstPkGKtdMWSjdF7sRd+LklBnJsiVMK/S1d3+x7bA=; X-YMail-OSG: 5PDZDRIVM1kJuOuksrUJiQTBv0Pyp2hYzYZJg8cM70CHx5B ifBKoSGyB6qjbGJ9gUZMoAXMhQkJV_sw7P1q7_UN56sy4CyI9ONFSyKaKZLf byLZq_TGnFu_KBw2JhZmnsMdX2f3Kuh6Y30ZTIMKAfCG7yoK5uviTsJQtiPh YgnZCcQWwYETQ7QHRSi1JPQU8eYMZa5tjv7dsgxKX52R9egA86i3kR_j.xfg CwdKBnAW1lTqAo.JXGjYFaMUVtiKDPjUId5gUm_xpnIcK9o0VgeQ3rA38ZM3 TPx3gyZ5uGLBAaVMxfiE2aAGVQHSd3Ay78ryq1dKy_vw05nht_7YVJXYO4dz acsffcxmeZkS6.9Jwk4kTMV7hEK.gnAnbrQ7aaGQb5bJ1aw5tioteYE2D5iv rPO1oEuCDvtAXfFpUTn__nwS1Fv24AXgIS9aQ6VWlhXQjP4f4ankMjcwfsvJ VooJwqHdkCZnW7oDOA_hNjLpLvnI_t27IdRSbt2WZmPz8vX4CrsiAFrMAX5g hnrc_NOJCL6QuYvkbfyCoiJdCUT.XBbmOMsFYTaAOPRqpS2K6TAYxRz3bQGv 3iXRaquhVWA-- Received: from [99.230.158.140] by web171203.mail.ir2.yahoo.com via HTTP; Sat, 24 Aug 2013 14:13:19 BST X-Rocket-MIMEInfo: 002.001, SGkgTG91aXosCgpZZXMsIHRoZSBMQU4gcG9ydHMgYXJlIG9uIGFyZ2UwIHdpdGggNCBQSFkgcG9ydHMgKDAtMykuIFRoZSBXQU4gcG9ydCBpcyBvbiBhcmdlMSB3aXRoIFBIWTQuIFRoaXMgaXMgYW4gQUczMDBIIGJvYXJkIGZyb20gQnVmZmFsby4KCkF0IHRoaXMgdGltZSBJIGFtIHVzaW5nIHBoeW1hc2sgMHgwZiBmb3IgYXJnZTAuIEl0IGxvb2tzIGxpa2UgdGhhdCB3ZSBzaG91bGQgdXNlIHBoeW1hc2sgMHgwMCBmb3IgdGhpcyBpbnRlcmZhY2UgYXMgd2hlbiB0aGUgZXRoZXJzd2l0Y2gvYXJzd2l0Y2ggaXMBMAEBAQE- X-Mailer: YahooMailWebService/0.8.155.576 References: <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com> Message-ID: <1377349999.56818.YahooMailNeo@web171203.mail.ir2.yahoo.com> Date: Sat, 24 Aug 2013 14:13:19 +0100 (BST) From: Pham Viet Ha Subject: Re: Arge1 link status is not updated To: Luiz Otavio O Souza In-Reply-To: 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 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Pham Viet Ha List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Aug 2013 13:13:28 -0000 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 =0ATo: Pha= m Viet Ha =0ACc: freebsd-embedded =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 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: at mem 0x19000000-0x19000fff on nexus0=0A>mdio0:= on argemdio0=0A>mdioproxy0: on mdio0=0A= >arge0: 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: PHY 0 on= miibus0=0A>ukphy0: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX= , 1000baseT-FDX, 1000baseT-FDX-master, auto=0A>ukphy1: PHY 1 on miibus0=0A>ukphy1: =A0none, 10baseT, 10baseT-FDX= , 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto=0A>uk= phy2: PHY 2 on miibus0=0A>ukphy2: =A0= none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000ba= seT-FDX-master, auto=0A>ukphy3: 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: 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: 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 ; 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 ; 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> Message-ID: <1377350116.46286.YahooMailNeo@web171206.mail.ir2.yahoo.com> Date: Sat, 24 Aug 2013 14:15:16 +0100 (BST) From: Pham Viet Ha Subject: Re: Arge1 link status is not updated To: Adrian Chadd In-Reply-To: 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 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Pham Viet Ha List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 =0ATo: Pham Viet Ha =0ACc: fre= ebsd-embedded =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 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: at mem 0x19000000-0x19000fff on nexus0= =0A>mdio0: on argemdio0=0A>mdioproxy0: o= n mdio0=0A>arge0: 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: on arge0=0A>ukphy0: PHY 0 on miibus0=0A>ukphy0: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100= baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto=0A>ukphy1: PHY 1 on miibus0=0A>ukphy1: =A0none, 10baseT, 1= 0baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, = auto=0A>ukphy2: PHY 2 on miibus0=0A>u= kphy2: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-F= DX, 1000baseT-FDX-master, auto=0A>ukphy3: 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: 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>