Changeset View
Changeset View
Standalone View
Standalone View
head/sys/cam/cam_xpt.c
Show First 20 Lines • Show All 2,572 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
goto call_sim; | goto call_sim; | ||||
case XPT_ABORT: | case XPT_ABORT: | ||||
{ | { | ||||
union ccb* abort_ccb; | union ccb* abort_ccb; | ||||
abort_ccb = start_ccb->cab.abort_ccb; | abort_ccb = start_ccb->cab.abort_ccb; | ||||
if (XPT_FC_IS_DEV_QUEUED(abort_ccb)) { | if (XPT_FC_IS_DEV_QUEUED(abort_ccb)) { | ||||
if (abort_ccb->ccb_h.pinfo.index >= 0) { | |||||
struct cam_ccbq *ccbq; | |||||
struct cam_ed *device; | struct cam_ed *device; | ||||
struct cam_devq *devq; | |||||
device = abort_ccb->ccb_h.path->device; | device = abort_ccb->ccb_h.path->device; | ||||
ccbq = &device->ccbq; | devq = device->sim->devq; | ||||
cam_ccbq_remove_ccb(ccbq, abort_ccb); | |||||
mtx_lock(&devq->send_mtx); | |||||
if (abort_ccb->ccb_h.pinfo.index > 0) { | |||||
cam_ccbq_remove_ccb(&device->ccbq, abort_ccb); | |||||
abort_ccb->ccb_h.status = | abort_ccb->ccb_h.status = | ||||
CAM_REQ_ABORTED|CAM_DEV_QFRZN; | CAM_REQ_ABORTED|CAM_DEV_QFRZN; | ||||
xpt_freeze_devq(abort_ccb->ccb_h.path, 1); | xpt_freeze_devq_device(device, 1); | ||||
mtx_unlock(&devq->send_mtx); | |||||
xpt_done(abort_ccb); | xpt_done(abort_ccb); | ||||
start_ccb->ccb_h.status = CAM_REQ_CMP; | start_ccb->ccb_h.status = CAM_REQ_CMP; | ||||
break; | break; | ||||
} | } | ||||
mtx_unlock(&devq->send_mtx); | |||||
if (abort_ccb->ccb_h.pinfo.index == CAM_UNQUEUED_INDEX | if (abort_ccb->ccb_h.pinfo.index == CAM_UNQUEUED_INDEX | ||||
&& (abort_ccb->ccb_h.status & CAM_SIM_QUEUED) == 0) { | && (abort_ccb->ccb_h.status & CAM_SIM_QUEUED) == 0) { | ||||
/* | /* | ||||
* We've caught this ccb en route to | * We've caught this ccb en route to | ||||
* the SIM. Flag it for abort and the | * the SIM. Flag it for abort and the | ||||
* SIM will do so just before starting | * SIM will do so just before starting | ||||
* real work on the CCB. | * real work on the CCB. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 2,800 Lines • Show Last 20 Lines |