Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/cam_xpt.c
Show First 20 Lines • Show All 4,621 Lines • ▼ Show 20 Lines | #endif | ||||
hash = (u_int)(done_ccb->ccb_h.path_id + done_ccb->ccb_h.target_id + | hash = (u_int)(done_ccb->ccb_h.path_id + done_ccb->ccb_h.target_id + | ||||
done_ccb->ccb_h.target_lun) % cam_num_doneqs; | done_ccb->ccb_h.target_lun) % cam_num_doneqs; | ||||
queue = &cam_doneqs[hash]; | queue = &cam_doneqs[hash]; | ||||
mtx_lock(&queue->cam_doneq_mtx); | mtx_lock(&queue->cam_doneq_mtx); | ||||
run = (queue->cam_doneq_sleep && STAILQ_EMPTY(&queue->cam_doneq)); | run = (queue->cam_doneq_sleep && STAILQ_EMPTY(&queue->cam_doneq)); | ||||
STAILQ_INSERT_TAIL(&queue->cam_doneq, &done_ccb->ccb_h, sim_links.stqe); | STAILQ_INSERT_TAIL(&queue->cam_doneq, &done_ccb->ccb_h, sim_links.stqe); | ||||
done_ccb->ccb_h.pinfo.index = CAM_DONEQ_INDEX; | done_ccb->ccb_h.pinfo.index = CAM_DONEQ_INDEX; | ||||
mtx_unlock(&queue->cam_doneq_mtx); | mtx_unlock(&queue->cam_doneq_mtx); | ||||
if (run) | if (run && !dumping) | ||||
wakeup(&queue->cam_doneq); | wakeup(&queue->cam_doneq); | ||||
} | } | ||||
void | void | ||||
xpt_done_direct(union ccb *done_ccb) | xpt_done_direct(union ccb *done_ccb) | ||||
{ | { | ||||
CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, | CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, | ||||
▲ Show 20 Lines • Show All 1,021 Lines • Show Last 20 Lines |