From owner-freebsd-current@FreeBSD.ORG Thu Oct 8 10:38:58 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB7551065676 for ; Thu, 8 Oct 2009 10:38:58 +0000 (UTC) (envelope-from ianf@clue.co.za) Received: from inbound01.jnb1.gp-online.net (inbound01.jnb1.gp-online.net [41.161.16.135]) by mx1.freebsd.org (Postfix) with ESMTP id F11DB8FC13 for ; Thu, 8 Oct 2009 10:38:57 +0000 (UTC) Received: from [41.154.0.10] (helo=clue.co.za) by inbound01.jnb1.gp-online.net with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1MvqOc-000477-GN; Thu, 08 Oct 2009 12:38:54 +0200 Received: from localhost ([127.0.0.1] helo=clue.co.za) by clue.co.za with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1MvqOT-0000Oo-7F; Thu, 08 Oct 2009 12:38:45 +0200 To: pyunyh@gmail.com From: Ian FREISLICH In-Reply-To: <20091007180257.GA3843@michelle.cdnetworks.com> References: <20091007180257.GA3843@michelle.cdnetworks.com> X-Attribution: BOFH Date: Thu, 08 Oct 2009 12:38:45 +0200 Message-Id: Cc: current@freebsd.org Subject: Re: alc(4) link autoselect problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2009 10:38:58 -0000 Pyun YongHyeon wrote: > The atphy(4) recognizes PHY as F1 gigabit PHY because AR8132 uses > the same PHY id of F1 gigabit PHY. There is no way to know whether > it really has F1 gigabit PHY in driver's view. > > > If I set the media to 100BaseTX full-duplex it works. > > If link parter used auto-negotiation, this forced media selection > shall make your link partner select half-duplex mode instead of > full-duplex due to the nature of parallel detection. When I do this: [mini] /usr/home/ianf # ifconfig alc0 media 100BaseTX mediaopt full-duplex I get this on the switch: 08-Oct-2009 12:26:42 %STP-W-PORTSTATUS: g14 of instance 0: STP status Forwarding 08-Oct-2009 12:26:42 %STP-W-PORTSTATUS: g14 of instance 1: STP status Forwarding 08-Oct-2009 12:26:42 %STP-W-PORTSTATUS: g14 of instance 2: STP status Forwarding 08-Oct-2009 12:26:42 %LINK-I-Up: g14 wgsw-24010# sh interfaces status ethernet g14 Flow Link Back Mdix Port Type Duplex Speed Neg ctrl State Pressure Mode -------- ------------ ------ ----- -------- ---- ----------- -------- ------- g14 1G-Copper Full 100 Enabled Off Up Disabled Off So, it correctly detects full duplex. The cable tester still reports the cable os open at 2m, probably because it expects all 4 pairs to be terminated. > I couldn't see link establishment issues on AR8132 sample board. > Does link partner also see no link when you use auto-negotiation on > alc(4)? I get no link, not even temporary blips on the link light. When I invoke the cable tester, this is what I see: wgsw-24010# test copper-port tdr g14 .. Cable on port g14 is open at 2 m > Does your link partner support 1000baseT link? Yes, it does. > Can you see blinking LED of AR8132 when link was not established? No. > How about unplugging UTP cable and then replug the cable after > a couple of seconds? Does it make any difference? No difference either. > How about checking MIB statistics of controller? > (sysctl dev.alc.0.stats) This is after a reboot, but the link was up for a short while to do the above testing. rx.good_frames looks a bit high for "up 21 mins". dev.alc.0.stats.rx.good_frames: 3348588249 dev.alc.0.stats.rx.good_bcast_frames: 0 dev.alc.0.stats.rx.good_mcast_frames: 0 dev.alc.0.stats.rx.pause_frames: 0 dev.alc.0.stats.rx.control_frames: 0 dev.alc.0.stats.rx.crc_errs: 0 dev.alc.0.stats.rx.len_errs: 0 dev.alc.0.stats.rx.good_octets: 0 dev.alc.0.stats.rx.good_bcast_octets: 0 dev.alc.0.stats.rx.good_mcast_octets: 0 dev.alc.0.stats.rx.runts: 0 dev.alc.0.stats.rx.fragments: 0 dev.alc.0.stats.rx.frames_64: 13 dev.alc.0.stats.rx.frames_65_127: 5 dev.alc.0.stats.rx.frames_128_255: 181 dev.alc.0.stats.rx.frames_256_511: 2 dev.alc.0.stats.rx.frames_512_1023: 0 dev.alc.0.stats.rx.frames_1024_1518: 0 dev.alc.0.stats.rx.frames_1519_max: 0 dev.alc.0.stats.rx.trunc_errs: 0 dev.alc.0.stats.rx.fifo_oflows: 0 dev.alc.0.stats.rx.rrs_errs: 0 dev.alc.0.stats.rx.align_errs: 0 dev.alc.0.stats.rx.filtered: 201 dev.alc.0.stats.tx.good_frames: 0 dev.alc.0.stats.tx.good_bcast_frames: 0 dev.alc.0.stats.tx.good_mcast_frames: 0 dev.alc.0.stats.tx.pause_frames: 0 dev.alc.0.stats.tx.control_frames: 0 dev.alc.0.stats.tx.excess_defers: 0 dev.alc.0.stats.tx.defers: 0 dev.alc.0.stats.tx.good_octets: 0 dev.alc.0.stats.tx.good_bcast_octets: 0 dev.alc.0.stats.tx.good_mcast_octets: 0 dev.alc.0.stats.tx.frames_64: 0 dev.alc.0.stats.tx.frames_65_127: 0 dev.alc.0.stats.tx.frames_128_255: 0 dev.alc.0.stats.tx.frames_256_511: 0 dev.alc.0.stats.tx.frames_512_1023: 0 dev.alc.0.stats.tx.frames_1024_1518: 0 dev.alc.0.stats.tx.frames_1519_max: 0 dev.alc.0.stats.tx.single_colls: 0 dev.alc.0.stats.tx.multi_colls: 0 dev.alc.0.stats.tx.late_colls: 0 dev.alc.0.stats.tx.excess_colls: 0 dev.alc.0.stats.tx.abort: 0 dev.alc.0.stats.tx.underruns: 0 dev.alc.0.stats.tx.desc_underruns: 0 dev.alc.0.stats.tx.len_errs: 0 dev.alc.0.stats.tx.trunc_errs: 0 dev.alc.0.stats.rx.filtered is not climbing with outo-negotiate enabled. Ian -- Ian Freislich