diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2005-08-28 02:46:14 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2005-08-28 02:46:14 +0000 |
commit | bcd34e4741dd6c386258fd1b3caa71dc4817f66d (patch) | |
tree | 09ac4122277327ac4757cca09276b911cac42ebe /sys/dev/usb/if_axe.c | |
parent | 4dbbdd0b53308a2ff83bcc9a5017eef2340cae83 (diff) |
We have to do some extra hand holding on link state change
on the AX88178 because of the external PHY.
ok dlg@ deraadt@
Diffstat (limited to 'sys/dev/usb/if_axe.c')
-rw-r--r-- | sys/dev/usb/if_axe.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index 3f4151a8ee1..1193ec012dd 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.32 2005/08/12 11:56:16 jsg Exp $ */ +/* $OpenBSD: if_axe.c,v 1.33 2005/08/28 02:46:12 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 @@ -330,9 +330,21 @@ axe_miibus_statchg(device_ptr_t dev) else val = 0; - if (sc->axe_flags & AX178) - val |= (AXE_178_MEDIA_RX_EN | AXE_178_MEDIA_MAGIC | - AXE_178_MEDIA_ENCK); + if (sc->axe_flags & AX178) { + val |= (AXE_178_MEDIA_RX_EN | AXE_178_MEDIA_MAGIC); + + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_1000_T: + val |= AXE_178_MEDIA_GMII | AXE_178_MEDIA_ENCK; + break; + case IFM_100_TX: + val |= AXE_178_MEDIA_100TX; + break; + case IFM_10_T: + /* doesn't need to be handled */ + break; + } + } DPRINTF(("axe_miibus_statchg: val=0x%x\n", val)); err = axe_cmd(sc, AXE_CMD_WRITE_MEDIA, 0, val, NULL); |