Module Name: src
Committed By: tsutsui
Date: Sun Jan 23 03:15:06 UTC 2011
Modified Files:
src/sys/dev/pci: if_nfe.c
Log Message:
Pull the following fix from OpenBSD:
http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/pci/if_nfe.c#rev1.97
>> Some nfe(4)/rlphy(4) combos don't work, because the PHY responds to all
>> addresses on the mii bus. As a countereasure, only attach the first PHY we
>> encounter. It is very unlikely we're going to ever see nfe(4) with multiple
>> PHYs. The same is probably true for any modern NIC.
Should suppress bogus ukphy30 noted in PR kern/42950.
No bad side effect on my nfe(4) which didn't get ghosts:
---
nfe0 at pci0 dev 5 function 0: NVIDIA nForce3 Ethernet #4 (rev. 0xa2)
:
rlphy0 at nfe0 phy 1: RTL8201L 10/100 media interface, rev. 1
rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/if_nfe.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_nfe.c
diff -u src/sys/dev/pci/if_nfe.c:1.53 src/sys/dev/pci/if_nfe.c:1.54
--- src/sys/dev/pci/if_nfe.c:1.53 Wed Nov 3 14:03:40 2010
+++ src/sys/dev/pci/if_nfe.c Sun Jan 23 03:15:06 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: if_nfe.c,v 1.53 2010/11/03 14:03:40 jakllsch Exp $ */
+/* $NetBSD: if_nfe.c,v 1.54 2011/01/23 03:15:06 tsutsui Exp $ */
/* $OpenBSD: if_nfe.c,v 1.77 2008/02/05 16:52:50 brad Exp $ */
/*-
@@ -21,7 +21,7 @@
/* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.53 2010/11/03 14:03:40 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.54 2011/01/23 03:15:06 tsutsui Exp $");
#include "opt_inet.h"
#include "vlan.h"
@@ -396,8 +396,7 @@
ifmedia_init(&sc->sc_mii.mii_media, 0, ether_mediachange,
ether_mediastatus);
- mii_attach(self, &sc->sc_mii, 0xffffffff, MII_PHY_ANY,
- MII_OFFSET_ANY, mii_flags);
+ mii_attach(self, &sc->sc_mii, 0xffffffff, MII_PHY_ANY, 0, mii_flags);
if (LIST_FIRST(&sc->sc_mii.mii_phys) == NULL) {
aprint_error_dev(self, "no PHY found!\n");