Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Feb 2011 01:15:26 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r218870 - stable/8/sys/dev/alc
Message-ID:  <201102200115.p1K1FQrZ014976@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Sun Feb 20 01:15:26 2011
New Revision: 218870
URL: http://svn.freebsd.org/changeset/base/218870

Log:
  MFC r218141:
    alc_rev was used without initialization such that it failed to
    apply AR8152 v1.0 specific initialization code. Fix this bug by
    explicitly reading PCI device revision id via PCI accessor.
  
    Reported by:	Gabriel Linder ( linder.gabriel <> gmail dot com )

Modified:
  stable/8/sys/dev/alc/if_alc.c
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	Sun Feb 20 01:10:14 2011	(r218869)
+++ stable/8/sys/dev/alc/if_alc.c	Sun Feb 20 01:15:26 2011	(r218870)
@@ -810,7 +810,7 @@ alc_attach(device_t dev)
 		    CSR_READ_4(sc, ALC_PCIE_PHYMISC) |
 		    PCIE_PHYMISC_FORCE_RCV_DET);
 		if (sc->alc_ident->deviceid == DEVICEID_ATHEROS_AR8152_B &&
-		    sc->alc_rev == ATHEROS_AR8152_B_V10) {
+		    pci_get_revid(dev) == ATHEROS_AR8152_B_V10) {
 			val = CSR_READ_4(sc, ALC_PCIE_PHYMISC2);
 			val &= ~(PCIE_PHYMISC2_SERDES_CDR_MASK |
 			    PCIE_PHYMISC2_SERDES_TH_MASK);



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