Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Oct 2010 18:12:27 -0700
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        Kris Moore <kris@pcbsd.org>
Cc:        freebsd-net@freebsd.org, yongari@freebsd.org
Subject:   Re: Hardlock with alc0 device
Message-ID:  <20101030011227.GD19479@michelle.cdnetworks.com>
In-Reply-To: <20101030004422.GA13657@pcbsd.org>
References:  <20101029101516.GA66384@pcbsd.org> <20101029165531.GA19479@michelle.cdnetworks.com> <20101030004422.GA13657@pcbsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 29, 2010 at 08:44:22PM -0400, Kris Moore wrote:
> On Fri, Oct 29, 2010 at 09:55:31AM -0700, Pyun YongHyeon wrote:
> > 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<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
> > >         options=c3198<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MCAST,WOL_MAGIC,VLAN_HWTSO,LINKSTATE>
> > >         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?
> 
> > 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
> 
> Well, so far with the attached patch, after a couple reboots, and trying to use dhclient, it's still working fine.  Also after the initial dhclient times out I get a link status of "status: no carrier" now, which didn't show up
> before, so thats good too.
> 

Thanks a lot for testing!

> Thanks for the quick fix, will you put this into HEAD soon?
> 

Patch committed(r214542).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101030011227.GD19479>