Diff reduction to my tree: commit the trivial part of efforts to add

support for the really old Megahertz ethernet/modem combo cards.
This commit is contained in:
Warner Losh 2005-08-15 17:20:34 +00:00
parent 8cc5eb98ad
commit dfad9073ad
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149095
2 changed files with 8 additions and 2 deletions

View file

@ -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.

View file

@ -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);