Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sbni/if_sbni_pci.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
if (!sc->slave_sc) | if (!sc->slave_sc) | ||||
return (ENOMEM); | return (ENOMEM); | ||||
device_set_desc(dev, "Granch SBNI12/PCI Dual adapter"); | device_set_desc(dev, "Granch SBNI12/PCI Dual adapter"); | ||||
} else | } else | ||||
device_set_desc(dev, "Granch SBNI12/PCI adapter"); | device_set_desc(dev, "Granch SBNI12/PCI adapter"); | ||||
sc->io_rid = PCIR_BAR(0); | sc->io_rid = PCIR_BAR(0); | ||||
sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->io_rid, | sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->io_rid, | ||||
0ul, ~0ul, ports, RF_ACTIVE); | 0, ~0, ports, RF_ACTIVE); | ||||
if (!sc->io_res) { | if (!sc->io_res) { | ||||
device_printf(dev, "cannot allocate io ports!\n"); | device_printf(dev, "cannot allocate io ports!\n"); | ||||
if (sc->slave_sc) | if (sc->slave_sc) | ||||
free(sc->slave_sc, M_DEVBUF); | free(sc->slave_sc, M_DEVBUF); | ||||
return (ENOENT); | return (ENOENT); | ||||
} | } | ||||
if (sc->slave_sc) { | if (sc->slave_sc) { | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |