diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-05-11 00:33:11 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-05-11 00:33:11 +0000 |
commit | 737c69e7cef1c09e677478fabb62749202916aa6 (patch) | |
tree | 0a43a4de45346990eca39820f92ed2d724a8d512 /sys/dev/pci | |
parent | 823197697d1f7163af7f7816a30d18a587445012 (diff) |
- Also match on Yukon LP's for the Lite rev A0 test.
- Do not call mii_pollstat() from within device tick routines; the status
information is updated by mii_tick().
- Take PHY out of reset for Yukon Lite rev A3. This resolves the
intermittent "no PHY found!" issue.
From FreeBSD
- Recognize some newer Yukon chipsets
ok krw@, tested by krw@ and a few others, mostly with LOM Lite A3's but
also with some other ASIC revs too.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_sk.c | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index 80d15dc640e..cd122efcce8 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sk.c,v 1.63 2005/04/25 17:55:51 brad Exp $ */ +/* $OpenBSD: if_sk.c,v 1.64 2005/05/11 00:33:10 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1582,23 +1582,32 @@ skc_attach(struct device *parent, struct device *self, void *aux) /* Marvell Yukon VPD's can freqently be bogus */ switch (sc->sk_type) { case SK_GENESIS: - sc->sk_name = sc->sk_vpd_prodname; + sc->sk_name = "SysKonnect GEnesis"; break; case SK_YUKON: - sc->sk_name = "Marvell Yukon Gigabit Ethernet"; + sc->sk_name = "Marvell Yukon"; break; case SK_YUKON_LITE: - sc->sk_name = "Marvell Yukon Lite Gigabit Ethernet"; + sc->sk_name = "Marvell Yukon Lite"; break; case SK_YUKON_LP: - sc->sk_name = "Marvell Yukon LP Gigabit Ethernet"; + sc->sk_name = "Marvell Yukon LP"; + break; + case SK_YUKON_XL: + sc->sk_name = "Marvell Yukon-2 XL"; + break; + case SK_YUKON_EC: + sc->sk_name = "Marvell Yukon-2 EC"; + break; + case SK_YUKON_FE: + sc->sk_name = "Marvell Yukon-2 FE"; break; default: - sc->sk_name = "Marvell Yukon (Unknown) Gigabit Ethernet"; + sc->sk_name = "Marvell Yukon (Unknown)"; } /* Yukon Lite Rev A0 needs special test, from sk98lin driver */ - if (sc->sk_type == SK_YUKON) { + if (sc->sk_type == SK_YUKON || sc->sk_type == SK_YUKON_LP) { uint32_t flashaddr; uint8_t testbyte; @@ -2078,7 +2087,6 @@ sk_tick(void *xsc_if) SK_XM_CLRBIT_2(sc_if, XM_IMR, XM_IMR_GP0_SET); SK_XM_READ_2(sc_if, XM_ISR); mii_tick(mii); - mii_pollstat(mii); timeout_del(&sc_if->sk_tick_ch); } @@ -2125,7 +2133,6 @@ sk_intr_bcom(struct sk_if_softc *sc_if) SK_IF_WRITE_1(sc_if, 0, SK_LINKLED1_CTL, SK_LINKLED_ON|SK_LINKLED_LINKSYNC_OFF| SK_LINKLED_BLINK_OFF); - mii_pollstat(mii); } else { mii_tick(mii); timeout_add(&sc_if->sk_tick_ch, hz); @@ -2423,11 +2430,21 @@ void sk_init_yukon(sc_if) { u_int32_t phy; u_int16_t reg; + struct sk_softc *sc; int i; + sc = sc_if->sk_softc; + DPRINTFN(2, ("sk_init_yukon: start: sk_csr=%#x\n", CSR_READ_4(sc_if->sk_softc, SK_CSR))); + if (sc->sk_type == SK_YUKON_LITE && + sc->sk_rev >= SK_YUKON_LITE_REV_A3) { + /* Take PHY out of reset. */ + sk_win_write_4(sc, SK_GPIO, + (sk_win_read_4(sc, SK_GPIO) | SK_GPIO_DIR9) & ~SK_GPIO_DAT9); + } + /* GMAC and GPHY Reset */ SK_IF_WRITE_4(sc_if, 0, SK_GPHY_CTRL, SK_GPHY_RESET_SET); @@ -2439,7 +2456,6 @@ void sk_init_yukon(sc_if) SK_IF_WRITE_4(sc_if, 0, SK_GMAC_CTRL, SK_GMAC_RESET_SET); DELAY(1000); - DPRINTFN(6, ("sk_init_yukon: 2\n")); phy = SK_GPHY_INT_POL_HI | SK_GPHY_DIS_FC | SK_GPHY_DIS_SLEEP | |