Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mpr/mpr_sas.c
| Show First 20 Lines • Show All 814 Lines • ▼ Show 20 Lines | mpr_attach_sas(struct mpr_softc *sc) | ||||
| * Assume that discovery events will start right away. | * Assume that discovery events will start right away. | ||||
| * | * | ||||
| * Hold off boot until discovery is complete. | * Hold off boot until discovery is complete. | ||||
| */ | */ | ||||
| sassc->flags |= MPRSAS_IN_STARTUP | MPRSAS_IN_DISCOVERY; | sassc->flags |= MPRSAS_IN_STARTUP | MPRSAS_IN_DISCOVERY; | ||||
| sc->sassc->startup_refcount = 0; | sc->sassc->startup_refcount = 0; | ||||
| mprsas_startup_increment(sassc); | mprsas_startup_increment(sassc); | ||||
| callout_init(&sassc->discovery_callout, 1 /*mpsafe*/); | |||||
| mpr_unlock(sc); | mpr_unlock(sc); | ||||
| /* | /* | ||||
| * Register for async events so we can determine the EEDP | * Register for async events so we can determine the EEDP | ||||
| * capabilities of devices. | * capabilities of devices. | ||||
| */ | */ | ||||
| status = xpt_create_path(&sassc->path, /*periph*/NULL, | status = xpt_create_path(&sassc->path, /*periph*/NULL, | ||||
| cam_sim_path(sc->sassc->sim), CAM_TARGET_WILDCARD, | cam_sim_path(sc->sassc->sim), CAM_TARGET_WILDCARD, | ||||
| ▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| void | void | ||||
| mprsas_discovery_end(struct mprsas_softc *sassc) | mprsas_discovery_end(struct mprsas_softc *sassc) | ||||
| { | { | ||||
| struct mpr_softc *sc = sassc->sc; | struct mpr_softc *sc = sassc->sc; | ||||
| MPR_FUNCTRACE(sc); | MPR_FUNCTRACE(sc); | ||||
| if (sassc->flags & MPRSAS_DISCOVERY_TIMEOUT_PENDING) | |||||
| callout_stop(&sassc->discovery_callout); | |||||
| /* | /* | ||||
| * After discovery has completed, check the mapping table for any | * After discovery has completed, check the mapping table for any | ||||
| * missing devices and update their missing counts. Only do this once | * missing devices and update their missing counts. Only do this once | ||||
| * whenever the driver is initialized so that missing counts aren't | * whenever the driver is initialized so that missing counts aren't | ||||
| * updated unnecessarily. Note that just because discovery has | * updated unnecessarily. Note that just because discovery has | ||||
| * completed doesn't mean that events have been processed yet. The | * completed doesn't mean that events have been processed yet. The | ||||
| * check_devices function is a callout timer that checks if ALL devices | * check_devices function is a callout timer that checks if ALL devices | ||||
| ▲ Show 20 Lines • Show All 2,649 Lines • Show Last 20 Lines | |||||