-/* $OpenBSD: if_xe.c,v 1.12 2000/04/24 19:43:36 niklas Exp $ */
+/* $OpenBSD: if_xe.c,v 1.13 2000/04/24 21:10:09 niklas Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist, C Stone, Job de Haas
sc->sc_mii.mii_readreg = xe_mdi_read;
sc->sc_mii.mii_writereg = xe_mdi_write;
sc->sc_mii.mii_statchg = xe_statchg;
- ifmedia_init(&sc->sc_mii.mii_media, 0, xe_mediachange,
+ ifmedia_init(&sc->sc_mii.mii_media, IFM_IMASK, xe_mediachange,
xe_mediastatus);
DPRINTF(XED_MII | XED_CONFIG,
("bmsr %x\n", xe_mdi_read(&sc->sc_dev, 0, 1)));
u_int32_t mask;
for (mask = 1 << (len - 1); mask; mask >>= 1)
- xe_mdi_pulse (sc, data & mask);
+ xe_mdi_pulse(sc, data & mask);
}
/* Read a PHY register. */
* such as IFF_PROMISC are handled.
*/
if (ifp->if_flags & IFF_UP) {
- xe_full_reset(sc);
xe_init(sc);
} else {
if (ifp->if_flags & IFF_RUNNING)
for (page = 0x50, num = arp->ac_multicnt; num > 0 && enm;
num--) {
if (bcmp(enm->enm_addrlo, enm->enm_addrhi,
- sizeof (enm->enm_addrlo)) != 0) {
+ sizeof(enm->enm_addrlo)) != 0) {
/*
* The multicast address is really a range;
* it's easier just to accept all multicasts.
}
void
-xe_cycle_power (sc)
+xe_cycle_power(sc)
struct xe_softc *sc;
{
bus_space_tag_t bst = sc->sc_bst;
}
void
-xe_full_reset (sc)
+xe_full_reset(sc)
struct xe_softc *sc;
{
bus_space_tag_t bst = sc->sc_bst;
bus_addr_t offset = sc->sc_offset;
/* Do an as extensive reset as possible on all functions. */
- xe_cycle_power (sc);
+ xe_cycle_power(sc);
bus_space_write_1(bst, bsh, offset + CR, SOFT_RESET);
DELAY(20000);
bus_space_write_1(bst, bsh, offset + CR, 0);
#ifdef XEDEBUG
void
-xe_reg_dump (sc)
+xe_reg_dump(sc)
struct xe_softc *sc;
{
int page, i;