Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Feb 2010 19:12:07 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r203716 - head/sys/dev/bge
Message-ID:  <201002091912.o19JC7Ug056104@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Tue Feb  9 19:12:06 2010
New Revision: 203716
URL: http://svn.freebsd.org/changeset/base/203716

Log:
  Move device specific flag configuration to attach routine.
  The softc obtained in device probe wouldn't be the same one used in
  device attach. Drivers should not assume any values stored in softc
  structure in probe routine will be available for its attach routine.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Tue Feb  9 18:43:50 2010	(r203715)
+++ head/sys/dev/bge/if_bge.c	Tue Feb  9 19:12:06 2010	(r203716)
@@ -1993,10 +1993,6 @@ bge_probe(device_t dev)
 			snprintf(buf, 96, "%s, %sASIC rev. %#08x", model,
 			    br != NULL ? "" : "unknown ", id);
 			device_set_desc_copy(dev, buf);
-			if (pci_get_subvendor(dev) == DELL_VENDORID)
-				sc->bge_flags |= BGE_FLAG_NO_3LED;
-			if (did == BCOM_DEVICEID_BCM5755M)
-				sc->bge_flags |= BGE_FLAG_ADJUST_TRIM;
 			return (0);
 		}
 		t++;
@@ -2607,6 +2603,10 @@ bge_attach(device_t dev)
 		sc->bge_flags |= BGE_FLAG_ADC_BUG;
 	if (sc->bge_chipid == BGE_CHIPID_BCM5704_A0)
 		sc->bge_flags |= BGE_FLAG_5704_A0_BUG;
+	if (pci_get_subvendor(dev) == DELL_VENDORID)
+		sc->bge_flags |= BGE_FLAG_NO_3LED;
+	if (pci_get_device(dev) == BCOM_DEVICEID_BCM5755M)
+		sc->bge_flags |= BGE_FLAG_ADJUST_TRIM;
 	if (BGE_IS_5705_PLUS(sc) &&
 	    !(sc->bge_flags & BGE_FLAG_ADJUST_TRIM)) {
 		if (sc->bge_asicrev == BGE_ASICREV_BCM5755 ||



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