Module Name: src Committed By: msaitoh Date: Sat Jul 25 13:52:47 UTC 2009
Modified Files: src/sys/dev/pci: if_bge.c Log Message: Call prop_dictionary_set_uint32() before mii_init() so that brgphy can do prop_dictionary_get_uint32() correctly. To generate a diff of this commit: cvs rdiff -u -r1.166 -r1.167 src/sys/dev/pci/if_bge.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/if_bge.c diff -u src/sys/dev/pci/if_bge.c:1.166 src/sys/dev/pci/if_bge.c:1.167 --- src/sys/dev/pci/if_bge.c:1.166 Thu Jul 23 05:05:13 2009 +++ src/sys/dev/pci/if_bge.c Sat Jul 25 13:52:47 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bge.c,v 1.166 2009/07/23 05:05:13 msaitoh Exp $ */ +/* $NetBSD: if_bge.c,v 1.167 2009/07/25 13:52:47 msaitoh Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.166 2009/07/23 05:05:13 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.167 2009/07/25 13:52:47 msaitoh Exp $"); #include "bpfilter.h" #include "vlan.h" @@ -2559,6 +2559,10 @@ sc->bge_flags |= BGE_PHY_FIBER_TBI; } + /* set phyflags before mii_attach() */ + dict = device_properties(self); + prop_dictionary_set_uint32(dict, "phyflags", sc->bge_flags); + if (sc->bge_flags & BGE_PHY_FIBER_TBI) { ifmedia_init(&sc->bge_ifmedia, IFM_IMASK, bge_ifmedia_upd, bge_ifmedia_sts); @@ -2647,9 +2651,6 @@ aprint_error_dev(self, "couldn't establish power handler\n"); else pmf_class_network_register(self, ifp); - - dict = device_properties(self); - prop_dictionary_set_uint32(dict, "phyflags", sc->bge_flags); } static void