Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/buslogic/bt.c
Show First 20 Lines • Show All 1,459 Lines • ▼ Show 20 Lines | if (ccb->ccb_h.status != CAM_REQ_INPROG) { | ||||
xpt_done(ccb); | xpt_done(ccb); | ||||
return; | return; | ||||
} | } | ||||
bccb->flags = BCCB_ACTIVE; | bccb->flags = BCCB_ACTIVE; | ||||
ccb->ccb_h.status |= CAM_SIM_QUEUED; | ccb->ccb_h.status |= CAM_SIM_QUEUED; | ||||
LIST_INSERT_HEAD(&bt->pending_ccbs, &ccb->ccb_h, sim_links.le); | LIST_INSERT_HEAD(&bt->pending_ccbs, &ccb->ccb_h, sim_links.le); | ||||
callout_reset(&bccb->timer, (ccb->ccb_h.timeout * hz) / 1000, | callout_reset_sbt(&bccb->timer, SBT_1MS * ccb->ccb_h.timeout, 0, | ||||
bttimeout, bccb); | bttimeout, bccb, 0); | ||||
/* Tell the adapter about this command */ | /* Tell the adapter about this command */ | ||||
bt->cur_outbox->ccb_addr = btccbvtop(bt, bccb); | bt->cur_outbox->ccb_addr = btccbvtop(bt, bccb); | ||||
if (bt->cur_outbox->action_code != BMBO_FREE) { | if (bt->cur_outbox->action_code != BMBO_FREE) { | ||||
/* | /* | ||||
* We should never encounter a busy mailbox. | * We should never encounter a busy mailbox. | ||||
* If we do, warn the user, and treat it as | * If we do, warn the user, and treat it as | ||||
* a resource shortage. If the controller is | * a resource shortage. If the controller is | ||||
▲ Show 20 Lines • Show All 117 Lines • ▼ Show 20 Lines | while (ccb_h != NULL) { | ||||
pending_bccb = (struct bt_ccb *)ccb_h->ccb_bccb_ptr; | pending_bccb = (struct bt_ccb *)ccb_h->ccb_bccb_ptr; | ||||
if (pending_bccb->hccb.target_id | if (pending_bccb->hccb.target_id | ||||
== bccb->hccb.target_id) { | == bccb->hccb.target_id) { | ||||
pending_bccb->hccb.btstat = BTSTAT_HA_BDR; | pending_bccb->hccb.btstat = BTSTAT_HA_BDR; | ||||
ccb_h = LIST_NEXT(ccb_h, sim_links.le); | ccb_h = LIST_NEXT(ccb_h, sim_links.le); | ||||
btdone(bt, pending_bccb, BMBI_ERROR); | btdone(bt, pending_bccb, BMBI_ERROR); | ||||
} else { | } else { | ||||
callout_reset(&pending_bccb->timer, | callout_reset_sbt(&pending_bccb->timer, | ||||
(ccb_h->timeout * hz) / 1000, | SBT_1MS * ccb_h->timeout, 0, bttimeout, | ||||
bttimeout, pending_bccb); | pending_bccb, 0); | ||||
ccb_h = LIST_NEXT(ccb_h, sim_links.le); | ccb_h = LIST_NEXT(ccb_h, sim_links.le); | ||||
} | } | ||||
} | } | ||||
device_printf(bt->dev, "No longer in timeout\n"); | device_printf(bt->dev, "No longer in timeout\n"); | ||||
return; | return; | ||||
} | } | ||||
callout_stop(&bccb->timer); | callout_stop(&bccb->timer); | ||||
▲ Show 20 Lines • Show All 780 Lines • Show Last 20 Lines |