Module Name: src Committed By: snj Date: Tue Aug 4 19:57:25 UTC 2009
Modified Files: src/sys/dev/pci [netbsd-5]: if_bge.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #870): sys/dev/pci/if_bge.c: revision 1.167 Call prop_dictionary_set_uint32() before mii_attach() so that brgphy can do prop_dictionary_get_uint32() correctly. To generate a diff of this commit: cvs rdiff -u -r1.152.4.3 -r1.152.4.4 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.152.4.3 src/sys/dev/pci/if_bge.c:1.152.4.4 --- src/sys/dev/pci/if_bge.c:1.152.4.3 Tue Aug 4 19:46:20 2009 +++ src/sys/dev/pci/if_bge.c Tue Aug 4 19:57:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bge.c,v 1.152.4.3 2009/08/04 19:46:20 snj Exp $ */ +/* $NetBSD: if_bge.c,v 1.152.4.4 2009/08/04 19:57:24 snj Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.152.4.3 2009/08/04 19:46:20 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.152.4.4 2009/08/04 19:57:24 snj 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