From owner-freebsd-net@FreeBSD.ORG Fri Oct 29 16:57:05 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99D97106564A; Fri, 29 Oct 2010 16:57:05 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5EAC38FC12; Fri, 29 Oct 2010 16:57:05 +0000 (UTC) Received: by pwi8 with SMTP id 8so774384pwi.13 for ; Fri, 29 Oct 2010 09:57:04 -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:in-reply-to:user-agent; bh=4ZQc+UnsXzCmuyjAadaE+347oIJp2SpEToScxQalwFg=; b=JkDOeJ6kkLDwWNsjHfOnDfx4RnLZyhvfRaS8GQ20D/oxaml5NyCyXSxL5EwJi4Bg0I PqxrW7+dY4FqV3DrS333EsVDBngQNAFEJBbuHzdjUUxThRbU9Mr8etVO8rfiamDNqFzR nqUkFveei/efxSjztkTeNqW6fZ6MS2gHzH+DE= 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:in-reply-to:user-agent; b=bOgYnjvvjn/lR3t9kvhton5Qs5hpyVouVmGmmDWOt987F8rTBK5TPmnpMKV1XuoIzY pa0FdYzoGMPGBWl17O/hEAyOtCf3zYu7aprgCqrQSFKnfoyqb9lGH4JMtN+7R56z0A1D xoTp/W3Hxihp5qdOua9n8foEyJXLTkOrL2mmM= Received: by 10.142.179.5 with SMTP id b5mr1532318wff.225.1288371424814; Fri, 29 Oct 2010 09:57:04 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id e36sm2166457wfj.14.2010.10.29.09.57.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 29 Oct 2010 09:57:02 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Fri, 29 Oct 2010 09:55:31 -0700 From: Pyun YongHyeon Date: Fri, 29 Oct 2010 09:55:31 -0700 To: Kris Moore Message-ID: <20101029165531.GA19479@michelle.cdnetworks.com> References: <20101029101516.GA66384@pcbsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="J2SCkAp4GZ/dPZZf" Content-Disposition: inline In-Reply-To: <20101029101516.GA66384@pcbsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org, yongari@freebsd.org Subject: Re: Hardlock with alc0 device X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Oct 2010 16:57:05 -0000 --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Oct 29, 2010 at 06:15:16AM -0400, Kris Moore wrote: > > I'm running into a rather interesting problem here on HEAD with a newer Asus > EEE PC and the "alc" network driver. The device works great when a > cable is plugged in, no issues at all. However, if I unplug the ethernet > and reboot then I get a hard-lock when it tries to bring up the device. > > I disabled ifconfig_alc0="DHCP" in rc.conf, and now the system boots > normally, but just for kicks I tried running "dhclient alc0" on it > manually, and sure enough it resulted in another system lockup. (No kern dump, > doesn't even get that far) > > Here's some information about the system / device, let me know if there > is any other data / commands I should run and send over. > > > FreeBSD mininova 9.0-CURRENT FreeBSD 9.0-CURRENT #14: Sat Oct 23 13:11:00 PDT 2010 > > alc0@pci0:1:0:0: class=0x020000 card=0x838a1043 chip=0x10621969 rev=0xc0 hdr=0x00 > vendor = 'Attansic (Now owned by Atheros)' > device = 'Atheros AR8132 PCI-E Fast Ethernet Controller (AR8132)' > class = network > subclass = ethernet > > > alc0: flags=8802 metric 0 mtu 1500 > options=c3198 > ether 20:cf:30:1e:b2:38 > media: Ethernet autoselect > I was not able to reproduce it with sample board so I'm not sure what register access could trigger the stuck. Given that there are some configuration changes in BIOS for better power saving(ASPM) it could be related with accessing ALC_PM_CFG register. I also remember some user reported controller couldn't establish link when system booted without UTP cable plugged in. Not sure this is also the same issue as sample board does not show the issue. Anyway, would you try attached patch? --J2SCkAp4GZ/dPZZf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="alc.pm.diff" Index: sys/dev/alc/if_alc.c =================================================================== --- sys/dev/alc/if_alc.c (revision 214514) +++ sys/dev/alc/if_alc.c (working copy) @@ -331,8 +331,8 @@ reg = CSR_READ_4(sc, ALC_MAC_CFG); reg |= MAC_CFG_TX_ENB | MAC_CFG_RX_ENB; CSR_WRITE_4(sc, ALC_MAC_CFG, reg); + alc_aspm(sc, IFM_SUBTYPE(mii->mii_media_active)); } - alc_aspm(sc, IFM_SUBTYPE(mii->mii_media_active)); } static void --J2SCkAp4GZ/dPZZf--