Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bhnd/siba/siba_bhndb.c
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
static struct bhnd_device bridge_devs[] = { | static struct bhnd_device bridge_devs[] = { | ||||
BHND_DEVICE(BCM, PCI, NULL, bridge_quirks), | BHND_DEVICE(BCM, PCI, NULL, bridge_quirks), | ||||
}; | }; | ||||
static int | static int | ||||
siba_bhndb_probe(device_t dev) | siba_bhndb_probe(device_t dev) | ||||
{ | { | ||||
const struct bhnd_chipid *cid; | const struct bhnd_chipid *cid; | ||||
int error; | |||||
/* Defer to default probe implementation */ | |||||
if ((error = siba_probe(dev)) > 0) | |||||
return (error); | |||||
/* Check bus type */ | /* Check bus type */ | ||||
cid = BHNDB_GET_CHIPID(device_get_parent(dev), dev); | cid = BHNDB_GET_CHIPID(device_get_parent(dev), dev); | ||||
if (cid->chip_type != BHND_CHIPTYPE_SIBA) | if (cid->chip_type != BHND_CHIPTYPE_SIBA) | ||||
return (ENXIO); | return (ENXIO); | ||||
/* Delegate to default probe implementation */ | /* Set device description */ | ||||
return (siba_probe(dev)); | bhnd_set_default_bus_desc(dev, cid); | ||||
return (error); | |||||
} | } | ||||
static int | static int | ||||
siba_bhndb_attach(device_t dev) | siba_bhndb_attach(device_t dev) | ||||
{ | { | ||||
struct siba_softc *sc; | struct siba_softc *sc; | ||||
const struct bhnd_chipid *chipid; | const struct bhnd_chipid *chipid; | ||||
int error; | int error; | ||||
▲ Show 20 Lines • Show All 189 Lines • Show Last 20 Lines |