diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2004-11-11 12:58:46 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2004-11-11 12:58:46 +0000 |
commit | d821df585fd0c20a857d6f279f84a14e61e81ebb (patch) | |
tree | 1d5121f04a9fdc84a85863b61d88236e0cff6080 /sys/dev/usb/if_axe.c | |
parent | 54165f7e5c330786b8090977c3315b41d4c03bf6 (diff) |
the other half of the changes from netbsds if_axe.c revision 1.5:
Set full duplex mode when status tells us to.
Diffstat (limited to 'sys/dev/usb/if_axe.c')
-rw-r--r-- | sys/dev/usb/if_axe.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index 7806ca5ee98..0d0c3e3234d 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_axe.c,v 1.18 2004/11/11 12:57:19 dlg Exp $ */ +/* $OpenBSD: if_axe.c,v 1.19 2004/11/11 12:58:45 dlg Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 @@ -312,12 +312,20 @@ axe_miibus_writereg(device_ptr_t dev, int phy, int reg, int val) Static void axe_miibus_statchg(device_ptr_t dev) { -#ifdef notdef struct axe_softc *sc = USBGETSOFTC(dev); struct mii_data *mii = GET_MII(sc); -#endif - /* doesn't seem to be necessary */ - return; + int val, err; + + if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX) + val = AXE_MEDIA_FULL_DUPLEX; + else + val = 0; + DPRINTF(("axe_miibus_statchg: val=0x%x\n", val)); + err = axe_cmd(sc, AXE_CMD_WRITE_MEDIA, 0, val, NULL); + if (err) { + printf("%s: media change failed\n", USBDEVNAME(sc->axe_dev)); + return; + } } /* |