From 0ee7790b8fc63df37f28852fdc4327a58c6565b7 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 25 May 2008 16:23:59 +0000 Subject: Specify the PHY to be used in the kernel config instead of hardcoding it int tsec(4). --- sys/arch/socppc/dev/if_tsec.c | 5 +++-- sys/arch/socppc/dev/obio.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/arch/socppc/dev') diff --git a/sys/arch/socppc/dev/if_tsec.c b/sys/arch/socppc/dev/if_tsec.c index 0a987cda14f..a372c4819ed 100644 --- a/sys/arch/socppc/dev/if_tsec.c +++ b/sys/arch/socppc/dev/if_tsec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tsec.c,v 1.6 2008/05/25 15:25:30 kettenis Exp $ */ +/* $OpenBSD: if_tsec.c,v 1.7 2008/05/25 16:23:58 kettenis Exp $ */ /* * Copyright (c) 2008 Mark Kettenis @@ -360,7 +360,8 @@ tsec_attach(struct device *parent, struct device *self, void *aux) break; } - mii_attach(self, &sc->sc_mii, 0xffffffff, 17, MII_OFFSET_ANY, 0); + mii_attach(self, &sc->sc_mii, 0xffffffff, oa->oa_phy, + MII_OFFSET_ANY, 0); if (LIST_FIRST(&sc->sc_mii.mii_phys) == NULL) { printf("%s: no PHY found!\n", sc->sc_dev.dv_xname); ifmedia_add(&sc->sc_media, IFM_ETHER|IFM_MANUAL, 0, NULL); diff --git a/sys/arch/socppc/dev/obio.c b/sys/arch/socppc/dev/obio.c index 2afcb84f79d..1081e854ce0 100644 --- a/sys/arch/socppc/dev/obio.c +++ b/sys/arch/socppc/dev/obio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: obio.c,v 1.2 2008/05/17 15:49:05 kettenis Exp $ */ +/* $OpenBSD: obio.c,v 1.3 2008/05/25 16:23:58 kettenis Exp $ */ /* * Copyright (c) 2008 Mark Kettenis @@ -62,6 +62,7 @@ obio_search(struct device *parent, void *cfdata, void *aux) oa.oa_dmat = ma->ma_dmat; oa.oa_offset = cf->cf_offset; oa.oa_ivec = cf->cf_ivec; + oa.oa_phy = cf->cf_phy; oa.oa_name = cf->cf_driver->cd_name; config_found(parent, &oa, obio_print); -- cgit v1.2.3