From owner-freebsd-current@FreeBSD.ORG Mon Sep 14 17:39:01 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC09A1065670; Mon, 14 Sep 2009 17:39:01 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id 648EC8FC16; Mon, 14 Sep 2009 17:39:01 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 3so932636qwe.7 for ; Mon, 14 Sep 2009 10:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=0m76GwddLPnAXHEYFouLbcDq8yla5rs7xUcYnFIOSmM=; b=iEGLWZ3QmS0eYXOU4/Jjv9P131IH4cbfWspYv/7A7cZEanI9LRisSDjNBfKulR7wyI JbMNH/yc4FnmlCVauy6Qt91H86W4oEgMCaBKBLiIOUdAOsYsSevm3e5zSD5b7xjuwvOP GFAHbQdfBKSb7nFwxFUmtUaI2ZJljedQqCbcQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; b=EGdPB/60+jFNzNvSZcgliAGdHZ3JaDPxYzZVz5KY2aBkOGHcd6QC7CHNfa2n+shYih ZDDRvZpHCtDEzNdIK69wl2EVncRL0zar1g8QfeGcx8xnel1dfc5OtKrRU1Xx70kU6R7Q ca9a1YHaz7Ye52qhXymK+17enL8coe73Nhuds= Received: by 10.224.32.7 with SMTP id a7mr5411723qad.308.1252949938917; Mon, 14 Sep 2009 10:38:58 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 7sm138149qwb.40.2009.09.14.10.38.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 14 Sep 2009 10:38:58 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 14 Sep 2009 10:38:05 -0700 From: Pyun YongHyeon Date: Mon, 14 Sep 2009 10:38:05 -0700 To: Sergey Vinogradov Message-ID: <20090914173805.GB1155@michelle.cdnetworks.com> References: <4AA65ABE.4000207@lazybytes.org> <4AA668E0.1010305@FreeBSD.org> <4AA6ACF1.3040501@lazybytes.org> <20090908204520.GC1520@michelle.cdnetworks.com> <20090913202710.21762fa7@lazybytes.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20090913202710.21762fa7@lazybytes.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org, Alex Dupre Subject: Re: alc(4) link handling [was: Re: ath(4) Atheros AR9285 support] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Sep 2009 17:39:01 -0000 --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sun, Sep 13, 2009 at 08:27:10PM +0400, Sergey Vinogradov wrote: > В Tue, 8 Sep 2009 13:45:20 -0700 > Pyun YongHyeon пишет: > > [snip] > > > Would you give more details on this? Showing me demsg(8) output > > related with alc(4) and atphy(4) would be good help. > > When I tried AR8132 sample board it had no such problems on my box. > > AR8132 uses F1 PHY even if it support only 10/100Mbps link so this > > might cause problems on your box, I guess. Does your link partner > > support only 10/100Mbps? > > Sorry for the delay. Well, the 10/100 seems to be working, I've used > bad patch cord previous time. But gigabit link doesn't go up (at least It's quite normal because your controller *is* fast ethernet. You can't establish a gigabit link. > in auto-negotiate mode, I'll try to set modes manually when I'll get Hmm, AR8132 uses F1 gigabit PHY but Atheros changed its internal circuit such that it operates as 10/100 PHY. I guess it's more appropriate to disable advertisement of 1000baseT capability for AR8132 case. Would you try attached patch? In "ifconfig -m alc0" output you should not see 1000baseT capability. > to gigabit hardware again). Here is the 'pciconf -lv' outtake: > > alc0@pci0:1:0:0: class=0x020000 card=0x838a1043 chip=0x10621969 rev=0xc0 hdr=0x00 > vendor = 'Attansic (Now owned by Atheros)' > class = network > subclass = ethernet > > And the 'dmesg | egrep (alc|atphy)' with verbose boot on: > > alc0: port 0xec00-0xec7f mem > 0xf7fc0000-0xf7ffffff irq 19 at device 0.0 on pci1 alc0: Reserved > 0x40000 bytes for rid 0x10 type 3 at 0xf7fc0000 alc0: Read request > size : 512 bytes. alc0: TLP payload size : 128 bytes. > alc0: RCB 64 bytes > alc0: ASPM L1 enabled > alc0: PCI device revision : 0x00c0 > alc0: Chip id/revision : 0xc002 > alc0: 15872 Tx FIFO, 15360 Rx FIFO > alc0: MSIX count : 0 > alc0: MSI count : 1 > alc0: attempting to allocate 1 MSI vectors (1 supported) > alc0: using IRQ 256 for MSI > alc0: Using 1 MSI message(s). > miibus0: on alc0 > atphy0: PHY 0 on miibus0 > atphy0: OUI 0x001374, model 0x0001, rev. 11 > atphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, > auto alc0: bpf attached > alc0: Ethernet address: 00:26:18:a1:f0:d0 > alc0: [MPSAFE] > alc0: [FILTER] > I don't see any problems from output above. > -- > wbr, > Boo --oyUTqETQ0mS9luUI Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="alc.phy.patch" Index: if_alc.c =================================================================== --- if_alc.c (revision 197173) +++ if_alc.c (working copy) @@ -234,6 +234,16 @@ if (phy != sc->alc_phyaddr) return (0); + /* + * For AR8132 fast ethernet controller, do not report 1000baseT + * capability to mii(4). Even though AR8132 uses the same + * model/revision number of F1 gigabit PHY, the PHY has no + * ability to establish 1000baseT link. + */ + if ((sc->alc_flags & ALC_FLAG_FASTETHER) != 0 && + reg == MII_EXTSR) + return (0); + CSR_WRITE_4(sc, ALC_MDIO, MDIO_OP_EXECUTE | MDIO_OP_READ | MDIO_SUP_PREAMBLE | MDIO_CLK_25_4 | MDIO_REG_ADDR(reg)); for (i = ALC_PHY_TIMEOUT; i > 0; i--) { --oyUTqETQ0mS9luUI--