From nobody@FreeBSD.org  Mon Jan 17 10:39:33 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0E9A1106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 17 Jan 2011 10:39:33 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id F24C48FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 17 Jan 2011 10:39:32 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p0HAdWiV055165
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 17 Jan 2011 10:39:32 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p0HAdWK9055164;
	Mon, 17 Jan 2011 10:39:32 GMT
	(envelope-from nobody)
Message-Id: <201101171039.p0HAdWK9055164@red.freebsd.org>
Date: Mon, 17 Jan 2011 10:39:32 GMT
From: Chester Lee Schmaltz <clschmaltz@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: recent alc driver locks computer 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         154076
>Category:       kern
>Synopsis:       [alc] [hang] recent alc driver locks computer
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    yongari
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 17 10:40:11 UTC 2011
>Closed-Date:    Mon Jan 31 20:03:57 UTC 2011
>Last-Modified:  Mon Jan 31 20:03:57 UTC 2011
>Originator:     Chester Lee Schmaltz
>Release:        modified 8.1-RELEASE amd64, also on ordinary 8.2-RC2 for i386 & amd64
>Organization:
>Environment:
FreeBSD  8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sun Jan 16 22:39:49 CST 2011     root@n7010.local.xxx:/usr/obj/usr/src/sys/GENERICpatch  amd64

>Description:
I'm having problems with getting the wired Atheros network card working on my new laptop (Dell N7010).  The pciconf output says the device ID is 0x2060, which from the dev/alc/if_alcreg.h on the CVSweb browser indicates it is an AR8152.

I'm running 8.1-RELEASE but its version of alc doesn't support this card.  So I grabbed the version of if_alc.c, if_alcreg.h, and if_alcvar.h from Aug. 20th 2010 which added support, but now after using dhclient or manually assigning an IP my computer completely locks up.  A message about the interface going down, and then a second one about it coming back up are the last things I see.  No error messages come up nor are written to /var/log/messages.

I also tried even more recent versions from the RELENG_8_2 branch and had to update some files in dev/mii and sys/net/if_media.h but... same results.
I have an Intel i5 processor and I'm using the amd64 architecture.  GENERIC kernel or a modified one to remove unneeded stuff makes no difference.

Here is the pciconf output after updating alc:

alc0@pci0:4:0:0:	class=0x020000 card=0x04571028 chip=0x20601969 rev=0xc1 hdr=0x00
    vendor     = 'Attansic (Now owned by Atheros)'
    class      = network
    subclass   = ethernet
    bar   [10] = type Memory, range 64, base 0xf0400000, size 262144, enabled
    bar   [18] = type I/O Port, range 32, base 0x2000, size 128, enabled
    cap 01[40] = powerspec 3  supports D0 D3  current D0
    cap 05[48] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[58] = PCI-Express 1 endpoint max data 128(4096) link x1(x1)
    cap 03[6c] = VPD

with plain 8.1-RELEASE it's similar but with none3@" replacing 
"alc0@" and the cap 05 line doesn't say "enabled with 1 message".

The ifconfig output (with the newer driver) is:

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 f0:4d:a2:56:b9:48
	media: Ethernet autoselect

I also tried both the i386 and amd64 bootonly CD's for 8.2-RC2 and the same thing still happens if I give an IP address to alc0 with ifconfig at the holographic shell prompt.

For reference, in Linux the driver atl1c is working for it just fine.
Linux's lspci -vvv seems to git a lot more info, here it is:
04:00.0 Ethernet controller: Attansic Technology Corp. Device 2060 (rev c1)
	Subsystem: Dell Device 0457
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 43
	Region 0: Memory at f0400000 (64-bit, non-prefetchable) [size=256K]
	Region 2: I/O ports at 2000 [size=128]
	Capabilities: [40] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
		Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [48] MSI: Enable+ Count=1/1 Maskable- 64bit+
		Address: 00000000fee0f00c  Data: 4191
	Capabilities: [58] Express (v1) Endpoint, MSI 00
		DevCap:	MaxPayload 4096 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
			ExtTag- AttnBtn+ AttnInd+ PwrInd+ RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr+ UncorrErr+ FatalErr- UnsuppReq+ AuxPwr+ TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 unlimited, L1 unlimited
			ClockPM+ Surprise- LLActRep- BwNot-
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
	Capabilities: [6c] Vital Product Data
		Not readable
	Capabilities: [100] Advanced Error Reporting
		UESta:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
		UEMsk:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UESvrt:	DLP- SDES+ TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
		CESta:	RxErr- BadTLP+ BadDLLP+ Rollover- Timeout- NonFatalErr-
		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
		AERCap:	First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
	Capabilities: [180] Device Serial Number ff-56-b9-48-f0-4d-a2-ff
	Kernel driver in use: atl1c


