Can you try the attached diff?  It has some debug printf's in there,
so please send me a dmesg.

Regarding the high interrupt load on the v210; try disconnecting the 
CD-ROM/DVD-ROM.


Index: mii/eephy.c
===================================================================
RCS file: /cvs/src/sys/dev/mii/eephy.c,v
retrieving revision 1.39
diff -u -p -r1.39 eephy.c
--- mii/eephy.c 5 Jan 2007 21:40:45 -0000       1.39
+++ mii/eephy.c 3 Feb 2007 14:10:36 -0000
@@ -133,7 +133,7 @@ eephyattach(struct device *parent, struc
        struct mii_attach_args *ma = aux;
        struct mii_data *mii = ma->mii_data;
        const struct mii_phydesc *mpd;
-       int reg;
+       int reg, page;
 
        mpd = mii_phy_match(ma, eephys);
        printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
@@ -147,6 +147,33 @@ eephyattach(struct device *parent, struc
 
        /* XXX No loopback support yet, although the hardware can do it. */
        sc->mii_flags |= MIIF_NOLOOP;
+
+       {
+               int i;
+               for (i = 0; i < 32; i++)
+                       printf("%d: 0x%04x\n", i, PHY_READ(sc, i));
+       }
+
+       /* Switch to fiber-only mode if necessary. */
+       if (sc->mii_model == MII_MODEL_MARVELL_E1112 &&
+           sc->mii_flags & MIIF_HAVEFIBER) {
+               page = PHY_READ(sc, E1000_EADR);
+               PHY_WRITE(sc, E1000_EADR, 2);
+               reg = PHY_READ(sc, E1000_SCR);
+               printf("16_2: 0x%04x\n", reg);
+               reg &= ~E1000_SCR_MODE_MASK;
+               reg |= E1000_SCR_MODE_1000BX;
+               PHY_WRITE(sc, E1000_SCR, reg);
+               PHY_WRITE(sc, E1000_EADR, page);
+
+               PHY_RESET(sc);
+       }
+
+       {
+               int i;
+               for (i = 0; i < 32; i++)
+                       printf("%d: 0x%04x\n", i, PHY_READ(sc, i));
+       }
 
        sc->mii_capabilities = PHY_READ(sc, E1000_SR) & ma->mii_capmask;
        if (sc->mii_capabilities & BMSR_EXTSTAT)
Index: pci/if_msk.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_msk.c,v
retrieving revision 1.43
diff -u -p -r1.43 if_msk.c
--- pci/if_msk.c        3 Feb 2007 12:50:26 -0000       1.43
+++ pci/if_msk.c        3 Feb 2007 14:10:37 -0000
@@ -1071,6 +1071,14 @@ msk_attach(struct device *parent, struct
 
        ifp->if_capabilities = IFCAP_VLAN_MTU;
 
+       /* GMAC and GPHY Reset */
+       SK_IF_WRITE_4(sc_if, 0, SK_GMAC_CTRL, SK_GMAC_RESET_SET);
+       SK_IF_WRITE_4(sc_if, 0, SK_GPHY_CTRL, SK_GPHY_RESET_SET);
+       DELAY(1000);
+       SK_IF_WRITE_4(sc_if, 0, SK_GPHY_CTRL, SK_GPHY_RESET_CLEAR);
+       SK_IF_WRITE_4(sc_if, 0, SK_GMAC_CTRL, SK_GMAC_LOOP_OFF |
+                     SK_GMAC_PAUSE_ON | SK_GMAC_RESET_CLEAR);
+
        /*
         * Do miibus setup.
         */
@@ -1086,7 +1094,7 @@ msk_attach(struct device *parent, struct
        ifmedia_init(&sc_if->sk_mii.mii_media, 0,
            msk_ifmedia_upd, msk_ifmedia_sts);
        mii_attach(self, &sc_if->sk_mii, 0xffffffff, MII_PHY_ANY,
-           MII_OFFSET_ANY, MIIF_DOPAUSE|MIIF_FORCEANEG);
+           MII_OFFSET_ANY, MIIF_DOPAUSE|MIIF_HAVEFIBER);
        if (LIST_FIRST(&sc_if->sk_mii.mii_phys) == NULL) {
                printf("%s: no PHY found!\n", sc_if->sk_dev.dv_xname);
                ifmedia_add(&sc_if->sk_mii.mii_media, IFM_ETHER|IFM_MANUAL,
@@ -1275,6 +1283,8 @@ mskc_attach(struct device *parent, struc
                     sc->sk_ramsize, sc->sk_ramsize / 1024,
                     sc->sk_rboff));
 
+       printf("pmdtype: %c\n", sk_win_read_1(sc, SK_PMDTYPE));
+
        switch (sc->sk_type) {
        case SK_YUKON_XL:
                sc->sk_name = "Yukon-2 XL";
@@ -1838,6 +1848,7 @@ msk_init_yukon(struct sk_if_softc *sc_if
 
        DPRINTFN(6, ("msk_init_yukon: 1\n"));
 
+#if 0
        /* GMAC and GPHY Reset */
        SK_IF_WRITE_4(sc_if, 0, SK_GMAC_CTRL, SK_GMAC_RESET_SET);
        SK_IF_WRITE_4(sc_if, 0, SK_GPHY_CTRL, SK_GPHY_RESET_SET);
@@ -1848,6 +1859,7 @@ msk_init_yukon(struct sk_if_softc *sc_if
        SK_IF_WRITE_4(sc_if, 0, SK_GPHY_CTRL, SK_GPHY_RESET_CLEAR);
        SK_IF_WRITE_4(sc_if, 0, SK_GMAC_CTRL, SK_GMAC_LOOP_OFF |
                      SK_GMAC_PAUSE_ON | SK_GMAC_RESET_CLEAR);
+#endif
 
        DPRINTFN(3, ("msk_init_yukon: gmac_ctrl=%#x\n",
                     SK_IF_READ_4(sc_if, 0, SK_GMAC_CTRL)));

Reply via email to