Module Name: src
Committed By: riz
Date: Sat Jan 5 23:32:28 UTC 2013
Modified Files:
src/sys/dev/marvell [netbsd-6]: if_mvgbe.c
Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #766):
sys/dev/marvell/if_mvgbe.c: revision 1.33
Check wheter an MII PHY is really connected or not.
This change privents panic if MII PHY port is not used.
To generate a diff of this commit:
cvs rdiff -u -r1.16.2.1 -r1.16.2.2 src/sys/dev/marvell/if_mvgbe.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/marvell/if_mvgbe.c
diff -u src/sys/dev/marvell/if_mvgbe.c:1.16.2.1 src/sys/dev/marvell/if_mvgbe.c:1.16.2.2
--- src/sys/dev/marvell/if_mvgbe.c:1.16.2.1 Tue Nov 20 22:26:03 2012
+++ src/sys/dev/marvell/if_mvgbe.c Sat Jan 5 23:32:27 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mvgbe.c,v 1.16.2.1 2012/11/20 22:26:03 riz Exp $ */
+/* $NetBSD: if_mvgbe.c,v 1.16.2.2 2013/01/05 23:32:27 riz Exp $ */
/*
* Copyright (c) 2007, 2008 KIYOHARA Takashi
* All rights reserved.
@@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.16.2.1 2012/11/20 22:26:03 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.16.2.2 2013/01/05 23:32:27 riz Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -398,7 +398,9 @@ mvgbec_attach(device_t parent, device_t
if (child) {
port = device_private(child);
mii = LIST_FIRST(&port->sc_mii.mii_phys);
- phyaddr |= MVGBE_PHYADDR_PHYAD(j, mii->mii_phy);
+ if (mii != NULL)
+ phyaddr |= MVGBE_PHYADDR_PHYAD(j,
+ mii->mii_phy);
}
}
break;