Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/cam_periph.c
Context not available. | |||||
*/ | */ | ||||
if ((periph = cam_periph_find(path, name)) != NULL) { | if ((periph = cam_periph_find(path, name)) != NULL) { | ||||
if (periph->periph_status != NULL) | |||||
periph->periph_status(periph); | |||||
if ((periph->flags & CAM_PERIPH_INVALID) != 0 | if ((periph->flags & CAM_PERIPH_INVALID) != 0 | ||||
&& (periph->flags & CAM_PERIPH_NEW_DEV_FOUND) == 0) { | && (periph->flags & CAM_PERIPH_NEW_DEV_FOUND) == 0) { | ||||
periph->flags |= CAM_PERIPH_NEW_DEV_FOUND; | periph->flags |= CAM_PERIPH_NEW_DEV_FOUND; | ||||
periph->deferred_callback = ac_callback; | periph->deferred_callback = ac_callback; | ||||
periph->deferred_ac = code; | periph->deferred_ac = code; | ||||
return (CAM_REQ_INPROG); | return (CAM_REQ_INPROG); | ||||
} else if ((periph->flags & CAM_PERIPH_INVALID) | |||||
&& (periph->flags & CAM_PERIPH_NEW_DEV_FOUND)) { | |||||
printf("%s: attempt to re-allocate " | |||||
"invalid device %s%d with new device already " | |||||
"found rejected flags %#x refcount %d\n", | |||||
__func__, periph->periph_name, | |||||
periph->unit_number, periph->flags, | |||||
periph->refcount); | |||||
} else { | } else { | ||||
printf("cam_periph_alloc: attempt to re-allocate " | printf("%s: attempt to re-allocate " | ||||
"valid device %s%d rejected flags %#x " | "valid device %s%d rejected flags %#x " | ||||
"refcount %d\n", periph->periph_name, | "refcount %d\n", __func__, periph->periph_name, | ||||
periph->unit_number, periph->flags, | periph->unit_number, periph->flags, | ||||
periph->refcount); | periph->refcount); | ||||
} | } | ||||
return (CAM_REQ_INVALID); | return (CAM_REQ_INVALID); | ||||
} | } | ||||
Context not available. |