From owner-freebsd-current@FreeBSD.ORG Mon Oct 6 02:14:12 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73A3CE4E for ; Mon, 6 Oct 2014 02:14:12 +0000 (UTC) Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 452A3B43 for ; Mon, 6 Oct 2014 02:14:12 +0000 (UTC) Received: by mail-pd0-f179.google.com with SMTP id r10so2525240pdi.10 for ; Sun, 05 Oct 2014 19:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=7gelDKX51c/l4YM09Rnx7VeNkTMxEpv+Sq30Nwwp2zA=; b=nX3e7FaiF0jpCM1DcLa8WO1dbHs8FYkedBOPvPstUWbxR7V4zkPG4u0gBvguJDmJig 5xk5ilXM8NgpjUP5yD9vxGC5IDMZ2708XjjdwkhfEldaDdOzPNvZJtPNDndQVC/HLqGn PL8+vvzQ58P1u2E3lYGSoJiwnfGF7Y7hNjEwx/o5ty20GPos0RXtrqrbWU7LaUupGajf TFLTvbSbvwlqQv+hc4AJvfue+uM3SKs+y6jMF+x25cyHD70gzEIVNF5BYTXs0Se3IAFZ NKDx1ELnwpY6Kbfk2O0/EhILAXQoKv/MHZEdxomclihVTAxulmPPc7SVqLStY5JfrDYe IwDQ== X-Received: by 10.68.200.70 with SMTP id jq6mr40060pbc.144.1412561651819; Sun, 05 Oct 2014 19:14:11 -0700 (PDT) Received: from pyunyh@gmail.com ([106.247.248.2]) by mx.google.com with ESMTPSA id ke5sm12011056pad.34.2014.10.05.19.14.08 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 05 Oct 2014 19:14:10 -0700 (PDT) From: Yonghyeon PYUN X-Google-Original-From: "Yonghyeon PYUN" Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 06 Oct 2014 11:14:03 +0900 Date: Mon, 6 Oct 2014 11:14:03 +0900 To: Craig Wiesen Subject: Re: [CFT] alc(4) QAC AR816x/AR817x ethernet controller support Message-ID: <20141006021403.GA3131@michelle.fasterthan.com> Reply-To: pyunyh@gmail.com References: <20140930015741.GA2451@michelle.fasterthan.com> <20141001013637.GD2632@michelle.fasterthan.com> <20141002050730.GA964@michelle.fasterthan.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 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: Mon, 06 Oct 2014 02:14:12 -0000 On Sat, Oct 04, 2014 at 08:10:06PM +0000, Craig Wiesen wrote: > Yonghyeon PYUN gmail.com> writes: > > > > > On Wed, Oct 01, 2014 at 10:36:37AM +0900, Yonghyeon PYUN wrote: > > > On Tue, Sep 30, 2014 at 10:57:41AM +0900, Yonghyeon PYUN wrote: > > > > Hi, > > > > I've added support for QAC AR816x/AR817x ethernet controllers. It > > > > passed my limited testing and I need more testers. You can find > > > > patches from the following URLs. > > > > > > > > http://people.freebsd.org/~yongari/alc/pci.quirk.diff > > > > and > > > > http://people.freebsd.org/~yongari/alc/alc.diff.20140930 > > > > > > > > pci.qurik.diff is to workaround silicon bug of AR816x. Without it > > > > MSI/MSIX interrupt wouldn't work. If you just want to use > > > > legacy INTx interrupt you don't have to apply it but you have to > > > > tell alc(4) not to use MSI/MSIX interrupt with tunables( > > > > hw.alc.msi.disable and hw.alc.msix_disable). > > > > > > > > alc.diff.20140930 will add support for AR8161/AR8162/AR8171/AR8172 > > > > and E2200 controllers. It supports all hardware features except > > > > RSS. If you have any QAC AR816x/AR817x or old AR813x/AR815x > > > > controllers please test and report how the diff works for you. > > > > Thanks. > > > > > > http://people.freebsd.org/~yongari/alc/pci.quirk.diff > > > http://people.freebsd.org/~yongari/alc/alc.diff.20141001 > > > > > > Patch updated to address link establishment issue. > > > > http://people.freebsd.org/~yongari/alc/alc.diff.20141002 > > Patch updated again to correct wrong lock assertion. > > _______________________________________________ > > > > Hi- > > > I can add that I tested your patches on a 9.3 Stable machine. > The motherboard is a GA-Z77-D3H (rev. 1.1) with onboard Atheros AR816x. > I did have to apply one of the patch hunks by hand, see below. > I am able to ssh into the machine, and remotely access apache/poudriere. > I have not seen any problems so far. > I've included a few outputs for you to examine. > Thanks for your testing! [...] > > Rejected hunk: > # cat if_alc.c.rej This was caused by not MFCing r240693. I'll see whether it could be merged to stable/9. > *************** > *** 831,843 **** > CSR_WRITE_4(sc, ALC_PCIE_PHYMISC2, val); > } > /* Disable ASPM L0S and L1. */ > - cap = CSR_READ_2(sc, base + PCIER_LINK_CAP); > if ((cap & PCIEM_LINK_CAP_ASPM) != 0) { > - ctl = CSR_READ_2(sc, base + PCIER_LINK_CTL); > if ((ctl & PCIEM_LINK_CTL_RCB) != 0) > sc->alc_rcb = DMA_CFG_RCB_128; > if (bootverbose) > - device_printf(dev, "RCB %u bytes\n", > sc->alc_rcb == DMA_CFG_RCB_64 ? 64 : > 128); > state = ctl & PCIEM_LINK_CTL_ASPMC; > if (state & PCIEM_LINK_CTL_ASPMC_L0S) > --- 1279,1291 ---- > CSR_WRITE_4(sc, ALC_PCIE_PHYMISC2, val); > } > /* Disable ASPM L0S and L1. */ > + cap = CSR_READ_2(sc, sc->alc_expcap + PCIER_LINK_CAP); > if ((cap & PCIEM_LINK_CAP_ASPM) != 0) { > + ctl = CSR_READ_2(sc, sc->alc_expcap + > PCIER_LINK_CTL); > if ((ctl & PCIEM_LINK_CTL_RCB) != 0) > sc->alc_rcb = DMA_CFG_RCB_128; > if (bootverbose) > + device_printf(sc->alc_dev, "RCB %u > bytes\n", > sc->alc_rcb == DMA_CFG_RCB_64 ? 64 : > 128); > state = ctl & PCIEM_LINK_CTL_ASPMC; > if (state & PCIEM_LINK_CTL_ASPMC_L0S) > >