Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/advansys/advansys.c
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | if ((cinfo->state & ACCB_RECOVERY_CCB) != 0) { | ||||
/* | /* | ||||
* We now traverse our list of pending CCBs | * We now traverse our list of pending CCBs | ||||
* and reinstate their timeouts. | * and reinstate their timeouts. | ||||
*/ | */ | ||||
ccb_h = LIST_FIRST(&adv->pending_ccbs); | ccb_h = LIST_FIRST(&adv->pending_ccbs); | ||||
while (ccb_h != NULL) { | while (ccb_h != NULL) { | ||||
cinfo = ccb_h->ccb_cinfo_ptr; | cinfo = ccb_h->ccb_cinfo_ptr; | ||||
callout_reset(&cinfo->timer, | callout_reset_sbt(&cinfo->timer, | ||||
ccb_h->timeout * hz / 1000, adv_timeout, | SBT_1MS * ccb_h->timeout, 0, | ||||
ccb_h); | adv_timeout, ccb_h, 0); | ||||
ccb_h = LIST_NEXT(ccb_h, sim_links.le); | ccb_h = LIST_NEXT(ccb_h, sim_links.le); | ||||
} | } | ||||
adv->state &= ~ADV_IN_TIMEOUT; | adv->state &= ~ADV_IN_TIMEOUT; | ||||
device_printf(adv->dev, "No longer in timeout\n"); | device_printf(adv->dev, "No longer in timeout\n"); | ||||
} | } | ||||
} | } | ||||
if (adv->state == 0) | if (adv->state == 0) | ||||
ccb->ccb_h.status |= CAM_RELEASE_SIMQ; | ccb->ccb_h.status |= CAM_RELEASE_SIMQ; | ||||
▲ Show 20 Lines • Show All 382 Lines • ▼ Show 20 Lines | if (adv_execute_scsi_queue(adv, &scsiq, csio->dxfer_len) != 0) { | ||||
adv_free_ccb_info(adv, cinfo); | adv_free_ccb_info(adv, cinfo); | ||||
xpt_done((union ccb *)csio); | xpt_done((union ccb *)csio); | ||||
return; | return; | ||||
} | } | ||||
cinfo->state |= ACCB_ACTIVE; | cinfo->state |= ACCB_ACTIVE; | ||||
ccb_h->status |= CAM_SIM_QUEUED; | ccb_h->status |= CAM_SIM_QUEUED; | ||||
LIST_INSERT_HEAD(&adv->pending_ccbs, ccb_h, sim_links.le); | LIST_INSERT_HEAD(&adv->pending_ccbs, ccb_h, sim_links.le); | ||||
/* Schedule our timeout */ | /* Schedule our timeout */ | ||||
callout_reset(&cinfo->timer, ccb_h->timeout * hz /1000, adv_timeout, | callout_reset_sbt(&cinfo->timer, SBT_1MS * ccb_h->timeout, 0, | ||||
csio); | adv_timeout, csio, 0); | ||||
} | } | ||||
static struct adv_ccb_info * | static struct adv_ccb_info * | ||||
adv_alloc_ccb_info(struct adv_softc *adv) | adv_alloc_ccb_info(struct adv_softc *adv) | ||||
{ | { | ||||
int error; | int error; | ||||
struct adv_ccb_info *cinfo; | struct adv_ccb_info *cinfo; | ||||
▲ Show 20 Lines • Show All 828 Lines • Show Last 20 Lines |