Thanks.

>How-To-Repeat:
Use the alc driver after Aug. 30 2010, Dell N7010 laptop, Attansic/Atheros device 2060 (rev c1) wired network card.
and then run:
     ifconfig alc0 192.168.100.3
(or any other IP) or 
     dhclient alc0
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jan 17 11:13:34 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154076 
Responsible-Changed-From-To: freebsd-net->yongari 
Responsible-Changed-By: yongari 
Responsible-Changed-When: Tue Jan 18 20:08:26 UTC 2011 
Responsible-Changed-Why:  
Grab. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154076 
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Wed Jan 19 01:45:22 UTC 2011 
State-Changed-Why:  
It seems you have L2CB revision. I don't have L2CB controller so 
it was not tested at all. 
Anyway, Would you try the patch at the following URL? 
http://people.freebsd.org/~yongari/alc/alc.L2CB.diff 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154076 

From: Pyun YongHyeon <pyunyh@gmail.com>
To: Chester Schmaltz <clschmaltz@gmail.com>
Cc: yongari@freebsd.org, bug-followup@FreeBSD.org
Subject: Re: kern/154076: [alc] [hang] recent alc driver locks computer
Date: Wed, 19 Jan 2011 17:20:16 -0800

 On Tue, Jan 18, 2011 at 09:51:29PM -0600, Chester Schmaltz wrote:
 > I'm afraid that didn't make any difference.  I applied the patch to
 > version Aug. 30th version of the alc driver.
 > 
 
 Ok, how about this one?
 http://people.freebsd.org/~yongari/alc/alc.L2CB.diff2
 
 Sorry, I'm just guessing here due to lack of the controller.
 
 > -Chester
 > 
 > On Tue, Jan 18, 2011 at 7:45 PM,  <yongari@freebsd.org> wrote:
 > > Synopsis: [alc] [hang] recent alc driver locks computer
 > >
 > > State-Changed-From-To: open->feedback
 > > State-Changed-By: yongari
 > > State-Changed-When: Wed Jan 19 01:45:22 UTC 2011
 > > State-Changed-Why:
 > > It seems you have L2CB revision. I don't have L2CB controller so
 > > it was not tested at all.
 > > Anyway, Would you try the patch at the following URL?
 > > http://people.freebsd.org/~yongari/alc/alc.L2CB.diff
 > >
 > > http://www.freebsd.org/cgi/query-pr.cgi?pr=154076
 > >

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/154076: commit references a PR
Date: Thu, 20 Jan 2011 18:26:41 +0000 (UTC)

 Author: yongari
 Date: Thu Jan 20 18:26:33 2011
 New Revision: 217649
 URL: http://svn.freebsd.org/changeset/base/217649
 
 Log:
   Correct wrong definition of PM timer mask and adjust L1/PM timer
   value. While I'm here enable all clocks before initializing
   controller. This change should fix lockup issue seen on AR8152
   v1.1 PCIe Fast Ethernet controller.
   
   PR:	kern/154076
   MFC after:	3 days
 
 Modified:
   head/sys/dev/alc/if_alc.c
   head/sys/dev/alc/if_alcreg.h
 
 Modified: head/sys/dev/alc/if_alc.c
 ==============================================================================
 --- head/sys/dev/alc/if_alc.c	Thu Jan 20 17:42:42 2011	(r217648)
 +++ head/sys/dev/alc/if_alc.c	Thu Jan 20 18:26:33 2011	(r217649)
 @@ -677,7 +677,7 @@ alc_aspm(struct alc_softc *sc, int media
  	pmcfg &= ~PM_CFG_SERDES_PD_EX_L1;
  	pmcfg &= ~(PM_CFG_L1_ENTRY_TIMER_MASK | PM_CFG_LCKDET_TIMER_MASK);
  	pmcfg |= PM_CFG_MAC_ASPM_CHK;
 -	pmcfg |= PM_CFG_SERDES_ENB | PM_CFG_RBER_ENB;
 +	pmcfg |= (PM_CFG_LCKDET_TIMER_DEFAULT << PM_CFG_LCKDET_TIMER_SHIFT);
  	pmcfg &= ~(PM_CFG_ASPM_L1_ENB | PM_CFG_ASPM_L0S_ENB);
  
  	if ((sc->alc_flags & ALC_FLAG_APS) != 0) {
 @@ -3148,6 +3148,9 @@ alc_init_locked(struct alc_softc *sc)
  	alc_init_cmb(sc);
  	alc_init_smb(sc);
  
 +	/* Enable all clocks. */
 +	CSR_WRITE_4(sc, ALC_CLK_GATING_CFG, 0);
 +
  	/* Reprogram the station address. */
  	bcopy(IF_LLADDR(ifp), eaddr, ETHER_ADDR_LEN);
  	CSR_WRITE_4(sc, ALC_PAR0,
 
 Modified: head/sys/dev/alc/if_alcreg.h
 ==============================================================================
 --- head/sys/dev/alc/if_alcreg.h	Thu Jan 20 17:42:42 2011	(r217648)
 +++ head/sys/dev/alc/if_alcreg.h	Thu Jan 20 18:26:33 2011	(r217649)
 @@ -109,7 +109,7 @@
  #define	PM_CFG_PCIE_RECV		0x00008000
  #define	PM_CFG_L1_ENTRY_TIMER_MASK	0x000F0000
  #define	PM_CFG_PM_REQ_TIMER_MASK	0x00F00000
 -#define	PM_CFG_LCKDET_TIMER_MASK	0x3F000000
 +#define	PM_CFG_LCKDET_TIMER_MASK	0x0F000000
  #define	PM_CFG_EN_BUFS_RX_L0S		0x10000000
  #define	PM_CFG_SA_DLY_ENB		0x20000000
  #define	PM_CFG_MAC_ASPM_CHK		0x40000000
 @@ -120,8 +120,9 @@
  #define	PM_CFG_LCKDET_TIMER_SHIFT	24
  
  #define	PM_CFG_L0S_ENTRY_TIMER_DEFAULT	6
 -#define	PM_CFG_L1_ENTRY_TIMER_DEFAULT	12
 -#define	PM_CFG_PM_REQ_TIMER_DEFAULT	1
 +#define	PM_CFG_L1_ENTRY_TIMER_DEFAULT	1
 +#define	PM_CFG_LCKDET_TIMER_DEFAULT	12
 +#define	PM_CFG_PM_REQ_TIMER_DEFAULT	12
  
  #define	ALC_LTSSM_ID_CFG		0x12FC
  #define	LTSSM_ID_WRO_ENB		0x00001000
 @@ -724,6 +725,14 @@
  
  #define	ALC_TX_MIB_BASE			0x1760
  
 +#define	ALC_CLK_GATING_CFG		0x1814
 +#define	CLK_GATING_DMAW_ENB		0x0001
 +#define	CLK_GATING_DMAR_ENB		0x0002
 +#define	CLK_GATING_TXQ_ENB		0x0004
 +#define	CLK_GATING_RXQ_ENB		0x0008
 +#define	CLK_GATING_TXMAC_ENB		0x0010
 +#define	CLK_GATING_RXMAC_ENB		0x0020
 +
  #define	ALC_DEBUG_DATA0			0x1900
  
  #define	ALC_DEBUG_DATA1			0x1904
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->patched 
State-Changed-By: yongari 
State-Changed-When: Thu Jan 20 21:19:13 UTC 2011 
State-Changed-Why:  
Committed to HEAD(r217649). Will MFC after 3 days. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154076 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/154076: commit references a PR
Date: Sun, 23 Jan 2011 02:15:59 +0000 (UTC)

 Author: yongari
 Date: Sun Jan 23 02:15:50 2011
 New Revision: 217740
 URL: http://svn.freebsd.org/changeset/base/217740
 
 Log:
   MFC r217649:
     Correct wrong definition of PM timer mask and adjust L1/PM timer
     value. While I'm here enable all clocks before initializing
     controller. This change should fix lockup issue seen on AR8152
     v1.1 PCIe Fast Ethernet controller.
   
     PR:	kern/154076
 
 Modified:
   stable/8/sys/dev/alc/if_alc.c
   stable/8/sys/dev/alc/if_alcreg.h
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
 
 Modified: stable/8/sys/dev/alc/if_alc.c
 ==============================================================================
 --- stable/8/sys/dev/alc/if_alc.c	Sat Jan 22 23:44:56 2011	(r217739)
 +++ stable/8/sys/dev/alc/if_alc.c	Sun Jan 23 02:15:50 2011	(r217740)
 @@ -678,7 +678,7 @@ alc_aspm(struct alc_softc *sc, int media
  	pmcfg &= ~PM_CFG_SERDES_PD_EX_L1;
  	pmcfg &= ~(PM_CFG_L1_ENTRY_TIMER_MASK | PM_CFG_LCKDET_TIMER_MASK);
  	pmcfg |= PM_CFG_MAC_ASPM_CHK;
 -	pmcfg |= PM_CFG_SERDES_ENB | PM_CFG_RBER_ENB;
 +	pmcfg |= (PM_CFG_LCKDET_TIMER_DEFAULT << PM_CFG_LCKDET_TIMER_SHIFT);
  	pmcfg &= ~(PM_CFG_ASPM_L1_ENB | PM_CFG_ASPM_L0S_ENB);
  
  	if ((sc->alc_flags & ALC_FLAG_APS) != 0) {
 @@ -3150,6 +3150,9 @@ alc_init_locked(struct alc_softc *sc)
  	alc_init_cmb(sc);
  	alc_init_smb(sc);
  
 +	/* Enable all clocks. */
 +	CSR_WRITE_4(sc, ALC_CLK_GATING_CFG, 0);
 +
  	/* Reprogram the station address. */
  	bcopy(IF_LLADDR(ifp), eaddr, ETHER_ADDR_LEN);
  	CSR_WRITE_4(sc, ALC_PAR0,
 
 Modified: stable/8/sys/dev/alc/if_alcreg.h
 ==============================================================================
 --- stable/8/sys/dev/alc/if_alcreg.h	Sat Jan 22 23:44:56 2011	(r217739)
 +++ stable/8/sys/dev/alc/if_alcreg.h	Sun Jan 23 02:15:50 2011	(r217740)
 @@ -109,7 +109,7 @@
  #define	PM_CFG_PCIE_RECV		0x00008000
  #define	PM_CFG_L1_ENTRY_TIMER_MASK	0x000F0000
  #define	PM_CFG_PM_REQ_TIMER_MASK	0x00F00000
 -#define	PM_CFG_LCKDET_TIMER_MASK	0x3F000000
 +#define	PM_CFG_LCKDET_TIMER_MASK	0x0F000000
  #define	PM_CFG_EN_BUFS_RX_L0S		0x10000000
  #define	PM_CFG_SA_DLY_ENB		0x20000000
  #define	PM_CFG_MAC_ASPM_CHK		0x40000000
 @@ -120,8 +120,9 @@
  #define	PM_CFG_LCKDET_TIMER_SHIFT	24
  
  #define	PM_CFG_L0S_ENTRY_TIMER_DEFAULT	6
 -#define	PM_CFG_L1_ENTRY_TIMER_DEFAULT	12
 -#define	PM_CFG_PM_REQ_TIMER_DEFAULT	1
 +#define	PM_CFG_L1_ENTRY_TIMER_DEFAULT	1
 +#define	PM_CFG_LCKDET_TIMER_DEFAULT	12
 +#define	PM_CFG_PM_REQ_TIMER_DEFAULT	12
  
  #define	ALC_LTSSM_ID_CFG		0x12FC
  #define	LTSSM_ID_WRO_ENB		0x00001000
 @@ -724,6 +725,14 @@
  
  #define	ALC_TX_MIB_BASE			0x1760
  
 +#define	ALC_CLK_GATING_CFG		0x1814
 +#define	CLK_GATING_DMAW_ENB		0x0001
 +#define	CLK_GATING_DMAR_ENB		0x0002
 +#define	CLK_GATING_TXQ_ENB		0x0004
 +#define	CLK_GATING_RXQ_ENB		0x0008
 +#define	CLK_GATING_TXMAC_ENB		0x0010
 +#define	CLK_GATING_RXMAC_ENB		0x0020
 +
  #define	ALC_DEBUG_DATA0			0x1900
  
  #define	ALC_DEBUG_DATA1			0x1904
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/154076: commit references a PR
Date: Sun, 23 Jan 2011 02:18:25 +0000 (UTC)

 Author: yongari
 Date: Sun Jan 23 02:18:18 2011
 New Revision: 217741
 URL: http://svn.freebsd.org/changeset/base/217741
 
 Log:
   MFC r217649:
     Correct wrong definition of PM timer mask and adjust L1/PM timer
     value. While I'm here enable all clocks before initializing
     controller. This change should fix lockup issue seen on AR8152
     v1.1 PCIe Fast Ethernet controller.
   
     PR:	kern/154076
 
 Modified:
   stable/7/sys/dev/alc/if_alc.c
   stable/7/sys/dev/alc/if_alcreg.h
 Directory Properties:
   stable/7/sys/   (props changed)
   stable/7/sys/cddl/contrib/opensolaris/   (props changed)
   stable/7/sys/contrib/dev/acpica/   (props changed)
   stable/7/sys/contrib/pf/   (props changed)
 
 Modified: stable/7/sys/dev/alc/if_alc.c
 ==============================================================================
 --- stable/7/sys/dev/alc/if_alc.c	Sun Jan 23 02:15:50 2011	(r217740)
 +++ stable/7/sys/dev/alc/if_alc.c	Sun Jan 23 02:18:18 2011	(r217741)
 @@ -678,7 +678,7 @@ alc_aspm(struct alc_softc *sc, int media
  	pmcfg &= ~PM_CFG_SERDES_PD_EX_L1;
  	pmcfg &= ~(PM_CFG_L1_ENTRY_TIMER_MASK | PM_CFG_LCKDET_TIMER_MASK);
  	pmcfg |= PM_CFG_MAC_ASPM_CHK;
 -	pmcfg |= PM_CFG_SERDES_ENB | PM_CFG_RBER_ENB;
 +	pmcfg |= (PM_CFG_LCKDET_TIMER_DEFAULT << PM_CFG_LCKDET_TIMER_SHIFT);
  	pmcfg &= ~(PM_CFG_ASPM_L1_ENB | PM_CFG_ASPM_L0S_ENB);
  
  	if ((sc->alc_flags & ALC_FLAG_APS) != 0) {
 @@ -3150,6 +3150,9 @@ alc_init_locked(struct alc_softc *sc)
  	alc_init_cmb(sc);
  	alc_init_smb(sc);
  
 +	/* Enable all clocks. */
 +	CSR_WRITE_4(sc, ALC_CLK_GATING_CFG, 0);
 +
  	/* Reprogram the station address. */
  	bcopy(IF_LLADDR(ifp), eaddr, ETHER_ADDR_LEN);
  	CSR_WRITE_4(sc, ALC_PAR0,
 
 Modified: stable/7/sys/dev/alc/if_alcreg.h
 ==============================================================================
 --- stable/7/sys/dev/alc/if_alcreg.h	Sun Jan 23 02:15:50 2011	(r217740)
 +++ stable/7/sys/dev/alc/if_alcreg.h	Sun Jan 23 02:18:18 2011	(r217741)
 @@ -109,7 +109,7 @@
  #define	PM_CFG_PCIE_RECV		0x00008000
  #define	PM_CFG_L1_ENTRY_TIMER_MASK	0x000F0000
  #define	PM_CFG_PM_REQ_TIMER_MASK	0x00F00000
 -#define	PM_CFG_LCKDET_TIMER_MASK	0x3F000000
 +#define	PM_CFG_LCKDET_TIMER_MASK	0x0F000000
  #define	PM_CFG_EN_BUFS_RX_L0S		0x10000000
  #define	PM_CFG_SA_DLY_ENB		0x20000000
  #define	PM_CFG_MAC_ASPM_CHK		0x40000000
 @@ -120,8 +120,9 @@
  #define	PM_CFG_LCKDET_TIMER_SHIFT	24
  
  #define	PM_CFG_L0S_ENTRY_TIMER_DEFAULT	6
 -#define	PM_CFG_L1_ENTRY_TIMER_DEFAULT	12
 -#define	PM_CFG_PM_REQ_TIMER_DEFAULT	1
 +#define	PM_CFG_L1_ENTRY_TIMER_DEFAULT	1
 +#define	PM_CFG_LCKDET_TIMER_DEFAULT	12
 +#define	PM_CFG_PM_REQ_TIMER_DEFAULT	12
  
  #define	ALC_LTSSM_ID_CFG		0x12FC
  #define	LTSSM_ID_WRO_ENB		0x00001000
 @@ -724,6 +725,14 @@
  
  #define	ALC_TX_MIB_BASE			0x1760
  
 +#define	ALC_CLK_GATING_CFG		0x1814
 +#define	CLK_GATING_DMAW_ENB		0x0001
 +#define	CLK_GATING_DMAR_ENB		0x0002
 +#define	CLK_GATING_TXQ_ENB		0x0004
 +#define	CLK_GATING_RXQ_ENB		0x0008
 +#define	CLK_GATING_TXMAC_ENB		0x0010
 +#define	CLK_GATING_RXMAC_ENB		0x0020
 +
  #define	ALC_DEBUG_DATA0			0x1900
  
  #define	ALC_DEBUG_DATA1			0x1904
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: yongari 
State-Changed-When: Mon Jan 31 20:03:12 UTC 2011 
State-Changed-Why:  
MFC to stable/8 and stable/7 done. 
Thanks for testing and reporting! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154076 
>Unformatted:
