From dfad9073add154f5105a5d56dfc071fe7ec0ebc1 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 15 Aug 2005 17:20:34 +0000 Subject: [PATCH] Diff reduction to my tree: commit the trivial part of efforts to add support for the really old Megahertz ethernet/modem combo cards. --- sys/dev/sn/if_sn.c | 8 ++++++-- 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 6524eb0593ed..51b818fd60bb 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 ecab2d3051de..2ff41b6a28cb 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);