diff options
author | imp <imp@FreeBSD.org> | 2005-08-15 17:20:34 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-08-15 17:20:34 +0000 |
commit | 7c7ecd44f1e31dc65e884f6db09be101ec65c9a6 (patch) | |
tree | c4595cea3f2c661ea25b9b0cc339a9e929f41eb1 | |
parent | e3eb852545c7f5143756c06dd425a23c0638c08f (diff) | |
download | FreeBSD-src-7c7ecd44f1e31dc65e884f6db09be101ec65c9a6.zip FreeBSD-src-7c7ecd44f1e31dc65e884f6db09be101ec65c9a6.tar.gz |
Diff reduction to my tree: commit the trivial part of efforts to add
support for the really old Megahertz ethernet/modem combo cards.
-rw-r--r-- | sys/dev/sn/if_sn.c | 8 | ||||
-rw-r--r-- | sys/dev/sn/if_snvar.h | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/sn/if_sn.c b/sys/dev/sn/if_sn.c index 6524eb0..51b818fd 100644 --- a/sys/dev/sn/if_sn.c +++ b/sys/dev/sn/if_sn.c @@ -180,7 +180,7 @@ sn_attach(device_t dev) if (chip_ids[rev]) device_printf(dev, " %s ", chip_ids[rev]); else - device_printf(dev, " unsupported chip"); + device_printf(dev, " unsupported chip: rev %d ", rev); SMC_SELECT_BANK(sc, 1); i = CSR_READ_2(sc, CONFIG_REG_W); printf("%s\n", i & CR_AUI_SELECT ? "AUI" : "UTP"); @@ -1248,6 +1248,10 @@ sn_deactivate(device_t dev) bus_release_resource(dev, SYS_RES_IOPORT, sc->port_rid, sc->port_res); sc->port_res = 0; + if (sc->modem_res) + bus_release_resource(dev, SYS_RES_IOPORT, sc->modem_rid, + sc->modem_res); + sc->modem_res = 0; if (sc->irq_res) bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq_res); @@ -1256,7 +1260,7 @@ sn_deactivate(device_t dev) } /* - * Function: sn_probe( device_t dev) + * Function: sn_probe(device_t dev) * * Purpose: * Tests to see if a given ioaddr points to an SMC9xxx chip. diff --git a/sys/dev/sn/if_snvar.h b/sys/dev/sn/if_snvar.h index ecab2d3..2ff41b6 100644 --- a/sys/dev/sn/if_snvar.h +++ b/sys/dev/sn/if_snvar.h @@ -43,6 +43,8 @@ struct sn_softc { int irq_rid; struct resource *port_res; int port_rid; + struct resource *modem_res; /* Extra resource for modem */ + int modem_rid; }; int sn_probe(device_t); |