Author: yongari
Date: Mon Jan 31 20:00:43 2011
New Revision: 218141
URL: http://svn.freebsd.org/changeset/base/218141

Log:
  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:
  head/sys/dev/alc/if_alc.c

Modified: head/sys/dev/alc/if_alc.c
==============================================================================
--- head/sys/dev/alc/if_alc.c   Mon Jan 31 18:41:52 2011        (r218140)
+++ head/sys/dev/alc/if_alc.c   Mon Jan 31 20:00:43 2011        (r218141)
@@ -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);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to