Module Name:    src
Committed By:   martin
Date:           Sat Feb 23 17:18:07 UTC 2019

Modified Files:
        src/sys/dev/ic: dwc_gmac.c dwc_gmac_var.h

Log Message:
Pass the phy ID to dwc_gmac_attach.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/ic/dwc_gmac.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/ic/dwc_gmac_var.h

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/ic/dwc_gmac.c
diff -u src/sys/dev/ic/dwc_gmac.c:1.56 src/sys/dev/ic/dwc_gmac.c:1.57
--- src/sys/dev/ic/dwc_gmac.c:1.56	Tue Jan 22 03:42:26 2019
+++ src/sys/dev/ic/dwc_gmac.c	Sat Feb 23 17:18:07 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_gmac.c,v 1.56 2019/01/22 03:42:26 msaitoh Exp $ */
+/* $NetBSD: dwc_gmac.c,v 1.57 2019/02/23 17:18:07 martin Exp $ */
 
 /*-
  * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.56 2019/01/22 03:42:26 msaitoh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.57 2019/02/23 17:18:07 martin Exp $");
 
 /* #define	DWC_GMAC_DEBUG	1 */
 
@@ -185,7 +185,7 @@ static void dwc_gmac_dump_ffilt(struct d
 #endif
 
 int
-dwc_gmac_attach(struct dwc_gmac_softc *sc, uint32_t mii_clk)
+dwc_gmac_attach(struct dwc_gmac_softc *sc, int phy_id, uint32_t mii_clk)
 {
 	uint8_t enaddr[ETHER_ADDR_LEN];
 	uint32_t maclo, machi, ver, hwft;
@@ -306,7 +306,7 @@ dwc_gmac_attach(struct dwc_gmac_softc *s
         mii->mii_readreg = dwc_gmac_miibus_read_reg;
         mii->mii_writereg = dwc_gmac_miibus_write_reg;
         mii->mii_statchg = dwc_gmac_miibus_statchg;
-        mii_attach(sc->sc_dev, mii, 0xffffffff, MII_PHY_ANY, MII_OFFSET_ANY,
+        mii_attach(sc->sc_dev, mii, phy_id, MII_PHY_ANY, MII_OFFSET_ANY,
 	    MIIF_DOPAUSE);
 
         if (LIST_EMPTY(&mii->mii_phys)) {

Index: src/sys/dev/ic/dwc_gmac_var.h
diff -u src/sys/dev/ic/dwc_gmac_var.h:1.12 src/sys/dev/ic/dwc_gmac_var.h:1.13
--- src/sys/dev/ic/dwc_gmac_var.h:1.12	Mon Oct  8 17:09:31 2018
+++ src/sys/dev/ic/dwc_gmac_var.h	Sat Feb 23 17:18:07 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_gmac_var.h,v 1.12 2018/10/08 17:09:31 martin Exp $ */
+/* $NetBSD: dwc_gmac_var.h,v 1.13 2019/02/23 17:18:07 martin Exp $ */
 
 /*-
  * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
@@ -117,5 +117,6 @@ struct dwc_gmac_softc {
 	void (*sc_set_speed)(struct dwc_gmac_softc *, int);
 };
 
-int dwc_gmac_attach(struct dwc_gmac_softc*, uint32_t /*mii_clk*/);
+int dwc_gmac_attach(struct dwc_gmac_softc*, int /*phy_id*/,
+    uint32_t /*mii_clk*/);
 int dwc_gmac_intr(struct dwc_gmac_softc*);

Reply via email to