diff options
author | imp <imp@FreeBSD.org> | 2005-07-06 15:59:47 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-07-06 15:59:47 +0000 |
commit | 3ce1794e273a700b5d0f2299e28c97c3dc0f00ae (patch) | |
tree | 358b2cbda7d87cb81d1f31929c53b9d4b2f48f3a /sys/dev/sn/if_sn_isa.c | |
parent | 355ca1404257ece92522fc8b8bf373af001912d8 (diff) | |
download | FreeBSD-src-3ce1794e273a700b5d0f2299e28c97c3dc0f00ae.zip FreeBSD-src-3ce1794e273a700b5d0f2299e28c97c3dc0f00ae.tar.gz |
Add support for Farallon EtherMAC PC Card.
Move ethernet MAC address setting into pccard attachment
Fix panic from IFP2ENADDR() use prior to if_alloc
Remove OLDCARD compat support. This should work still on oldcard, however.
sn_attach now requires that the resources be activated now, so adjust.
Approved by: re (scottl)
Diffstat (limited to 'sys/dev/sn/if_sn_isa.c')
-rw-r--r-- | sys/dev/sn/if_sn_isa.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/sys/dev/sn/if_sn_isa.c b/sys/dev/sn/if_sn_isa.c index 7907f7447..eb7bda7 100644 --- a/sys/dev/sn/if_sn_isa.c +++ b/sys/dev/sn/if_sn_isa.c @@ -45,15 +45,15 @@ __FBSDID("$FreeBSD$"); #include <dev/sn/if_snvar.h> -static int sn_isa_probe (device_t); -static int sn_isa_attach (device_t); +static int sn_isa_probe(device_t); +static int sn_isa_attach(device_t); static int sn_isa_probe (device_t dev) { if (isa_get_logicalid(dev)) /* skip PnP probes */ return (ENXIO); - if (sn_probe(dev, 0) != 0) + if (sn_probe(dev) != 0) return (ENXIO); return (0); } @@ -62,9 +62,18 @@ static int sn_isa_attach (device_t dev) { struct sn_softc *sc = device_get_softc(dev); - - sc->pccard_enaddr = 0; - return (sn_attach(dev)); + int err; + + sc->dev = dev; + err = sn_activate(dev); + if (err) { + sn_deactivate(dev); + return (err); + } + err = sn_attach(dev); + if (err) + sn_deactivate(dev); + return (err); } static device_method_t sn_isa_methods[] = { |