summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2006-11-17 19:34:35 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2006-11-17 19:34:35 +0000
commit98fe36637f5d0f41fc7e3ad7eb1fb84c82cb794d (patch)
treeaa2e8d507f670b09d6567af2d9508dd7bc86e74b /sys
parent4ac24938b682bf359920d8b998be6869a3266f13 (diff)
Remove code that deals with sk(4) specific phy's that breaks certain msk(4)
variants. tested by jsg@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_msk.c27
-rw-r--r--sys/dev/pci/if_mskvar.h6
2 files changed, 3 insertions, 30 deletions
diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c
index 78cc618f3ab..06ef68a428f 100644
--- a/sys/dev/pci/if_msk.c
+++ b/sys/dev/pci/if_msk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_msk.c,v 1.22 2006/11/16 03:25:45 brad Exp $ */
+/* $OpenBSD: if_msk.c,v 1.23 2006/11/17 19:34:34 kettenis Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -255,14 +255,6 @@ msk_marv_miibus_readreg(struct device *dev, int phy, int reg)
u_int16_t val;
int i;
- if (phy != 0 ||
- (sc_if->sk_phytype != SK_PHYTYPE_MARV_COPPER &&
- sc_if->sk_phytype != SK_PHYTYPE_MARV_FIBER)) {
- DPRINTFN(9, ("msk_marv_miibus_readreg (skip) phy=%d, reg=%#x\n",
- phy, reg));
- return (0);
- }
-
SK_YU_WRITE_2(sc_if, YUKON_SMICR, YU_SMICR_PHYAD(phy) |
YU_SMICR_REGAD(reg) | YU_SMICR_OP_READ);
@@ -977,23 +969,6 @@ msk_attach(struct device *parent, struct device *self, void *aux)
sc_if->sk_rx_ramstart, sc_if->sk_rx_ramend,
sc_if->sk_tx_ramstart, sc_if->sk_tx_ramend));
- /* Read and save PHY type */
- sc_if->sk_phytype = sk_win_read_1(sc, SK_EPROM1) & 0xF;
-
- /* Set PHY address */
- if ((sc_if->sk_phytype < SK_PHYTYPE_MARV_COPPER &&
- sc->sk_pmd != 'L' && sc->sk_pmd != 'S')) {
- /* not initialized, punt */
- sc_if->sk_phytype = SK_PHYTYPE_MARV_COPPER;
-
- sc->sk_coppertype = 1;
- }
-
- sc_if->sk_phyaddr = SK_PHYADDR_MARV;
-
- if (!(sc->sk_coppertype))
- sc_if->sk_phytype = SK_PHYTYPE_MARV_FIBER;
-
/* Allocate the descriptor queues. */
if (bus_dmamem_alloc(sc->sc_dmatag, sizeof(struct msk_ring_data),
PAGE_SIZE, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) {
diff --git a/sys/dev/pci/if_mskvar.h b/sys/dev/pci/if_mskvar.h
index 47caf713cf2..1f97ac4ca14 100644
--- a/sys/dev/pci/if_mskvar.h
+++ b/sys/dev/pci/if_mskvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mskvar.h,v 1.1 2006/08/16 21:06:23 kettenis Exp $ */
+/* $OpenBSD: if_mskvar.h,v 1.2 2006/11/17 19:34:34 kettenis Exp $ */
/* $NetBSD: if_skvar.h,v 1.6 2005/05/30 04:35:22 christos Exp $ */
/*-
@@ -33,7 +33,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-/* $OpenBSD: if_mskvar.h,v 1.1 2006/08/16 21:06:23 kettenis Exp $ */
+/* $OpenBSD: if_mskvar.h,v 1.2 2006/11/17 19:34:34 kettenis Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -220,8 +220,6 @@ struct sk_if_softc {
u_int32_t sk_rx_ramend;
u_int32_t sk_tx_ramstart;
u_int32_t sk_tx_ramend;
- u_int8_t sk_phytype;
- int sk_phyaddr;
int sk_cnt;
int sk_link;
struct timeout sk_tick_ch;