Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ips/ips.c
Show First 20 Lines • Show All 281 Lines • ▼ Show 20 Lines | static int ips_diskdev_init(ips_softc_t *sc) | ||||
return 0; | return 0; | ||||
} | } | ||||
static int ips_diskdev_free(ips_softc_t *sc) | static int ips_diskdev_free(ips_softc_t *sc) | ||||
{ | { | ||||
int i; | int i; | ||||
int error = 0; | int error = 0; | ||||
for(i = 0; i < IPS_MAX_NUM_DRIVES; i++){ | for(i = 0; i < IPS_MAX_NUM_DRIVES; i++){ | ||||
if(sc->diskdev[i]) | if(sc->diskdev[i]) { | ||||
error = device_delete_child(sc->dev, sc->diskdev[i]); | error = device_delete_child(sc->dev, sc->diskdev[i]); | ||||
if(error) | if(error) | ||||
return error; | return error; | ||||
} | |||||
} | } | ||||
bus_generic_detach(sc->dev); | bus_generic_detach(sc->dev); | ||||
return 0; | return 0; | ||||
} | } | ||||
/* ips_timeout is periodically called to make sure no commands sent | /* ips_timeout is periodically called to make sure no commands sent | ||||
* to the card have become stuck. If it finds a stuck command, it | * to the card have become stuck. If it finds a stuck command, it | ||||
* sets a flag so the driver won't start any more commands and then | * sets a flag so the driver won't start any more commands and then | ||||
▲ Show 20 Lines • Show All 457 Lines • Show Last 20 Lines |