summaryrefslogtreecommitdiffstats
path: root/sys/dev/sn/if_sn.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-08-15 17:20:34 +0000
committerimp <imp@FreeBSD.org>2005-08-15 17:20:34 +0000
commit7c7ecd44f1e31dc65e884f6db09be101ec65c9a6 (patch)
treec4595cea3f2c661ea25b9b0cc339a9e929f41eb1 /sys/dev/sn/if_sn.c
parente3eb852545c7f5143756c06dd425a23c0638c08f (diff)
downloadFreeBSD-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.
Diffstat (limited to 'sys/dev/sn/if_sn.c')
-rw-r--r--sys/dev/sn/if_sn.c8
1 files changed, 6 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.
OpenPOWER on IntegriCloud