Symbol: scb
lib/librpcsec_gss/svc_rpcsec_gss.c
169
struct svc_rpc_gss_callback *scb;
lib/librpcsec_gss/svc_rpcsec_gss.c
171
scb = mem_alloc(sizeof(struct svc_rpc_gss_callback));
lib/librpcsec_gss/svc_rpcsec_gss.c
172
if (!scb) {
lib/librpcsec_gss/svc_rpcsec_gss.c
176
scb->cb_callback = *cb;
lib/librpcsec_gss/svc_rpcsec_gss.c
177
SLIST_INSERT_HEAD(&svc_rpc_gss_callbacks, scb, cb_link);
lib/librpcsec_gss/svc_rpcsec_gss.c
837
struct svc_rpc_gss_callback *scb;
lib/librpcsec_gss/svc_rpcsec_gss.c
847
SLIST_FOREACH(scb, &svc_rpc_gss_callbacks, cb_link) {
lib/librpcsec_gss/svc_rpcsec_gss.c
848
if (scb->cb_callback.program == rqst->rq_prog
lib/librpcsec_gss/svc_rpcsec_gss.c
849
&& scb->cb_callback.version == rqst->rq_vers) {
lib/librpcsec_gss/svc_rpcsec_gss.c
856
cb_res = scb->cb_callback.callback(rqst,
sys/dev/aic7xxx/aic79xx.c
10018
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
10027
LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
sys/dev/aic7xxx/aic79xx.c
10030
ccbh = &scb->io_ctx->ccb_h;
sys/dev/aic7xxx/aic79xx.c
1009
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
1013
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
1014
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
1020
ahd_outq(ahd, HADDR, scb->sense_busaddr);
sys/dev/aic7xxx/aic79xx.c
1050
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
1066
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
1067
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
1075
ahd_compile_devinfo(&devinfo, SCB_GET_OUR_ID(scb),
sys/dev/aic7xxx/aic79xx.c
1076
SCB_GET_TARGET(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
1077
SCB_GET_LUN(scb),
sys/dev/aic7xxx/aic79xx.c
1078
SCB_GET_CHANNEL(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
1097
scb->hscb->control &= ~(TAG_ENB|SCB_TAG_TYPE);
sys/dev/aic7xxx/aic79xx.c
1098
scb->hscb->control |= MK_MESSAGE;
sys/dev/aic7xxx/aic79xx.c
1099
ahd_outb(ahd, SCB_CONTROL, scb->hscb->control);
sys/dev/aic7xxx/aic79xx.c
1101
ahd_outb(ahd, SAVED_SCSIID, scb->hscb->scsiid);
sys/dev/aic7xxx/aic79xx.c
1109
scb->flags &= ~SCB_PACKETIZED;
sys/dev/aic7xxx/aic79xx.c
1110
scb->flags |= SCB_ABORT|SCB_CMDPHASE_ABORT;
sys/dev/aic7xxx/aic79xx.c
1111
ahd_freeze_devq(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
1112
aic_set_transaction_status(scb, CAM_REQUEUE_REQ);
sys/dev/aic7xxx/aic79xx.c
1113
aic_freeze_scb(scb);
sys/dev/aic7xxx/aic79xx.c
1126
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
1139
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
1149
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/aic7xxx/aic79xx.c
1150
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
1206
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
1227
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/aic7xxx/aic79xx.c
1232
scb);
sys/dev/aic7xxx/aic79xx.c
1249
scb);
sys/dev/aic7xxx/aic79xx.c
134
struct scb *scb);
sys/dev/aic7xxx/aic79xx.c
1345
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
1352
scb = ahd_lookup_scb(ahd, scbindex);
sys/dev/aic7xxx/aic79xx.c
1356
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
1359
SCB_GET_TAG(scb));
sys/dev/aic7xxx/aic79xx.c
1360
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
1365
aic_get_transfer_length(scb), scb->sg_count);
sys/dev/aic7xxx/aic79xx.c
1366
ahd_dump_sglist(scb);
sys/dev/aic7xxx/aic79xx.c
137
struct scb *scb);
sys/dev/aic7xxx/aic79xx.c
1374
ahd_freeze_devq(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
1375
aic_set_transaction_status(scb, CAM_DATA_RUN_ERR);
sys/dev/aic7xxx/aic79xx.c
1376
aic_freeze_scb(scb);
sys/dev/aic7xxx/aic79xx.c
1382
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
1390
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
1392
if (scb != NULL
sys/dev/aic7xxx/aic79xx.c
1393
&& (scb->flags & SCB_RECOVERY_SCB) != 0)
sys/dev/aic7xxx/aic79xx.c
1398
ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
1399
SCB_GET_CHANNEL(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
1400
SCB_GET_LUN(scb), SCB_GET_TAG(scb),
sys/dev/aic7xxx/aic79xx.c
1410
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
1413
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
1414
if (scb != NULL) {
sys/dev/aic7xxx/aic79xx.c
1419
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
1421
scb->hscb->task_management);
sys/dev/aic7xxx/aic79xx.c
1425
switch (scb->hscb->task_management) {
sys/dev/aic7xxx/aic79xx.c
1427
tag = SCB_GET_TAG(scb);
sys/dev/aic7xxx/aic79xx.c
1430
lun = scb->hscb->lun;
sys/dev/aic7xxx/aic79xx.c
1432
ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
1437
lun = scb->hscb->lun;
sys/dev/aic7xxx/aic79xx.c
1442
ahd_scb_devinfo(ahd, &devinfo, scb);
sys/dev/aic7xxx/aic79xx.c
1462
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
1469
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
1470
if (scb != NULL) {
sys/dev/aic7xxx/aic79xx.c
1475
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
1489
ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
1490
SCB_GET_CHANNEL(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
1491
SCB_GET_LUN(scb), SCB_GET_TAG(scb),
sys/dev/aic7xxx/aic79xx.c
1525
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
1552
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
1553
if (scb != NULL
sys/dev/aic7xxx/aic79xx.c
1555
scb = NULL;
sys/dev/aic7xxx/aic79xx.c
1616
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
1617
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
1627
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
1632
ahd_scb_devinfo(ahd, &devinfo, scb);
sys/dev/aic7xxx/aic79xx.c
1633
aic_set_transaction_status(scb, CAM_SEL_TIMEOUT);
sys/dev/aic7xxx/aic79xx.c
1634
ahd_freeze_devq(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
1703
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
1709
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
1710
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
1717
packetized = (scb->flags & SCB_PACKETIZED) != 0;
sys/dev/aic7xxx/aic79xx.c
173
struct scb *scb);
sys/dev/aic7xxx/aic79xx.c
1797
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
1807
scb = NULL;
sys/dev/aic7xxx/aic79xx.c
1846
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
1847
if (scb != NULL && SCB_IS_SILENT(scb))
sys/dev/aic7xxx/aic79xx.c
186
struct scb *scb, u_int col_idx);
sys/dev/aic7xxx/aic79xx.c
188
struct scb *scb);
sys/dev/aic7xxx/aic79xx.c
191
struct scb *prev_scb,
sys/dev/aic7xxx/aic79xx.c
192
struct scb *scb);
sys/dev/aic7xxx/aic79xx.c
1945
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
1977
if (scb != NULL && msg_out == MSG_INITIATOR_DET_ERR)
sys/dev/aic7xxx/aic79xx.c
1978
scb->flags |= SCB_TRANSMISSION_ERROR;
sys/dev/aic7xxx/aic79xx.c
2038
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
2062
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
2063
if (scb == NULL)
sys/dev/aic7xxx/aic79xx.c
2103
if (scb->crc_retry_count < AHD_MAX_LQ_CRC_ERRORS) {
sys/dev/aic7xxx/aic79xx.c
2104
if (SCB_IS_SILENT(scb) == FALSE) {
sys/dev/aic7xxx/aic79xx.c
2105
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2110
scb->crc_retry_count++;
sys/dev/aic7xxx/aic79xx.c
2112
aic_set_transaction_status(scb, CAM_UNCOR_PARITY);
sys/dev/aic7xxx/aic79xx.c
2113
aic_freeze_scb(scb);
sys/dev/aic7xxx/aic79xx.c
2114
ahd_freeze_devq(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2138
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
2141
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
2142
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2146
ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb), 'A',
sys/dev/aic7xxx/aic79xx.c
2147
SCB_GET_LUN(scb), SCB_GET_TAG(scb),
sys/dev/aic7xxx/aic79xx.c
2167
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
2192
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
2193
if (scb != NULL
sys/dev/aic7xxx/aic79xx.c
2195
scb = NULL;
sys/dev/aic7xxx/aic79xx.c
2207
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
2215
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2217
SCB_GET_TAG(scb),
sys/dev/aic7xxx/aic79xx.c
2221
tag = SCB_GET_TAG(scb);
sys/dev/aic7xxx/aic79xx.c
2223
if ((scb->flags & SCB_CMDPHASE_ABORT) != 0) {
sys/dev/aic7xxx/aic79xx.c
223
struct scb *scb,
sys/dev/aic7xxx/aic79xx.c
2236
tag = SCB_GET_TAG(scb);
sys/dev/aic7xxx/aic79xx.c
2237
saved_lun = scb->hscb->lun;
sys/dev/aic7xxx/aic79xx.c
224
struct scb *other_scb);
sys/dev/aic7xxx/aic79xx.c
2251
if (scb != NULL
sys/dev/aic7xxx/aic79xx.c
2252
&& scb->io_ctx->ccb_h.func_code== XPT_RESET_DEV
sys/dev/aic7xxx/aic79xx.c
2253
&& ahd_match_scb(ahd, scb, target, 'A',
sys/dev/aic7xxx/aic79xx.c
2256
aic_set_transaction_status(scb, CAM_REQ_CMP);
sys/dev/aic7xxx/aic79xx.c
226
struct scb *scb);
sys/dev/aic7xxx/aic79xx.c
228
struct scb *scb);
sys/dev/aic7xxx/aic79xx.c
2307
ahd_freeze_devq(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2308
ahd_qinfifo_requeue_tail(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2330
ahd_freeze_devq(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2331
ahd_qinfifo_requeue_tail(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2353
ahd_freeze_devq(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2354
ahd_qinfifo_requeue_tail(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2383
ahd_freeze_devq(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2384
aic_set_transaction_status(scb, CAM_REQUEUE_REQ);
sys/dev/aic7xxx/aic79xx.c
2385
aic_freeze_scb(scb);
sys/dev/aic7xxx/aic79xx.c
2387
ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
2388
SCB_GET_CHANNEL(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
2389
SCB_GET_LUN(scb), SCB_LIST_NULL,
sys/dev/aic7xxx/aic79xx.c
2396
ahd_done(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2404
if (scb != NULL) {
sys/dev/aic7xxx/aic79xx.c
2407
if ((scb->hscb->control & TAG_ENB) != 0)
sys/dev/aic7xxx/aic79xx.c
2408
tag = SCB_GET_TAG(scb);
sys/dev/aic7xxx/aic79xx.c
2411
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2413
SCB_GET_LUN(scb), tag,
sys/dev/aic7xxx/aic79xx.c
2441
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
2450
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
2464
scb = NULL;
sys/dev/aic7xxx/aic79xx.c
2465
} else if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
2475
aic_set_transaction_status(scb, CAM_SEQUENCE_FAIL);
sys/dev/aic7xxx/aic79xx.c
2477
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2489
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2492
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2521
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
2528
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
2529
scb->flags |= SCB_ABORT;
sys/dev/aic7xxx/aic79xx.c
2718
ahd_print_scb(struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
2723
hscb = scb->hscb;
sys/dev/aic7xxx/aic79xx.c
2725
(void *)scb,
sys/dev/aic7xxx/aic79xx.c
2738
SCB_GET_TAG(scb));
sys/dev/aic7xxx/aic79xx.c
2739
ahd_dump_sglist(scb);
sys/dev/aic7xxx/aic79xx.c
2743
ahd_dump_sglist(struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
2747
if (scb->sg_count > 0) {
sys/dev/aic7xxx/aic79xx.c
2748
if ((scb->ahd_softc->flags & AHD_64BIT_ADDRESSING) != 0) {
sys/dev/aic7xxx/aic79xx.c
2751
sg_list = (struct ahd_dma64_seg*)scb->sg_list;
sys/dev/aic7xxx/aic79xx.c
2752
for (i = 0; i < scb->sg_count; i++) {
sys/dev/aic7xxx/aic79xx.c
2767
sg_list = (struct ahd_dma_seg*)scb->sg_list;
sys/dev/aic7xxx/aic79xx.c
2768
for (i = 0; i < scb->sg_count; i++) {
sys/dev/aic7xxx/aic79xx.c
3368
struct scb *pending_scb;
sys/dev/aic7xxx/aic79xx.c
3524
struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
3529
our_id = SCSIID_OUR_ID(scb->hscb->scsiid);
sys/dev/aic7xxx/aic79xx.c
3531
if ((scb->hscb->control & TARGET_SCB) != 0)
sys/dev/aic7xxx/aic79xx.c
3533
ahd_compile_devinfo(devinfo, our_id, SCB_GET_TARGET(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
3534
SCB_GET_LUN(scb), SCB_GET_CHANNEL(ahd, scb), role);
sys/dev/aic7xxx/aic79xx.c
3546
struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
3569
} else if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
3579
if ((scb->flags & SCB_DEVICE_RESET) == 0
sys/dev/aic7xxx/aic79xx.c
3580
&& (scb->flags & SCB_PACKETIZED) == 0
sys/dev/aic7xxx/aic79xx.c
3584
identify_msg = MSG_IDENTIFYFLAG | SCB_GET_LUN(scb);
sys/dev/aic7xxx/aic79xx.c
3585
if ((scb->hscb->control & DISCENB) != 0)
sys/dev/aic7xxx/aic79xx.c
3590
if ((scb->hscb->control & TAG_ENB) != 0) {
sys/dev/aic7xxx/aic79xx.c
3592
scb->hscb->control & (TAG_ENB|SCB_TAG_TYPE);
sys/dev/aic7xxx/aic79xx.c
3593
ahd->msgout_buf[ahd->msgout_index++] = SCB_GET_TAG(scb);
sys/dev/aic7xxx/aic79xx.c
3598
if (scb->flags & SCB_DEVICE_RESET) {
sys/dev/aic7xxx/aic79xx.c
3601
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
3612
} else if ((scb->flags & SCB_ABORT) != 0) {
sys/dev/aic7xxx/aic79xx.c
3613
if ((scb->hscb->control & TAG_ENB) != 0) {
sys/dev/aic7xxx/aic79xx.c
3619
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
3621
(scb->hscb->control & TAG_ENB) != 0 ? " Tag" : "");
sys/dev/aic7xxx/aic79xx.c
3631
} else if ((scb->flags & (SCB_AUTO_NEGOTIATE|SCB_NEGOTIATE)) != 0) {
sys/dev/aic7xxx/aic79xx.c
3644
printf("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid,
sys/dev/aic7xxx/aic79xx.c
3648
"SCB flags = %x", SCB_GET_TAG(scb), scb->hscb->control,
sys/dev/aic7xxx/aic79xx.c
3650
scb->flags);
sys/dev/aic7xxx/aic79xx.c
3659
scb->hscb->control &= ~MK_MESSAGE;
sys/dev/aic7xxx/aic79xx.c
374
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
393
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
394
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
412
if (ahd_scb_active_in_fifo(ahd, scb) == 0)
sys/dev/aic7xxx/aic79xx.c
415
ahd_run_data_fifo(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
468
ahd_complete_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
4680
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
4688
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/aic7xxx/aic79xx.c
4766
} else if ((scb->hscb->control & MSG_SIMPLE_TASK) != 0) {
sys/dev/aic7xxx/aic79xx.c
4770
tag_type = (scb->hscb->control & MSG_SIMPLE_TASK);
sys/dev/aic7xxx/aic79xx.c
4794
scb->hscb->control &= mask;
sys/dev/aic7xxx/aic79xx.c
4795
aic_set_transaction_tag(scb, /*enabled*/FALSE,
sys/dev/aic7xxx/aic79xx.c
4799
ahd_busy_tcl(ahd, BUILD_TCL(scb->hscb->scsiid, devinfo->lun),
sys/dev/aic7xxx/aic79xx.c
4800
SCB_GET_TAG(scb));
sys/dev/aic7xxx/aic79xx.c
4807
ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
4808
SCB_GET_CHANNEL(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
4809
SCB_GET_LUN(scb), /*tag*/SCB_LIST_NULL,
sys/dev/aic7xxx/aic79xx.c
4844
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
4847
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/aic7xxx/aic79xx.c
4853
|| aic_get_transfer_dir(scb) != CAM_DIR_IN) {
sys/dev/aic7xxx/aic79xx.c
4898
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/aic7xxx/aic79xx.c
4906
if (sg != scb->sg_list
sys/dev/aic7xxx/aic79xx.c
4921
sgptr = ahd_sg_virt_to_bus(ahd, scb,
sys/dev/aic7xxx/aic79xx.c
4927
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/aic7xxx/aic79xx.c
4935
if (sg != scb->sg_list
sys/dev/aic7xxx/aic79xx.c
4950
sgptr = ahd_sg_virt_to_bus(ahd, scb,
sys/dev/aic7xxx/aic79xx.c
4981
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
4993
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/aic7xxx/aic79xx.c
5004
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
5028
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/aic7xxx/aic79xx.c
5040
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/aic7xxx/aic79xx.c
5129
struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
5140
if (scb != NULL && (scb->flags & SCB_AUTO_NEGOTIATE) != 0)
sys/dev/aic7xxx/aic79xx.c
517
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
518
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
524
hscb_ptr = (uint8_t *)scb->hscb;
sys/dev/aic7xxx/aic79xx.c
5255
ahd_name(ahd), (u_int)sizeof(struct scb),
sys/dev/aic7xxx/aic79xx.c
528
ahd_complete_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
538
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
539
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
546
ahd_complete_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
555
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
556
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
563
ahd_complete_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
5686
static struct scb *
sys/dev/aic7xxx/aic79xx.c
5689
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
5694
LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
sys/dev/aic7xxx/aic79xx.c
5695
if (SCB_GET_TAG(scb) == tag)
sys/dev/aic7xxx/aic79xx.c
5696
return (scb);
sys/dev/aic7xxx/aic79xx.c
5702
TAILQ_FOREACH(scb, &ahd->scb_data.free_scbs, links.tqe) {
sys/dev/aic7xxx/aic79xx.c
5703
struct scb *list_scb;
sys/dev/aic7xxx/aic79xx.c
5705
list_scb = scb;
sys/dev/aic7xxx/aic79xx.c
5716
LIST_FOREACH(scb, &ahd->scb_data.any_dev_free_scb_list, links.le) {
sys/dev/aic7xxx/aic79xx.c
5717
if (SCB_GET_TAG(scb) == tag)
sys/dev/aic7xxx/aic79xx.c
5718
return (scb);
sys/dev/aic7xxx/aic79xx.c
581
ahd_scb_active_in_fifo(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
5843
ahd_add_col_list(struct ahd_softc *ahd, struct scb *scb, u_int col_idx)
sys/dev/aic7xxx/aic79xx.c
5847
struct scb *first_scb;
sys/dev/aic7xxx/aic79xx.c
5849
scb->flags |= SCB_ON_COL_LIST;
sys/dev/aic7xxx/aic79xx.c
5850
AHD_SET_SCB_COL_IDX(scb, col_idx);
sys/dev/aic7xxx/aic79xx.c
5855
LIST_INSERT_AFTER(first_scb, scb, collision_links);
sys/dev/aic7xxx/aic79xx.c
5857
LIST_INSERT_HEAD(free_list, scb, collision_links);
sys/dev/aic7xxx/aic79xx.c
5858
TAILQ_INSERT_TAIL(free_tailq, scb, links.tqe);
sys/dev/aic7xxx/aic79xx.c
5863
ahd_rem_col_list(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
5867
struct scb *first_scb;
sys/dev/aic7xxx/aic79xx.c
5870
scb->flags &= ~SCB_ON_COL_LIST;
sys/dev/aic7xxx/aic79xx.c
5871
col_idx = AHD_GET_SCB_COL_IDX(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
5875
if (first_scb == scb) {
sys/dev/aic7xxx/aic79xx.c
5876
struct scb *next_scb;
sys/dev/aic7xxx/aic79xx.c
5883
next_scb = LIST_NEXT(scb, collision_links);
sys/dev/aic7xxx/aic79xx.c
5885
TAILQ_INSERT_AFTER(free_tailq, scb,
sys/dev/aic7xxx/aic79xx.c
5888
TAILQ_REMOVE(free_tailq, scb, links.tqe);
sys/dev/aic7xxx/aic79xx.c
5890
LIST_REMOVE(scb, collision_links);
sys/dev/aic7xxx/aic79xx.c
5896
struct scb *
sys/dev/aic7xxx/aic79xx.c
5899
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
590
if (ahd_get_scbptr(ahd) != SCB_GET_TAG(scb)
sys/dev/aic7xxx/aic79xx.c
5904
TAILQ_FOREACH(scb, &ahd->scb_data.free_scbs, links.tqe) {
sys/dev/aic7xxx/aic79xx.c
5905
if (AHD_GET_SCB_COL_IDX(ahd, scb) != col_idx) {
sys/dev/aic7xxx/aic79xx.c
5906
ahd_rem_col_list(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
5910
if ((scb = LIST_FIRST(&ahd->scb_data.any_dev_free_scb_list)) == NULL) {
sys/dev/aic7xxx/aic79xx.c
5917
LIST_REMOVE(scb, links.le);
sys/dev/aic7xxx/aic79xx.c
5919
&& (scb->col_scb != NULL)
sys/dev/aic7xxx/aic79xx.c
5920
&& (scb->col_scb->flags & SCB_ACTIVE) == 0) {
sys/dev/aic7xxx/aic79xx.c
5921
LIST_REMOVE(scb->col_scb, links.le);
sys/dev/aic7xxx/aic79xx.c
5922
ahd_add_col_list(ahd, scb->col_scb, col_idx);
sys/dev/aic7xxx/aic79xx.c
5925
scb->flags |= SCB_ACTIVE;
sys/dev/aic7xxx/aic79xx.c
5926
return (scb);
sys/dev/aic7xxx/aic79xx.c
5933
ahd_free_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
5937
scb->flags = SCB_FLAG_NONE;
sys/dev/aic7xxx/aic79xx.c
5938
scb->hscb->control = 0;
sys/dev/aic7xxx/aic79xx.c
5939
ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = NULL;
sys/dev/aic7xxx/aic79xx.c
5941
if (scb->col_scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
5946
scb, links.le);
sys/dev/aic7xxx/aic79xx.c
5947
} else if ((scb->col_scb->flags & SCB_ON_COL_LIST) != 0) {
sys/dev/aic7xxx/aic79xx.c
5953
ahd_rem_col_list(ahd, scb->col_scb);
sys/dev/aic7xxx/aic79xx.c
5955
scb, links.le);
sys/dev/aic7xxx/aic79xx.c
5957
scb->col_scb, links.le);
sys/dev/aic7xxx/aic79xx.c
5958
} else if ((scb->col_scb->flags
sys/dev/aic7xxx/aic79xx.c
5960
&& (scb->col_scb->hscb->control & TAG_ENB) != 0) {
sys/dev/aic7xxx/aic79xx.c
5966
ahd_add_col_list(ahd, scb,
sys/dev/aic7xxx/aic79xx.c
5967
AHD_GET_SCB_COL_IDX(ahd, scb->col_scb));
sys/dev/aic7xxx/aic79xx.c
5976
scb, links.le);
sys/dev/aic7xxx/aic79xx.c
5979
aic_platform_scb_free(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
5986
struct scb *next_scb;
sys/dev/aic7xxx/aic79xx.c
610
ahd_run_data_fifo(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
6123
next_scb = (struct scb *)malloc(sizeof(*next_scb),
sys/dev/aic7xxx/aic79xx.c
7212
ahd_match_scb(struct ahd_softc *ahd, struct scb *scb, int target,
sys/dev/aic7xxx/aic79xx.c
7215
int targ = SCB_GET_TARGET(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
7216
char chan = SCB_GET_CHANNEL(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
7217
int slun = SCB_GET_LUN(scb);
sys/dev/aic7xxx/aic79xx.c
7229
group = XPT_FC_GROUP(scb->io_ctx->ccb_h.func_code);
sys/dev/aic7xxx/aic79xx.c
7232
&& ((tag == SCB_GET_TAG(scb))
sys/dev/aic7xxx/aic79xx.c
7236
&& ((tag == scb->io_ctx->csio.tag_id)
sys/dev/aic7xxx/aic79xx.c
7240
match = ((tag == SCB_GET_TAG(scb)) || (tag == SCB_LIST_NULL));
sys/dev/aic7xxx/aic79xx.c
7248
ahd_freeze_devq(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
7254
target = SCB_GET_TARGET(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
7255
lun = SCB_GET_LUN(scb);
sys/dev/aic7xxx/aic79xx.c
7256
channel = SCB_GET_CHANNEL(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
7262
ahd_platform_freeze_devq(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
7266
ahd_qinfifo_requeue_tail(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
7268
struct scb *prev_scb;
sys/dev/aic7xxx/aic79xx.c
7282
ahd_qinfifo_requeue(ahd, prev_scb, scb);
sys/dev/aic7xxx/aic79xx.c
7288
ahd_qinfifo_requeue(struct ahd_softc *ahd, struct scb *prev_scb,
sys/dev/aic7xxx/aic79xx.c
7289
struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
7294
busaddr = aic_le32toh(scb->hscb->hscb_busaddr);
sys/dev/aic7xxx/aic79xx.c
7297
prev_scb->hscb->next_hscb_busaddr = scb->hscb->hscb_busaddr;
sys/dev/aic7xxx/aic79xx.c
7301
ahd->qinfifo[AHD_QIN_WRAP(ahd->qinfifonext)] = SCB_GET_TAG(scb);
sys/dev/aic7xxx/aic79xx.c
7303
scb->hscb->next_hscb_busaddr = ahd->next_queued_hscb->hscb_busaddr;
sys/dev/aic7xxx/aic79xx.c
7304
ahd_sync_scb(ahd, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
sys/dev/aic7xxx/aic79xx.c
7328
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
7342
LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
sys/dev/aic7xxx/aic79xx.c
7351
ahd_done_with_status(struct ahd_softc *ahd, struct scb *scb, uint32_t status)
sys/dev/aic7xxx/aic79xx.c
7356
ostat = aic_get_transaction_status(scb);
sys/dev/aic7xxx/aic79xx.c
7358
aic_set_transaction_status(scb, status);
sys/dev/aic7xxx/aic79xx.c
7359
cstat = aic_get_transaction_status(scb);
sys/dev/aic7xxx/aic79xx.c
7361
aic_freeze_scb(scb);
sys/dev/aic7xxx/aic79xx.c
7362
ahd_done(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
7370
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
7371
struct scb *mk_msg_scb;
sys/dev/aic7xxx/aic79xx.c
7372
struct scb *prev_scb;
sys/dev/aic7xxx/aic79xx.c
7422
scb = ahd_lookup_scb(ahd, ahd->qinfifo[qinpos]);
sys/dev/aic7xxx/aic79xx.c
7423
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
7430
if (ahd_match_scb(ahd, scb, target, channel, lun, tag, role)) {
sys/dev/aic7xxx/aic79xx.c
7437
if ((scb->flags & SCB_ACTIVE) == 0)
sys/dev/aic7xxx/aic79xx.c
7439
ahd_done_with_status(ahd, scb, status);
sys/dev/aic7xxx/aic79xx.c
7447
ahd_qinfifo_requeue(ahd, prev_scb, scb);
sys/dev/aic7xxx/aic79xx.c
7448
prev_scb = scb;
sys/dev/aic7xxx/aic79xx.c
7452
ahd_qinfifo_requeue(ahd, prev_scb, scb);
sys/dev/aic7xxx/aic79xx.c
7453
prev_scb = scb;
sys/dev/aic7xxx/aic79xx.c
7495
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
7496
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
7503
if (ahd_match_scb(ahd, scb, target, channel, CAM_LUN_WILDCARD,
sys/dev/aic7xxx/aic79xx.c
7513
printf(" %d ( ", SCB_GET_TARGET(ahd, scb));
sys/dev/aic7xxx/aic79xx.c
7518
SCB_GET_TARGET(ahd, scb));
sys/dev/aic7xxx/aic79xx.c
7558
printf(" 0x%x", SCB_GET_TAG(scb));
sys/dev/aic7xxx/aic79xx.c
7567
&& ahd_match_scb(ahd, scb, target, channel, CAM_LUN_WILDCARD,
sys/dev/aic7xxx/aic79xx.c
7600
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
7619
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
7620
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
7628
if (ahd_match_scb(ahd, scb, target, channel,
sys/dev/aic7xxx/aic79xx.c
763
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/aic7xxx/aic79xx.c
7636
if ((scb->flags & SCB_ACTIVE) == 0)
sys/dev/aic7xxx/aic79xx.c
7638
ahd_done_with_status(ahd, scb, status);
sys/dev/aic7xxx/aic79xx.c
770
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/aic7xxx/aic79xx.c
7752
struct scb *scbp;
sys/dev/aic7xxx/aic79xx.c
7753
struct scb *scbp_next;
sys/dev/aic7xxx/aic79xx.c
8092
ahd_handle_scb_status(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
8094
if (scb->hscb->shared_data.istatus.scsi_status != 0) {
sys/dev/aic7xxx/aic79xx.c
8095
ahd_handle_scsi_status(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8097
ahd_calc_residual(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8098
ahd_done(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8103
ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
8117
hscb = scb->hscb;
sys/dev/aic7xxx/aic79xx.c
8127
ahd_freeze_devq(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8128
aic_freeze_scb(scb);
sys/dev/aic7xxx/aic79xx.c
8136
if ((scb->flags & SCB_SENSE) != 0) {
sys/dev/aic7xxx/aic79xx.c
8141
scb->flags &= ~SCB_SENSE;
sys/dev/aic7xxx/aic79xx.c
8142
aic_set_transaction_status(scb, CAM_AUTOSENSE_FAIL);
sys/dev/aic7xxx/aic79xx.c
8143
ahd_done(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8146
aic_set_transaction_status(scb, CAM_SCSI_STATUS_ERROR);
sys/dev/aic7xxx/aic79xx.c
8147
aic_set_scsi_status(scb, hscb->shared_data.istatus.scsi_status);
sys/dev/aic7xxx/aic79xx.c
8153
ahd_sync_sense(ahd, scb, BUS_DMASYNC_POSTREAD);
sys/dev/aic7xxx/aic79xx.c
8154
siu = (struct scsi_status_iu_header *)scb->sense_data;
sys/dev/aic7xxx/aic79xx.c
8155
aic_set_scsi_status(scb, siu->status);
sys/dev/aic7xxx/aic79xx.c
8158
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8160
SCB_GET_TAG(scb), siu->status);
sys/dev/aic7xxx/aic79xx.c
8168
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8201
aic_set_transaction_status(scb,
sys/dev/aic7xxx/aic79xx.c
8205
scb->flags |= SCB_PKT_SENSE;
sys/dev/aic7xxx/aic79xx.c
8211
ahd_done(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8225
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8227
SCB_GET_TAG(scb));
sys/dev/aic7xxx/aic79xx.c
8231
if (aic_perform_autosense(scb) == 0)
sys/dev/aic7xxx/aic79xx.c
8234
ahd_compile_devinfo(&devinfo, SCB_GET_OUR_ID(scb),
sys/dev/aic7xxx/aic79xx.c
8235
SCB_GET_TARGET(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
8236
SCB_GET_LUN(scb),
sys/dev/aic7xxx/aic79xx.c
8237
SCB_GET_CHANNEL(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
8245
sg = scb->sg_list;
sys/dev/aic7xxx/aic79xx.c
8250
ahd_update_residual(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8253
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8257
scb->sg_count = 0;
sys/dev/aic7xxx/aic79xx.c
8258
sg = ahd_sg_setup(ahd, scb, sg, ahd_get_sense_bufaddr(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
8259
aic_get_sense_bufsize(ahd, scb),
sys/dev/aic7xxx/aic79xx.c
8264
&& SCB_GET_LUN(scb) < 8)
sys/dev/aic7xxx/aic79xx.c
8265
sc->byte2 = SCB_GET_LUN(scb) << 5;
sys/dev/aic7xxx/aic79xx.c
8268
sc->length = aic_get_sense_bufsize(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8288
if (aic_get_residual(scb) == aic_get_transfer_length(scb)) {
sys/dev/aic7xxx/aic79xx.c
8295
scb->flags &=
sys/dev/aic7xxx/aic79xx.c
8297
scb->flags |= SCB_AUTO_NEGOTIATE;
sys/dev/aic7xxx/aic79xx.c
8300
ahd_setup_data_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8301
scb->flags |= SCB_SENSE;
sys/dev/aic7xxx/aic79xx.c
8302
ahd_queue_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8311
|| (scb->flags & SCB_RECOVERY_SCB) != 0)
sys/dev/aic7xxx/aic79xx.c
8312
aic_scb_timer_reset(scb, 5 * 1000);
sys/dev/aic7xxx/aic79xx.c
8320
ahd_done(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8329
ahd_calc_residual(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
8353
hscb = scb->hscb;
sys/dev/aic7xxx/aic79xx.c
8374
resid = aic_get_transfer_length(scb);
sys/dev/aic7xxx/aic79xx.c
8379
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8381
SCB_GET_TAG(scb));
sys/dev/aic7xxx/aic79xx.c
8382
ahd_freeze_devq(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8383
aic_set_transaction_status(scb, CAM_DATA_RUN_ERR);
sys/dev/aic7xxx/aic79xx.c
8384
aic_freeze_scb(scb);
sys/dev/aic7xxx/aic79xx.c
8397
sg = ahd_sg_bus_to_virt(ahd, scb, resid_sgptr & SG_PTR_MASK);
sys/dev/aic7xxx/aic79xx.c
8412
if ((scb->flags & SCB_SENSE) == 0)
sys/dev/aic7xxx/aic79xx.c
8413
aic_set_residual(scb, resid);
sys/dev/aic7xxx/aic79xx.c
8415
aic_set_sense_residual(scb, resid);
sys/dev/aic7xxx/aic79xx.c
8419
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8421
(scb->flags & SCB_SENSE) ? "Sense " : "", resid);
sys/dev/aic7xxx/aic79xx.c
845
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
859
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/aic7xxx/aic79xx.c
860
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
868
ahd_handle_scb_status(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
870
ahd_done(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
8929
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
9012
LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
sys/dev/aic7xxx/aic79xx.c
9015
cur_col = printf("\n%3d FIFO_USE[0x%x] ", SCB_GET_TAG(scb),
sys/dev/aic7xxx/aic79xx.c
9017
ahd_set_scbptr(ahd, SCB_GET_TAG(scb));
sys/dev/aic7xxx/aic79xx.c
9027
TAILQ_FOREACH(scb, &ahd->scb_data.free_scbs, links.tqe) {
sys/dev/aic7xxx/aic79xx.c
9028
struct scb *list_scb;
sys/dev/aic7xxx/aic79xx.c
9030
printf("\n COLIDX[%d]: ", AHD_GET_SCB_COL_IDX(ahd, scb));
sys/dev/aic7xxx/aic79xx.c
9031
list_scb = scb;
sys/dev/aic7xxx/aic79xx.c
9039
LIST_FOREACH(scb, &ahd->scb_data.any_dev_free_scb_list, links.le) {
sys/dev/aic7xxx/aic79xx.c
9042
printf("%d ", SCB_GET_TAG(scb));
sys/dev/aic7xxx/aic79xx.c
9088
struct scb *fifo_scb;
sys/dev/aic7xxx/aic79xx.c
9218
ahd_timeout(struct scb *scb)
sys/dev/aic7xxx/aic79xx.c
9222
ahd = scb->ahd_softc;
sys/dev/aic7xxx/aic79xx.c
9223
if ((scb->flags & SCB_ACTIVE) != 0) {
sys/dev/aic7xxx/aic79xx.c
9224
if ((scb->flags & SCB_TIMEDOUT) == 0) {
sys/dev/aic7xxx/aic79xx.c
9225
LIST_INSERT_HEAD(&ahd->timedout_scbs, scb,
sys/dev/aic7xxx/aic79xx.c
9227
scb->flags |= SCB_TIMEDOUT;
sys/dev/aic7xxx/aic79xx.c
9243
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
9244
struct scb *active_scb;
sys/dev/aic7xxx/aic79xx.c
9294
while ((scb = LIST_FIRST(&ahd->timedout_scbs)) != NULL) {
sys/dev/aic7xxx/aic79xx.c
9299
target = SCB_GET_TARGET(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
9300
channel = SCB_GET_CHANNEL(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
9301
lun = SCB_GET_LUN(scb);
sys/dev/aic7xxx/aic79xx.c
9303
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
9304
printf("SCB %d - timed out\n", SCB_GET_TAG(scb));
sys/dev/aic7xxx/aic79xx.c
9306
if (scb->flags & (SCB_DEVICE_RESET|SCB_ABORT)) {
sys/dev/aic7xxx/aic79xx.c
9311
aic_set_transaction_status(scb, CAM_CMD_TIMEOUT);
sys/dev/aic7xxx/aic79xx.c
9325
LIST_REMOVE(scb, timedout_links);
sys/dev/aic7xxx/aic79xx.c
9326
scb->flags &= ~SCB_TIMEDOUT;
sys/dev/aic7xxx/aic79xx.c
9329
if (active_scb != scb) {
sys/dev/aic7xxx/aic79xx.c
9338
if (ahd_other_scb_timeout(ahd, scb,
sys/dev/aic7xxx/aic79xx.c
9354
aic_scb_timer_reset(scb, 2 * 1000);
sys/dev/aic7xxx/aic79xx.c
9369
SCB_GET_TAG(scb),
sys/dev/aic7xxx/aic79xx.c
9378
if (ahd_other_scb_timeout(ahd, scb, NULL) == 0)
sys/dev/aic7xxx/aic79xx.c
9386
ahd_set_recoveryscb(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
9395
scb->flags |= SCB_DEVICE_RESET;
sys/dev/aic7xxx/aic79xx.c
9396
scb->hscb->cdb_len = 0;
sys/dev/aic7xxx/aic79xx.c
9397
scb->hscb->task_attribute = 0;
sys/dev/aic7xxx/aic79xx.c
9398
scb->hscb->task_management = SIU_TASKMGMT_ABORT_TASK;
sys/dev/aic7xxx/aic79xx.c
9400
ahd_set_scbptr(ahd, SCB_GET_TAG(scb));
sys/dev/aic7xxx/aic79xx.c
9401
if ((scb->flags & SCB_PACKETIZED) != 0) {
sys/dev/aic7xxx/aic79xx.c
9410
scb->hscb->task_management);
sys/dev/aic7xxx/aic79xx.c
9422
scb->hscb->control |= MK_MESSAGE|DISCONNECTED;
sys/dev/aic7xxx/aic79xx.c
9442
ahd_qinfifo_requeue_tail(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
9444
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
9446
aic_scb_timer_reset(scb, 2 * 1000);
sys/dev/aic7xxx/aic79xx.c
945
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
9456
while ((scb = LIST_FIRST(&ahd->timedout_scbs)) != NULL) {
sys/dev/aic7xxx/aic79xx.c
9457
LIST_REMOVE(scb, timedout_links);
sys/dev/aic7xxx/aic79xx.c
9458
scb->flags &= ~SCB_TIMEDOUT;
sys/dev/aic7xxx/aic79xx.c
9471
ahd_other_scb_timeout(struct ahd_softc *ahd, struct scb *scb,
sys/dev/aic7xxx/aic79xx.c
9472
struct scb *other_scb)
sys/dev/aic7xxx/aic79xx.c
9477
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
9479
(scb->flags & SCB_OTHERTCL_TIMEOUT) != 0
sys/dev/aic7xxx/aic79xx.c
9483
newtimeout = aic_get_timeout(scb);
sys/dev/aic7xxx/aic79xx.c
9484
scb->flags |= SCB_OTHERTCL_TIMEOUT;
sys/dev/aic7xxx/aic79xx.c
9507
aic_scb_timer_reset(scb, newtimeout);
sys/dev/aic7xxx/aic79xx.c
9509
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.c
951
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
952
if (scb == NULL) {
sys/dev/aic7xxx/aic79xx.c
960
ahd_outb(ahd, SAVED_SCSIID, scb->hscb->scsiid);
sys/dev/aic7xxx/aic79xx.c
961
ahd_outb(ahd, SAVED_LUN, scb->hscb->lun);
sys/dev/aic7xxx/aic79xx.c
992
struct scb *scb;
sys/dev/aic7xxx/aic79xx.c
996
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/aic7xxx/aic79xx.c
997
if (scb != NULL)
sys/dev/aic7xxx/aic79xx.c
998
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx.h
100
#define SCB_IS_SILENT(scb) \
sys/dev/aic7xxx/aic79xx.h
102
&& (((scb)->flags & SCB_SILENT) != 0))
sys/dev/aic7xxx/aic79xx.h
104
#define SCB_IS_SILENT(scb) \
sys/dev/aic7xxx/aic79xx.h
105
(((scb)->flags & SCB_SILENT) != 0)
sys/dev/aic7xxx/aic79xx.h
1108
LIST_HEAD(, scb) pending_scbs;
sys/dev/aic7xxx/aic79xx.h
1113
LIST_HEAD(, scb) timedout_scbs;
sys/dev/aic7xxx/aic79xx.h
119
#define SCB_GET_TAG(scb) \
sys/dev/aic7xxx/aic79xx.h
120
aic_le16toh(scb->hscb->tag)
sys/dev/aic7xxx/aic79xx.h
130
#define AHD_GET_SCB_COL_IDX(ahd, scb) \
sys/dev/aic7xxx/aic79xx.h
131
((SCB_GET_LUN(scb) << 4) | SCB_GET_TARGET(ahd, scb))
sys/dev/aic7xxx/aic79xx.h
133
#define AHD_SET_SCB_COL_IDX(scb, col_idx) \
sys/dev/aic7xxx/aic79xx.h
135
(scb)->hscb->scsiid = ((col_idx) << TID_SHIFT) & TID; \
sys/dev/aic7xxx/aic79xx.h
136
(scb)->hscb->lun = ((col_idx) >> 4) & (AHD_NUM_LUNS_NONPKT-1); \
sys/dev/aic7xxx/aic79xx.h
1399
struct scb *scb);
sys/dev/aic7xxx/aic79xx.h
1400
int ahd_match_scb(struct ahd_softc *ahd, struct scb *scb,
sys/dev/aic7xxx/aic79xx.h
1427
struct scb *ahd_get_scb(struct ahd_softc *ahd, u_int col_idx);
sys/dev/aic7xxx/aic79xx.h
1428
void ahd_free_scb(struct ahd_softc *ahd, struct scb *scb);
sys/dev/aic7xxx/aic79xx.h
1461
struct scb *scb, uint32_t status);
sys/dev/aic7xxx/aic79xx.h
1470
void ahd_freeze_devq(struct ahd_softc *ahd, struct scb *scb);
sys/dev/aic7xxx/aic79xx.h
1479
struct scb *scb);
sys/dev/aic7xxx/aic79xx.h
1481
struct scb *scb);
sys/dev/aic7xxx/aic79xx.h
1483
struct scb *scb);
sys/dev/aic7xxx/aic79xx.h
1484
void ahd_timeout(struct scb *scb);
sys/dev/aic7xxx/aic79xx.h
1573
void ahd_print_scb(struct scb *scb);
sys/dev/aic7xxx/aic79xx.h
1576
void ahd_dump_sglist(struct scb *scb);
sys/dev/aic7xxx/aic79xx.h
612
SLIST_ENTRY(scb) sle;
sys/dev/aic7xxx/aic79xx.h
613
LIST_ENTRY(scb) le;
sys/dev/aic7xxx/aic79xx.h
614
TAILQ_ENTRY(scb) tqe;
sys/dev/aic7xxx/aic79xx.h
617
SLIST_ENTRY(scb) sle;
sys/dev/aic7xxx/aic79xx.h
618
LIST_ENTRY(scb) le;
sys/dev/aic7xxx/aic79xx.h
619
TAILQ_ENTRY(scb) tqe;
sys/dev/aic7xxx/aic79xx.h
623
LIST_ENTRY(scb) timedout_links;
sys/dev/aic7xxx/aic79xx.h
624
struct scb *col_scb;
sys/dev/aic7xxx/aic79xx.h
643
TAILQ_HEAD(scb_tailq, scb);
sys/dev/aic7xxx/aic79xx.h
644
LIST_HEAD(scb_list, scb);
sys/dev/aic7xxx/aic79xx.h
667
struct scb *scbindex[AHD_SCB_MAX];
sys/dev/aic7xxx/aic79xx.h
86
#define SCB_IS_SCSIBUS_B(ahd, scb) (0)
sys/dev/aic7xxx/aic79xx.h
87
#define SCB_GET_OUR_ID(scb) \
sys/dev/aic7xxx/aic79xx.h
88
SCSIID_OUR_ID((scb)->hscb->scsiid)
sys/dev/aic7xxx/aic79xx.h
89
#define SCB_GET_TARGET(ahd, scb) \
sys/dev/aic7xxx/aic79xx.h
90
SCSIID_TARGET((ahd), (scb)->hscb->scsiid)
sys/dev/aic7xxx/aic79xx.h
91
#define SCB_GET_CHANNEL(ahd, scb) \
sys/dev/aic7xxx/aic79xx.h
92
SCSIID_CHANNEL(ahd, (scb)->hscb->scsiid)
sys/dev/aic7xxx/aic79xx.h
93
#define SCB_GET_LUN(scb) \
sys/dev/aic7xxx/aic79xx.h
94
((scb)->hscb->lun)
sys/dev/aic7xxx/aic79xx.h
95
#define SCB_GET_TARGET_OFFSET(ahd, scb) \
sys/dev/aic7xxx/aic79xx.h
96
SCB_GET_TARGET(ahd, scb)
sys/dev/aic7xxx/aic79xx.h
97
#define SCB_GET_TARGET_MASK(ahd, scb) \
sys/dev/aic7xxx/aic79xx.h
98
(0x01 << (SCB_GET_TARGET_OFFSET(ahd, scb)))
sys/dev/aic7xxx/aic79xx_inline.h
233
static __inline void *ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb,
sys/dev/aic7xxx/aic79xx_inline.h
237
struct scb *scb);
sys/dev/aic7xxx/aic79xx_inline.h
239
struct scb *scb);
sys/dev/aic7xxx/aic79xx_inline.h
241
struct scb *scb);
sys/dev/aic7xxx/aic79xx_inline.h
244
ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb,
sys/dev/aic7xxx/aic79xx_inline.h
247
scb->sg_count++;
sys/dev/aic7xxx/aic79xx_inline.h
268
ahd_setup_scb_common(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx_inline.h
271
scb->crc_retry_count = 0;
sys/dev/aic7xxx/aic79xx_inline.h
272
if ((scb->flags & SCB_PACKETIZED) != 0) {
sys/dev/aic7xxx/aic79xx_inline.h
274
scb->hscb->task_attribute = scb->hscb->control & SCB_TAG_TYPE;
sys/dev/aic7xxx/aic79xx_inline.h
276
if (aic_get_transfer_length(scb) & 0x01)
sys/dev/aic7xxx/aic79xx_inline.h
277
scb->hscb->task_attribute = SCB_XFERLEN_ODD;
sys/dev/aic7xxx/aic79xx_inline.h
279
scb->hscb->task_attribute = 0;
sys/dev/aic7xxx/aic79xx_inline.h
282
if (scb->hscb->cdb_len <= MAX_CDB_LEN_WITH_SENSE_ADDR
sys/dev/aic7xxx/aic79xx_inline.h
283
|| (scb->hscb->cdb_len & SCB_CDB_LEN_PTR) != 0)
sys/dev/aic7xxx/aic79xx_inline.h
284
scb->hscb->shared_data.idata.cdb_plus_saddr.sense_addr =
sys/dev/aic7xxx/aic79xx_inline.h
285
aic_htole32(scb->sense_busaddr);
sys/dev/aic7xxx/aic79xx_inline.h
289
ahd_setup_data_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx_inline.h
297
sg = (struct ahd_dma64_seg *)scb->sg_list;
sys/dev/aic7xxx/aic79xx_inline.h
298
scb->hscb->dataptr = sg->addr;
sys/dev/aic7xxx/aic79xx_inline.h
299
scb->hscb->datacnt = sg->len;
sys/dev/aic7xxx/aic79xx_inline.h
304
sg = (struct ahd_dma_seg *)scb->sg_list;
sys/dev/aic7xxx/aic79xx_inline.h
305
dataptr_words = (uint32_t*)&scb->hscb->dataptr;
sys/dev/aic7xxx/aic79xx_inline.h
312
scb->hscb->dataptr |= aic_htole64(high_addr << 8);
sys/dev/aic7xxx/aic79xx_inline.h
314
scb->hscb->datacnt = sg->len;
sys/dev/aic7xxx/aic79xx_inline.h
322
scb->hscb->sgptr = aic_htole32(scb->sg_list_busaddr|SG_FULL_RESID);
sys/dev/aic7xxx/aic79xx_inline.h
326
ahd_setup_noxfer_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx_inline.h
328
scb->hscb->sgptr = aic_htole32(SG_LIST_NULL);
sys/dev/aic7xxx/aic79xx_inline.h
329
scb->hscb->dataptr = 0;
sys/dev/aic7xxx/aic79xx_inline.h
330
scb->hscb->datacnt = 0;
sys/dev/aic7xxx/aic79xx_inline.h
337
struct scb *scb,
sys/dev/aic7xxx/aic79xx_inline.h
341
struct scb *scb,
sys/dev/aic7xxx/aic79xx_inline.h
344
struct scb *scb, int op);
sys/dev/aic7xxx/aic79xx_inline.h
346
struct scb *scb, int op);
sys/dev/aic7xxx/aic79xx_inline.h
348
struct scb *scb, int op);
sys/dev/aic7xxx/aic79xx_inline.h
362
ahd_sg_bus_to_virt(struct ahd_softc *ahd, struct scb *scb, uint32_t sg_busaddr)
sys/dev/aic7xxx/aic79xx_inline.h
367
sg_offset = sg_busaddr - (scb->sg_list_busaddr - ahd_sg_size(ahd));
sys/dev/aic7xxx/aic79xx_inline.h
368
return ((uint8_t *)scb->sg_list + sg_offset);
sys/dev/aic7xxx/aic79xx_inline.h
372
ahd_sg_virt_to_bus(struct ahd_softc *ahd, struct scb *scb, void *sg)
sys/dev/aic7xxx/aic79xx_inline.h
377
sg_offset = ((uint8_t *)sg - (uint8_t *)scb->sg_list)
sys/dev/aic7xxx/aic79xx_inline.h
380
return (scb->sg_list_busaddr + sg_offset);
sys/dev/aic7xxx/aic79xx_inline.h
384
ahd_sync_scb(struct ahd_softc *ahd, struct scb *scb, int op)
sys/dev/aic7xxx/aic79xx_inline.h
387
scb->hscb_map->dmamap,
sys/dev/aic7xxx/aic79xx_inline.h
388
/*offset*/(uint8_t*)scb->hscb - scb->hscb_map->vaddr,
sys/dev/aic7xxx/aic79xx_inline.h
389
/*len*/sizeof(*scb->hscb), op);
sys/dev/aic7xxx/aic79xx_inline.h
393
ahd_sync_sglist(struct ahd_softc *ahd, struct scb *scb, int op)
sys/dev/aic7xxx/aic79xx_inline.h
395
if (scb->sg_count == 0)
sys/dev/aic7xxx/aic79xx_inline.h
399
scb->sg_map->dmamap,
sys/dev/aic7xxx/aic79xx_inline.h
400
/*offset*/scb->sg_list_busaddr - ahd_sg_size(ahd),
sys/dev/aic7xxx/aic79xx_inline.h
401
/*len*/ahd_sg_size(ahd) * scb->sg_count, op);
sys/dev/aic7xxx/aic79xx_inline.h
405
ahd_sync_sense(struct ahd_softc *ahd, struct scb *scb, int op)
sys/dev/aic7xxx/aic79xx_inline.h
408
scb->sense_map->dmamap,
sys/dev/aic7xxx/aic79xx_inline.h
409
/*offset*/scb->sense_busaddr,
sys/dev/aic7xxx/aic79xx_inline.h
422
struct scb *scb);
sys/dev/aic7xxx/aic79xx_inline.h
424
struct scb *scb);
sys/dev/aic7xxx/aic79xx_inline.h
461
struct scb *scb);
sys/dev/aic7xxx/aic79xx_inline.h
462
static __inline void ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb);
sys/dev/aic7xxx/aic79xx_inline.h
465
struct scb *scb);
sys/dev/aic7xxx/aic79xx_inline.h
468
struct scb *scb);
sys/dev/aic7xxx/aic79xx_inline.h
471
ahd_complete_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx_inline.h
475
sgptr = aic_le32toh(scb->hscb->sgptr);
sys/dev/aic7xxx/aic79xx_inline.h
477
ahd_handle_scb_status(ahd, scb);
sys/dev/aic7xxx/aic79xx_inline.h
479
ahd_done(ahd, scb);
sys/dev/aic7xxx/aic79xx_inline.h
487
ahd_update_residual(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx_inline.h
491
sgptr = aic_le32toh(scb->hscb->sgptr);
sys/dev/aic7xxx/aic79xx_inline.h
493
ahd_calc_residual(ahd, scb);
sys/dev/aic7xxx/aic79xx_inline.h
722
static __inline struct scb *
sys/dev/aic7xxx/aic79xx_inline.h
725
struct scb* scb;
sys/dev/aic7xxx/aic79xx_inline.h
729
scb = ahd->scb_data.scbindex[tag];
sys/dev/aic7xxx/aic79xx_inline.h
730
if (scb != NULL)
sys/dev/aic7xxx/aic79xx_inline.h
731
ahd_sync_scb(ahd, scb,
sys/dev/aic7xxx/aic79xx_inline.h
733
return (scb);
sys/dev/aic7xxx/aic79xx_inline.h
737
ahd_swap_with_next_hscb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx_inline.h
758
memcpy(q_hscb, scb->hscb, sizeof(*scb->hscb));
sys/dev/aic7xxx/aic79xx_inline.h
760
q_hscb->next_hscb_busaddr = scb->hscb->hscb_busaddr;
sys/dev/aic7xxx/aic79xx_inline.h
763
ahd->next_queued_hscb = scb->hscb;
sys/dev/aic7xxx/aic79xx_inline.h
764
ahd->next_queued_hscb_map = scb->hscb_map;
sys/dev/aic7xxx/aic79xx_inline.h
765
scb->hscb = q_hscb;
sys/dev/aic7xxx/aic79xx_inline.h
766
scb->hscb_map = q_hscb_map;
sys/dev/aic7xxx/aic79xx_inline.h
769
ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = scb;
sys/dev/aic7xxx/aic79xx_inline.h
776
ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx_inline.h
778
ahd_swap_with_next_hscb(ahd, scb);
sys/dev/aic7xxx/aic79xx_inline.h
780
if (SCBID_IS_NULL(SCB_GET_TAG(scb)))
sys/dev/aic7xxx/aic79xx_inline.h
782
SCB_GET_TAG(scb));
sys/dev/aic7xxx/aic79xx_inline.h
787
ahd->qinfifo[AHD_QIN_WRAP(ahd->qinfifonext)] = SCB_GET_TAG(scb);
sys/dev/aic7xxx/aic79xx_inline.h
790
if (scb->sg_count != 0)
sys/dev/aic7xxx/aic79xx_inline.h
791
ahd_setup_data_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx_inline.h
793
ahd_setup_noxfer_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx_inline.h
794
ahd_setup_scb_common(ahd, scb);
sys/dev/aic7xxx/aic79xx_inline.h
800
ahd_sync_scb(ahd, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
sys/dev/aic7xxx/aic79xx_inline.h
806
host_dataptr = aic_le64toh(scb->hscb->dataptr);
sys/dev/aic7xxx/aic79xx_inline.h
809
SCB_GET_TAG(scb), scb->hscb->scsiid,
sys/dev/aic7xxx/aic79xx_inline.h
810
aic_le32toh(scb->hscb->hscb_busaddr),
sys/dev/aic7xxx/aic79xx_inline.h
813
aic_le32toh(scb->hscb->datacnt));
sys/dev/aic7xxx/aic79xx_inline.h
821
ahd_get_sense_buf(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx_inline.h
823
return (scb->sense_data);
sys/dev/aic7xxx/aic79xx_inline.h
827
ahd_get_sense_bufaddr(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx_inline.h
829
return (scb->sense_busaddr);
sys/dev/aic7xxx/aic79xx_osm.c
1004
if (aic_get_transaction_status(scb) != CAM_REQ_INPROG) {
sys/dev/aic7xxx/aic79xx_osm.c
1007
scb->dmamap);
sys/dev/aic7xxx/aic79xx_osm.c
1008
ahd_free_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx_osm.c
1013
tinfo = ahd_fetch_transinfo(ahd, SCSIID_CHANNEL(ahd, scb->hscb->scsiid),
sys/dev/aic7xxx/aic79xx_osm.c
1014
SCSIID_OUR_ID(scb->hscb->scsiid),
sys/dev/aic7xxx/aic79xx_osm.c
1015
SCSIID_TARGET(ahd, scb->hscb->scsiid),
sys/dev/aic7xxx/aic79xx_osm.c
1018
mask = SCB_GET_TARGET_MASK(ahd, scb);
sys/dev/aic7xxx/aic79xx_osm.c
1022
scb->hscb->control |= DISCENB;
sys/dev/aic7xxx/aic79xx_osm.c
1025
scb->flags |= SCB_PACKETIZED;
sys/dev/aic7xxx/aic79xx_osm.c
1026
if (scb->hscb->task_management != 0)
sys/dev/aic7xxx/aic79xx_osm.c
1027
scb->hscb->control &= ~MK_MESSAGE;
sys/dev/aic7xxx/aic79xx_osm.c
1034
scb->flags |= SCB_NEGOTIATE;
sys/dev/aic7xxx/aic79xx_osm.c
1035
scb->hscb->control |= MK_MESSAGE;
sys/dev/aic7xxx/aic79xx_osm.c
1037
scb->flags |= SCB_AUTO_NEGOTIATE;
sys/dev/aic7xxx/aic79xx_osm.c
1038
scb->hscb->control |= MK_MESSAGE;
sys/dev/aic7xxx/aic79xx_osm.c
1041
LIST_INSERT_HEAD(&ahd->pending_scbs, scb, pending_links);
sys/dev/aic7xxx/aic79xx_osm.c
1045
aic_scb_timer_start(scb);
sys/dev/aic7xxx/aic79xx_osm.c
1047
if ((scb->flags & SCB_TARGET_IMMEDIATE) != 0) {
sys/dev/aic7xxx/aic79xx_osm.c
1049
ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = scb;
sys/dev/aic7xxx/aic79xx_osm.c
1051
ahd_set_scbptr(ahd, SCB_GET_TAG(scb));
sys/dev/aic7xxx/aic79xx_osm.c
1055
ahd_queue_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx_osm.c
1068
struct ccb_scsiio *csio, struct scb *scb)
sys/dev/aic7xxx/aic79xx_osm.c
1074
hscb = scb->hscb;
sys/dev/aic7xxx/aic79xx_osm.c
1089
aic_set_transaction_status(scb,
sys/dev/aic7xxx/aic79xx_osm.c
1091
ahd_free_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx_osm.c
1108
aic_set_transaction_status(scb,
sys/dev/aic7xxx/aic79xx_osm.c
1110
ahd_free_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx_osm.c
1120
scb->dmamap,
sys/dev/aic7xxx/aic79xx_osm.c
1123
scb, /*flags*/0);
sys/dev/aic7xxx/aic79xx_osm.c
1130
scb->io_ctx->ccb_h.status |= CAM_RELEASE_SIMQ;
sys/dev/aic7xxx/aic79xx_osm.c
306
ahd_sync_ccb(struct ahd_softc *ahd, struct scb *scb, union ccb *ccb, bool post)
sys/dev/aic7xxx/aic79xx_osm.c
321
bus_dmamap_sync(ahd->buffer_dmat, scb->dmamap, op);
sys/dev/aic7xxx/aic79xx_osm.c
330
ahd_done(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx_osm.c
334
CAM_DEBUG(scb->io_ctx->ccb_h.path, CAM_DEBUG_TRACE,
sys/dev/aic7xxx/aic79xx_osm.c
335
("ahd_done - scb %d\n", SCB_GET_TAG(scb)));
sys/dev/aic7xxx/aic79xx_osm.c
337
ccb = scb->io_ctx;
sys/dev/aic7xxx/aic79xx_osm.c
338
LIST_REMOVE(scb, pending_links);
sys/dev/aic7xxx/aic79xx_osm.c
339
if ((scb->flags & SCB_TIMEDOUT) != 0)
sys/dev/aic7xxx/aic79xx_osm.c
340
LIST_REMOVE(scb, timedout_links);
sys/dev/aic7xxx/aic79xx_osm.c
342
callout_stop(&scb->io_timer);
sys/dev/aic7xxx/aic79xx_osm.c
345
ahd_sync_ccb(ahd, scb, ccb, true);
sys/dev/aic7xxx/aic79xx_osm.c
346
bus_dmamap_unload(ahd->buffer_dmat, scb->dmamap);
sys/dev/aic7xxx/aic79xx_osm.c
371
if (aic_get_transaction_status(scb) == CAM_REQ_INPROG)
sys/dev/aic7xxx/aic79xx_osm.c
374
ahd_free_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx_osm.c
380
if ((scb->flags & SCB_RECOVERY_SCB) != 0) {
sys/dev/aic7xxx/aic79xx_osm.c
381
struct scb *list_scb;
sys/dev/aic7xxx/aic79xx_osm.c
385
if (aic_get_transaction_status(scb) == CAM_BDR_SENT
sys/dev/aic7xxx/aic79xx_osm.c
386
|| aic_get_transaction_status(scb) == CAM_REQ_ABORTED)
sys/dev/aic7xxx/aic79xx_osm.c
387
aic_set_transaction_status(scb, CAM_CMD_TIMEOUT);
sys/dev/aic7xxx/aic79xx_osm.c
398
aic_get_timeout(scb));
sys/dev/aic7xxx/aic79xx_osm.c
401
ahd_print_path(ahd, scb);
sys/dev/aic7xxx/aic79xx_osm.c
408
if (aic_get_transaction_status(scb) == CAM_REQ_INPROG) {
sys/dev/aic7xxx/aic79xx_osm.c
410
} else if ((scb->flags & SCB_SENSE) != 0) {
sys/dev/aic7xxx/aic79xx_osm.c
423
ahd_get_sense_buf(ahd, scb),
sys/dev/aic7xxx/aic79xx_osm.c
427
scb->io_ctx->ccb_h.status |= CAM_AUTOSNS_VALID;
sys/dev/aic7xxx/aic79xx_osm.c
428
} else if ((scb->flags & SCB_PKT_SENSE) != 0) {
sys/dev/aic7xxx/aic79xx_osm.c
435
siu = (struct scsi_status_iu_header *)scb->sense_data;
sys/dev/aic7xxx/aic79xx_osm.c
440
ahd_get_sense_buf(ahd, scb) + SIU_SENSE_OFFSET(siu),
sys/dev/aic7xxx/aic79xx_osm.c
454
scb->io_ctx->ccb_h.status |= CAM_AUTOSNS_VALID;
sys/dev/aic7xxx/aic79xx_osm.c
457
ahd_free_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx_osm.c
523
struct scb *scb;
sys/dev/aic7xxx/aic79xx_osm.c
550
if ((scb = ahd_get_scb(ahd, col_idx)) == NULL) {
sys/dev/aic7xxx/aic79xx_osm.c
558
hscb = scb->hscb;
sys/dev/aic7xxx/aic79xx_osm.c
561
("start scb(%p)\n", scb));
sys/dev/aic7xxx/aic79xx_osm.c
562
scb->io_ctx = ccb;
sys/dev/aic7xxx/aic79xx_osm.c
566
ccb->ccb_h.ccb_scb_ptr = scb;
sys/dev/aic7xxx/aic79xx_osm.c
576
scb->flags |= SCB_DEVICE_RESET;
sys/dev/aic7xxx/aic79xx_osm.c
579
ahd_execute_scb(scb, NULL, 0, 0);
sys/dev/aic7xxx/aic79xx_osm.c
587
scb->flags |= SCB_TARGET_IMMEDIATE;
sys/dev/aic7xxx/aic79xx_osm.c
606
ahd_setup_data(ahd, sim, &ccb->csio, scb);
sys/dev/aic7xxx/aic79xx_osm.c
70
struct ccb_scsiio *csio, struct scb *scb);
sys/dev/aic7xxx/aic79xx_osm.c
951
struct scb *scb;
sys/dev/aic7xxx/aic79xx_osm.c
958
scb = (struct scb *)arg;
sys/dev/aic7xxx/aic79xx_osm.c
959
ccb = scb->io_ctx;
sys/dev/aic7xxx/aic79xx_osm.c
960
ahd = scb->ahd_softc;
sys/dev/aic7xxx/aic79xx_osm.c
964
aic_set_transaction_status(scb, CAM_REQ_TOO_BIG);
sys/dev/aic7xxx/aic79xx_osm.c
966
aic_set_transaction_status(scb, CAM_REQ_CMP_ERR);
sys/dev/aic7xxx/aic79xx_osm.c
968
bus_dmamap_unload(ahd->buffer_dmat, scb->dmamap);
sys/dev/aic7xxx/aic79xx_osm.c
969
ahd_free_scb(ahd, scb);
sys/dev/aic7xxx/aic79xx_osm.c
973
scb->sg_count = 0;
sys/dev/aic7xxx/aic79xx_osm.c
979
for (i = nsegments, sg = scb->sg_list; i > 0; i--) {
sys/dev/aic7xxx/aic79xx_osm.c
980
sg = ahd_sg_setup(ahd, scb, sg, dm_segs->ds_addr,
sys/dev/aic7xxx/aic79xx_osm.c
986
ahd_sync_ccb(ahd, scb, ccb, false);
sys/dev/aic7xxx/aic79xx_osm.c
991
tdata = &scb->hscb->shared_data.tdata;
sys/dev/aic7xxx/aic79xx_osm.h
228
static __inline void ahd_print_path(struct ahd_softc *, struct scb *);
sys/dev/aic7xxx/aic79xx_osm.h
232
ahd_print_path(struct ahd_softc *ahd, struct scb *scb)
sys/dev/aic7xxx/aic79xx_osm.h
234
xpt_print_path(scb->io_ctx->ccb_h.path);
sys/dev/aic7xxx/aic79xx_osm.h
267
void ahd_done(struct ahd_softc *ahd, struct scb *scb);
sys/dev/aic7xxx/aic79xx_osm.h
85
#define SCB_GET_SIM(ahd, scb) \
sys/dev/aic7xxx/aic7xxx.c
1005
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/aic7xxx/aic7xxx.c
1006
if (scb != NULL
sys/dev/aic7xxx/aic7xxx.c
1008
scb = NULL;
sys/dev/aic7xxx/aic7xxx.c
1084
if (scb != NULL) {
sys/dev/aic7xxx/aic7xxx.c
1085
if (SCB_IS_SILENT(scb))
sys/dev/aic7xxx/aic7xxx.c
1088
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
1089
scb->flags |= SCB_TRANSMISSION_ERROR;
sys/dev/aic7xxx/aic7xxx.c
1176
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/aic7xxx/aic7xxx.c
1177
if (scb == NULL) {
sys/dev/aic7xxx/aic7xxx.c
1186
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
1191
ahc_scb_devinfo(ahc, &devinfo, scb);
sys/dev/aic7xxx/aic7xxx.c
1192
aic_set_transaction_status(scb, CAM_SEL_TIMEOUT);
sys/dev/aic7xxx/aic7xxx.c
1193
ahc_freeze_devq(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
1261
tag = scb->hscb->tag;
sys/dev/aic7xxx/aic7xxx.c
1262
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
1264
scb->hscb->tag, tag == SCB_LIST_NULL ?
sys/dev/aic7xxx/aic7xxx.c
1278
if (scb != NULL
sys/dev/aic7xxx/aic7xxx.c
1279
&& scb->io_ctx->ccb_h.func_code== XPT_RESET_DEV
sys/dev/aic7xxx/aic7xxx.c
1280
&& ahc_match_scb(ahc, scb, target, channel,
sys/dev/aic7xxx/aic7xxx.c
1284
aic_set_transaction_status(scb, CAM_REQ_CMP);
sys/dev/aic7xxx/aic7xxx.c
1314
ahc_qinfifo_requeue_tail(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
1326
ahc_qinfifo_requeue_tail(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
1340
ahc_qinfifo_requeue_tail(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
1347
if (scb != NULL) {
sys/dev/aic7xxx/aic7xxx.c
1350
if ((scb->hscb->control & TAG_ENB) != 0)
sys/dev/aic7xxx/aic7xxx.c
1351
tag = scb->hscb->tag;
sys/dev/aic7xxx/aic7xxx.c
1354
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
1356
SCB_GET_LUN(scb), tag,
sys/dev/aic7xxx/aic7xxx.c
1524
ahc_print_scb(struct scb *scb)
sys/dev/aic7xxx/aic7xxx.c
1528
struct hardware_scb *hscb = scb->hscb;
sys/dev/aic7xxx/aic7xxx.c
1531
(void *)scb,
sys/dev/aic7xxx/aic7xxx.c
1544
if (scb->sg_count > 0) {
sys/dev/aic7xxx/aic7xxx.c
1545
for (i = 0; i < scb->sg_count; i++) {
sys/dev/aic7xxx/aic7xxx.c
1548
(aic_le32toh(scb->sg_list[i].len) >> 24
sys/dev/aic7xxx/aic7xxx.c
1550
aic_le32toh(scb->sg_list[i].addr),
sys/dev/aic7xxx/aic7xxx.c
1551
aic_le32toh(scb->sg_list[i].len));
sys/dev/aic7xxx/aic7xxx.c
160
struct scb *scb);
sys/dev/aic7xxx/aic7xxx.c
164
struct scb *scb);
sys/dev/aic7xxx/aic7xxx.c
201
struct scb *scb);
sys/dev/aic7xxx/aic7xxx.c
209
struct scb *prev_scb,
sys/dev/aic7xxx/aic7xxx.c
2091
struct scb *pending_scb;
sys/dev/aic7xxx/aic7xxx.c
210
struct scb *scb);
sys/dev/aic7xxx/aic7xxx.c
2240
struct scb *scb)
sys/dev/aic7xxx/aic7xxx.c
2245
our_id = SCSIID_OUR_ID(scb->hscb->scsiid);
sys/dev/aic7xxx/aic7xxx.c
2247
if ((scb->flags & SCB_TARGET_SCB) != 0)
sys/dev/aic7xxx/aic7xxx.c
2249
ahc_compile_devinfo(devinfo, our_id, SCB_GET_TARGET(ahc, scb),
sys/dev/aic7xxx/aic7xxx.c
2250
SCB_GET_LUN(scb), SCB_GET_CHANNEL(ahc, scb), role);
sys/dev/aic7xxx/aic7xxx.c
2273
struct scb *scb)
sys/dev/aic7xxx/aic7xxx.c
228
struct scb *scb,
sys/dev/aic7xxx/aic7xxx.c
2283
if ((scb->flags & SCB_DEVICE_RESET) == 0
sys/dev/aic7xxx/aic7xxx.c
2287
identify_msg = MSG_IDENTIFYFLAG | SCB_GET_LUN(scb);
sys/dev/aic7xxx/aic7xxx.c
2288
if ((scb->hscb->control & DISCENB) != 0)
sys/dev/aic7xxx/aic7xxx.c
229
struct scb *other_scb);
sys/dev/aic7xxx/aic7xxx.c
2293
if ((scb->hscb->control & TAG_ENB) != 0) {
sys/dev/aic7xxx/aic7xxx.c
2295
scb->hscb->control & (TAG_ENB|SCB_TAG_TYPE);
sys/dev/aic7xxx/aic7xxx.c
2296
ahc->msgout_buf[ahc->msgout_index++] = scb->hscb->tag;
sys/dev/aic7xxx/aic7xxx.c
2301
if (scb->flags & SCB_DEVICE_RESET) {
sys/dev/aic7xxx/aic7xxx.c
2304
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
2314
} else if ((scb->flags & SCB_ABORT) != 0) {
sys/dev/aic7xxx/aic7xxx.c
2315
if ((scb->hscb->control & TAG_ENB) != 0)
sys/dev/aic7xxx/aic7xxx.c
2320
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
2322
(scb->hscb->control & TAG_ENB) != 0 ? " Tag" : "");
sys/dev/aic7xxx/aic7xxx.c
2331
} else if ((scb->flags & (SCB_AUTO_NEGOTIATE|SCB_NEGOTIATE)) != 0) {
sys/dev/aic7xxx/aic7xxx.c
2336
printf("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid,
sys/dev/aic7xxx/aic7xxx.c
2339
"SCB flags = %x", scb->hscb->tag, scb->hscb->control,
sys/dev/aic7xxx/aic7xxx.c
2340
ahc_inb(ahc, MSG_OUT), scb->flags);
sys/dev/aic7xxx/aic7xxx.c
2348
scb->hscb->control &= ~MK_MESSAGE;
sys/dev/aic7xxx/aic7xxx.c
2546
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
2555
scb = ahc_lookup_scb(ahc, scbid);
sys/dev/aic7xxx/aic7xxx.c
2568
scb = NULL;
sys/dev/aic7xxx/aic7xxx.c
2569
} else if (scb == NULL) {
sys/dev/aic7xxx/aic7xxx.c
2578
aic_set_transaction_status(scb, CAM_SEQUENCE_FAIL);
sys/dev/aic7xxx/aic7xxx.c
2580
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
2590
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
2593
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
2620
if (scb == NULL) {
sys/dev/aic7xxx/aic7xxx.c
2627
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
2628
scb->flags |= SCB_ABORT;
sys/dev/aic7xxx/aic7xxx.c
309
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
334
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/aic7xxx/aic7xxx.c
335
if (scb == NULL) {
sys/dev/aic7xxx/aic7xxx.c
347
ahc_update_residual(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
348
ahc_done(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
3487
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
3495
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/aic7xxx/aic7xxx.c
3554
} else if ((scb->hscb->control & MSG_SIMPLE_TASK) != 0) {
sys/dev/aic7xxx/aic7xxx.c
3558
tag_type = (scb->hscb->control & MSG_SIMPLE_TASK);
sys/dev/aic7xxx/aic7xxx.c
3582
scb->hscb->control &= mask;
sys/dev/aic7xxx/aic7xxx.c
3583
aic_set_transaction_tag(scb, /*enabled*/FALSE,
sys/dev/aic7xxx/aic7xxx.c
3597
TAILQ_INSERT_HEAD(untagged_q, scb, links.tqe);
sys/dev/aic7xxx/aic7xxx.c
3598
scb->flags |= SCB_UNTAGGEDQ;
sys/dev/aic7xxx/aic7xxx.c
3600
ahc_busy_tcl(ahc, BUILD_TCL(scb->hscb->scsiid, devinfo->lun),
sys/dev/aic7xxx/aic7xxx.c
3601
scb->hscb->tag);
sys/dev/aic7xxx/aic7xxx.c
3608
ahc_search_qinfifo(ahc, SCB_GET_TARGET(ahc, scb),
sys/dev/aic7xxx/aic7xxx.c
3609
SCB_GET_CHANNEL(ahc, scb),
sys/dev/aic7xxx/aic7xxx.c
3610
SCB_GET_LUN(scb), /*tag*/SCB_LIST_NULL,
sys/dev/aic7xxx/aic7xxx.c
3631
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
3634
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/aic7xxx/aic7xxx.c
364
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
3640
|| aic_get_transfer_dir(scb) != CAM_DIR_IN) {
sys/dev/aic7xxx/aic7xxx.c
3685
sg = ahc_sg_bus_to_virt(scb, sgptr);
sys/dev/aic7xxx/aic7xxx.c
369
if ((scb = TAILQ_FIRST(queue)) != NULL
sys/dev/aic7xxx/aic7xxx.c
3693
if (sg != scb->sg_list
sys/dev/aic7xxx/aic7xxx.c
370
&& (scb->flags & SCB_ACTIVE) == 0) {
sys/dev/aic7xxx/aic7xxx.c
3708
sgptr = ahc_sg_virt_to_bus(scb, sg);
sys/dev/aic7xxx/aic7xxx.c
371
scb->flags |= SCB_ACTIVE;
sys/dev/aic7xxx/aic7xxx.c
3731
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
3739
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/aic7xxx/aic7xxx.c
3746
sg = ahc_sg_bus_to_virt(scb, sgptr);
sys/dev/aic7xxx/aic7xxx.c
375
aic_scb_timer_start(scb);
sys/dev/aic7xxx/aic7xxx.c
376
ahc_queue_scb(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
3841
struct scb *scb)
sys/dev/aic7xxx/aic7xxx.c
3852
if (scb != NULL && (scb->flags & SCB_AUTO_NEGOTIATE) != 0)
sys/dev/aic7xxx/aic7xxx.c
413
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
4286
(struct scb *)malloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC,
sys/dev/aic7xxx/aic7xxx.c
4290
memset(scb_data->scbarray, 0, sizeof(struct scb) * AHC_SCB_MAX_ALLOC);
sys/dev/aic7xxx/aic7xxx.c
4471
struct scb *next_scb;
sys/dev/aic7xxx/aic7xxx.c
448
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/aic7xxx/aic7xxx.c
449
if (scb == NULL) {
sys/dev/aic7xxx/aic7xxx.c
459
hscb = scb->hscb;
sys/dev/aic7xxx/aic7xxx.c
462
if ((scb->flags & SCB_SENSE) != 0) {
sys/dev/aic7xxx/aic7xxx.c
468
scb->flags &= ~SCB_SENSE;
sys/dev/aic7xxx/aic7xxx.c
469
aic_set_transaction_status(scb, CAM_AUTOSENSE_FAIL);
sys/dev/aic7xxx/aic7xxx.c
472
aic_set_transaction_status(scb, CAM_SCSI_STATUS_ERROR);
sys/dev/aic7xxx/aic7xxx.c
474
ahc_freeze_devq(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
475
aic_freeze_scb(scb);
sys/dev/aic7xxx/aic7xxx.c
476
aic_set_scsi_status(scb, hscb->shared_data.status.scsi_status);
sys/dev/aic7xxx/aic7xxx.c
492
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
494
scb->hscb->tag);
sys/dev/aic7xxx/aic7xxx.c
4966
(u_int)sizeof(struct scb),
sys/dev/aic7xxx/aic7xxx.c
498
if (aic_perform_autosense(scb) == 0)
sys/dev/aic7xxx/aic7xxx.c
507
sg = scb->sg_list;
sys/dev/aic7xxx/aic7xxx.c
512
ahc_update_residual(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
515
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
519
sg->addr = ahc_get_sense_bufaddr(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
520
sg->len = aic_get_sense_bufsize(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
5280
ahc_match_scb(struct ahc_softc *ahc, struct scb *scb, int target,
sys/dev/aic7xxx/aic7xxx.c
5283
int targ = SCB_GET_TARGET(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
5284
char chan = SCB_GET_CHANNEL(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
5285
int slun = SCB_GET_LUN(scb);
sys/dev/aic7xxx/aic7xxx.c
5297
group = XPT_FC_GROUP(scb->io_ctx->ccb_h.func_code);
sys/dev/aic7xxx/aic7xxx.c
530
&& SCB_GET_LUN(scb) < 8)
sys/dev/aic7xxx/aic7xxx.c
5300
&& ((tag == scb->hscb->tag)
sys/dev/aic7xxx/aic7xxx.c
5304
&& ((tag == scb->io_ctx->csio.tag_id)
sys/dev/aic7xxx/aic7xxx.c
5308
match = ((tag == scb->hscb->tag) || (tag == SCB_LIST_NULL));
sys/dev/aic7xxx/aic7xxx.c
531
sc->byte2 = SCB_GET_LUN(scb) << 5;
sys/dev/aic7xxx/aic7xxx.c
5316
ahc_freeze_devq(struct ahc_softc *ahc, struct scb *scb)
sys/dev/aic7xxx/aic7xxx.c
5322
target = SCB_GET_TARGET(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
5323
lun = SCB_GET_LUN(scb);
sys/dev/aic7xxx/aic7xxx.c
5324
channel = SCB_GET_CHANNEL(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
5330
ahc_platform_freeze_devq(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
5334
ahc_qinfifo_requeue_tail(struct ahc_softc *ahc, struct scb *scb)
sys/dev/aic7xxx/aic7xxx.c
5336
struct scb *prev_scb;
sys/dev/aic7xxx/aic7xxx.c
5347
ahc_qinfifo_requeue(ahc, prev_scb, scb);
sys/dev/aic7xxx/aic7xxx.c
5356
ahc_qinfifo_requeue(struct ahc_softc *ahc, struct scb *prev_scb,
sys/dev/aic7xxx/aic7xxx.c
5357
struct scb *scb)
sys/dev/aic7xxx/aic7xxx.c
5360
ahc_outb(ahc, NEXT_QUEUED_SCB, scb->hscb->tag);
sys/dev/aic7xxx/aic7xxx.c
5362
prev_scb->hscb->next = scb->hscb->tag;
sys/dev/aic7xxx/aic7xxx.c
5366
ahc->qinfifo[ahc->qinfifonext++] = scb->hscb->tag;
sys/dev/aic7xxx/aic7xxx.c
5367
scb->hscb->next = ahc->next_queued_scb->hscb->tag;
sys/dev/aic7xxx/aic7xxx.c
5368
ahc_sync_scb(ahc, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
sys/dev/aic7xxx/aic7xxx.c
5391
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
5392
struct scb *prev_scb;
sys/dev/aic7xxx/aic7xxx.c
5429
scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinpos]);
sys/dev/aic7xxx/aic7xxx.c
5430
if (scb == NULL) {
sys/dev/aic7xxx/aic7xxx.c
5436
if (ahc_match_scb(ahc, scb, target, channel, lun, tag, role)) {
sys/dev/aic7xxx/aic7xxx.c
5447
ostat = aic_get_transaction_status(scb);
sys/dev/aic7xxx/aic7xxx.c
5449
aic_set_transaction_status(scb, status);
sys/dev/aic7xxx/aic7xxx.c
5450
cstat = aic_get_transaction_status(scb);
sys/dev/aic7xxx/aic7xxx.c
5452
aic_freeze_scb(scb);
sys/dev/aic7xxx/aic7xxx.c
5453
if ((scb->flags & SCB_ACTIVE) == 0)
sys/dev/aic7xxx/aic7xxx.c
5455
ahc_done(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
5462
ahc_qinfifo_requeue(ahc, prev_scb, scb);
sys/dev/aic7xxx/aic7xxx.c
5463
prev_scb = scb;
sys/dev/aic7xxx/aic7xxx.c
5467
ahc_qinfifo_requeue(ahc, prev_scb, scb);
sys/dev/aic7xxx/aic7xxx.c
5468
prev_scb = scb;
sys/dev/aic7xxx/aic7xxx.c
5494
scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinstart]);
sys/dev/aic7xxx/aic7xxx.c
5496
if (scb == NULL) {
sys/dev/aic7xxx/aic7xxx.c
5507
next = scb->hscb->next;
sys/dev/aic7xxx/aic7xxx.c
5508
ahc->scb_data->scbindex[scb->hscb->tag] = NULL;
sys/dev/aic7xxx/aic7xxx.c
5509
ahc_swap_with_next_hscb(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
5510
scb->hscb->next = next;
sys/dev/aic7xxx/aic7xxx.c
5511
ahc->qinfifo[qinstart] = scb->hscb->tag;
sys/dev/aic7xxx/aic7xxx.c
5514
ahc_outb(ahc, NEXT_QUEUED_SCB, scb->hscb->tag);
sys/dev/aic7xxx/aic7xxx.c
5518
scb = ahc_lookup_scb(ahc, ahc->qinfifo[qintail]);
sys/dev/aic7xxx/aic7xxx.c
5519
scb->hscb->next = ahc->next_queued_scb->hscb->tag;
sys/dev/aic7xxx/aic7xxx.c
554
if (aic_get_residual(scb)
sys/dev/aic7xxx/aic7xxx.c
5541
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/aic7xxx/aic7xxx.c
5542
if (scb == NULL) {
sys/dev/aic7xxx/aic7xxx.c
5547
if (ahc_match_scb(ahc, scb, target, channel,
sys/dev/aic7xxx/aic7xxx.c
555
== aic_get_transfer_length(scb)) {
sys/dev/aic7xxx/aic7xxx.c
5559
ostat = aic_get_transaction_status(scb);
sys/dev/aic7xxx/aic7xxx.c
5561
aic_set_transaction_status(scb,
sys/dev/aic7xxx/aic7xxx.c
5563
cstat = aic_get_transaction_status(scb);
sys/dev/aic7xxx/aic7xxx.c
5565
aic_freeze_scb(scb);
sys/dev/aic7xxx/aic7xxx.c
5566
if ((scb->flags & SCB_ACTIVE) == 0)
sys/dev/aic7xxx/aic7xxx.c
5568
ahc_done(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
5600
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
562
scb->flags &= ~SCB_NEGOTIATE;
sys/dev/aic7xxx/aic7xxx.c
5629
struct scb *next_scb;
sys/dev/aic7xxx/aic7xxx.c
563
scb->flags |= SCB_AUTO_NEGOTIATE;
sys/dev/aic7xxx/aic7xxx.c
5634
scb = next_scb;
sys/dev/aic7xxx/aic7xxx.c
5635
next_scb = TAILQ_NEXT(scb, links.tqe);
sys/dev/aic7xxx/aic7xxx.c
5646
if ((scb->flags & SCB_ACTIVE) != 0)
sys/dev/aic7xxx/aic7xxx.c
5649
if (ahc_match_scb(ahc, scb, target, channel, lun,
sys/dev/aic7xxx/aic7xxx.c
5651
|| (ctx != NULL && ctx != scb->io_ctx))
sys/dev/aic7xxx/aic7xxx.c
5664
ostat = aic_get_transaction_status(scb);
sys/dev/aic7xxx/aic7xxx.c
5666
aic_set_transaction_status(scb, status);
sys/dev/aic7xxx/aic7xxx.c
5667
cstat = aic_get_transaction_status(scb);
sys/dev/aic7xxx/aic7xxx.c
5669
aic_freeze_scb(scb);
sys/dev/aic7xxx/aic7xxx.c
5670
ahc_done(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
5674
scb->flags &= ~SCB_UNTAGGEDQ;
sys/dev/aic7xxx/aic7xxx.c
5675
TAILQ_REMOVE(untagged_q, scb, links.tqe);
sys/dev/aic7xxx/aic7xxx.c
568
hscb->sgptr = scb->sg_list_phys | SG_FULL_RESID;
sys/dev/aic7xxx/aic7xxx.c
5693
struct scb *scbp;
sys/dev/aic7xxx/aic7xxx.c
570
scb->sg_count = 1;
sys/dev/aic7xxx/aic7xxx.c
571
scb->flags |= SCB_SENSE;
sys/dev/aic7xxx/aic7xxx.c
572
ahc_qinfifo_requeue_tail(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
582
|| (scb->flags & SCB_RECOVERY_SCB) != 0)
sys/dev/aic7xxx/aic7xxx.c
583
aic_scb_timer_reset(scb, 5 * 1000);
sys/dev/aic7xxx/aic7xxx.c
5855
struct scb *scbp;
sys/dev/aic7xxx/aic7xxx.c
5856
struct scb *scbp_next;
sys/dev/aic7xxx/aic7xxx.c
6171
ahc_calc_residual(struct ahc_softc *ahc, struct scb *scb)
sys/dev/aic7xxx/aic7xxx.c
6195
hscb = scb->hscb;
sys/dev/aic7xxx/aic7xxx.c
6210
resid = aic_get_transfer_length(scb);
sys/dev/aic7xxx/aic7xxx.c
6226
sg = ahc_sg_bus_to_virt(scb, resid_sgptr & SG_PTR_MASK);
sys/dev/aic7xxx/aic7xxx.c
6241
if ((scb->flags & SCB_SENSE) == 0)
sys/dev/aic7xxx/aic7xxx.c
6242
aic_set_residual(scb, resid);
sys/dev/aic7xxx/aic7xxx.c
6244
aic_set_sense_residual(scb, resid);
sys/dev/aic7xxx/aic7xxx.c
6248
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
6250
(scb->flags & SCB_SENSE) ? "Sense " : "", resid);
sys/dev/aic7xxx/aic7xxx.c
6690
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
6821
LIST_FOREACH(scb, &ahc->pending_scbs, pending_links) {
sys/dev/aic7xxx/aic7xxx.c
6824
cur_col = printf("\n%3d ", scb->hscb->tag);
sys/dev/aic7xxx/aic7xxx.c
6825
ahc_scb_control_print(scb->hscb->control, &cur_col, 60);
sys/dev/aic7xxx/aic7xxx.c
6826
ahc_scb_scsiid_print(scb->hscb->scsiid, &cur_col, 60);
sys/dev/aic7xxx/aic7xxx.c
6827
ahc_scb_lun_print(scb->hscb->lun, &cur_col, 60);
sys/dev/aic7xxx/aic7xxx.c
6829
ahc_outb(ahc, SCBPTR, scb->hscb->tag);
sys/dev/aic7xxx/aic7xxx.c
6841
SLIST_FOREACH(scb, &ahc->scb_data->free_scbs, links.sle) {
sys/dev/aic7xxx/aic7xxx.c
6844
printf("%d ", scb->hscb->tag);
sys/dev/aic7xxx/aic7xxx.c
685
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
6855
TAILQ_FOREACH(scb, untagged_q, links.tqe) {
sys/dev/aic7xxx/aic7xxx.c
6858
printf("%d ", scb->hscb->tag);
sys/dev/aic7xxx/aic7xxx.c
6872
ahc_timeout(struct scb *scb)
sys/dev/aic7xxx/aic7xxx.c
6876
ahc = scb->ahc_softc;
sys/dev/aic7xxx/aic7xxx.c
6877
if ((scb->flags & SCB_ACTIVE) != 0) {
sys/dev/aic7xxx/aic7xxx.c
6878
if ((scb->flags & SCB_TIMEDOUT) == 0) {
sys/dev/aic7xxx/aic7xxx.c
6879
LIST_INSERT_HEAD(&ahc->timedout_scbs, scb,
sys/dev/aic7xxx/aic7xxx.c
6881
scb->flags |= SCB_TIMEDOUT;
sys/dev/aic7xxx/aic7xxx.c
6894
ahc_other_scb_timeout(struct ahc_softc *ahc, struct scb *scb,
sys/dev/aic7xxx/aic7xxx.c
6895
struct scb *other_scb)
sys/dev/aic7xxx/aic7xxx.c
6900
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
6902
(scb->flags & SCB_OTHERTCL_TIMEOUT) != 0
sys/dev/aic7xxx/aic7xxx.c
6905
newtimeout = aic_get_timeout(scb);
sys/dev/aic7xxx/aic7xxx.c
6906
scb->flags |= SCB_OTHERTCL_TIMEOUT;
sys/dev/aic7xxx/aic7xxx.c
6930
aic_scb_timer_reset(scb, newtimeout);
sys/dev/aic7xxx/aic7xxx.c
6932
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
6949
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
6981
while ((scb = LIST_FIRST(&ahc->timedout_scbs)) != NULL) {
sys/dev/aic7xxx/aic7xxx.c
6989
target = SCB_GET_TARGET(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
6990
channel = SCB_GET_CHANNEL(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
6991
lun = SCB_GET_LUN(scb);
sys/dev/aic7xxx/aic7xxx.c
6993
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
6994
printf("SCB 0x%x - timed out\n", scb->hscb->tag);
sys/dev/aic7xxx/aic7xxx.c
6995
if (scb->sg_count > 0) {
sys/dev/aic7xxx/aic7xxx.c
6996
for (i = 0; i < scb->sg_count; i++) {
sys/dev/aic7xxx/aic7xxx.c
6999
scb->sg_list[i].addr,
sys/dev/aic7xxx/aic7xxx.c
7000
scb->sg_list[i].len & AHC_SG_LEN_MASK);
sys/dev/aic7xxx/aic7xxx.c
7003
if (scb->flags & (SCB_DEVICE_RESET|SCB_ABORT)) {
sys/dev/aic7xxx/aic7xxx.c
7008
aic_set_transaction_status(scb, CAM_CMD_TIMEOUT);
sys/dev/aic7xxx/aic7xxx.c
7022
LIST_REMOVE(scb, timedout_links);
sys/dev/aic7xxx/aic7xxx.c
7023
scb->flags &= ~SCB_TIMEDOUT;
sys/dev/aic7xxx/aic7xxx.c
705
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/aic7xxx/aic7xxx.c
7052
struct scb *active_scb;
sys/dev/aic7xxx/aic7xxx.c
7061
if (active_scb != scb) {
sys/dev/aic7xxx/aic7xxx.c
7062
if (ahc_other_scb_timeout(ahc, scb,
sys/dev/aic7xxx/aic7xxx.c
7069
if ((scb->flags & SCB_TARGET_SCB) != 0) {
sys/dev/aic7xxx/aic7xxx.c
707
if (scb == NULL)
sys/dev/aic7xxx/aic7xxx.c
7074
ahc_abort_scbs(ahc, SCB_GET_TARGET(ahc, scb),
sys/dev/aic7xxx/aic7xxx.c
7075
SCB_GET_CHANNEL(ahc, scb),
sys/dev/aic7xxx/aic7xxx.c
7076
SCB_GET_LUN(scb),
sys/dev/aic7xxx/aic7xxx.c
7077
scb->hscb->tag,
sys/dev/aic7xxx/aic7xxx.c
7092
aic_scb_timer_reset(scb, 2 * 1000);
sys/dev/aic7xxx/aic7xxx.c
7118
if ((scb->flags & SCB_TARGET_SCB) != 0)
sys/dev/aic7xxx/aic7xxx.c
7122
scb->hscb->tag, ROLE_INITIATOR,
sys/dev/aic7xxx/aic7xxx.c
7130
ahc_set_recoveryscb(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
714
scb);
sys/dev/aic7xxx/aic7xxx.c
7147
scb->hscb->control |= MK_MESSAGE|DISCONNECTED;
sys/dev/aic7xxx/aic7xxx.c
7148
scb->flags |= SCB_DEVICE_RESET;
sys/dev/aic7xxx/aic7xxx.c
7158
lun, scb->hscb->tag,
sys/dev/aic7xxx/aic7xxx.c
7171
ahc_outb(ahc, SCBPTR, scb->hscb->tag);
sys/dev/aic7xxx/aic7xxx.c
7183
SCB_GET_TARGET(ahc, scb),
sys/dev/aic7xxx/aic7xxx.c
7184
channel, SCB_GET_LUN(scb),
sys/dev/aic7xxx/aic7xxx.c
7189
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
7191
ahc_qinfifo_requeue_tail(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
7193
aic_scb_timer_reset(scb, 2 * 1000);
sys/dev/aic7xxx/aic7xxx.c
7197
ahc_set_recoveryscb(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
7198
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
7200
"Flags = 0x%x\n", scb->hscb->tag,
sys/dev/aic7xxx/aic7xxx.c
7201
scb->flags);
sys/dev/aic7xxx/aic7xxx.c
7213
while ((scb = LIST_FIRST(&ahc->timedout_scbs)) != NULL) {
sys/dev/aic7xxx/aic7xxx.c
7214
LIST_REMOVE(scb, timedout_links);
sys/dev/aic7xxx/aic7xxx.c
7215
scb->flags &= ~SCB_TIMEDOUT;
sys/dev/aic7xxx/aic7xxx.c
731
scb);
sys/dev/aic7xxx/aic7xxx.c
7518
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
7527
LIST_FOREACH(scb, &ahc->pending_scbs, pending_links) {
sys/dev/aic7xxx/aic7xxx.c
7530
ccbh = &scb->io_ctx->ccb_h;
sys/dev/aic7xxx/aic7xxx.c
788
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.c
795
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/aic7xxx/aic7xxx.c
796
if (scb != NULL)
sys/dev/aic7xxx/aic7xxx.c
797
aic_set_transaction_status(scb,
sys/dev/aic7xxx/aic7xxx.c
822
scb = ahc_lookup_scb(ahc, scbindex);
sys/dev/aic7xxx/aic7xxx.c
827
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
831
scb->hscb->tag);
sys/dev/aic7xxx/aic7xxx.c
832
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
835
aic_get_transfer_length(scb), scb->sg_count);
sys/dev/aic7xxx/aic7xxx.c
836
if (scb->sg_count > 0) {
sys/dev/aic7xxx/aic7xxx.c
837
for (i = 0; i < scb->sg_count; i++) {
sys/dev/aic7xxx/aic7xxx.c
840
(aic_le32toh(scb->sg_list[i].len) >> 24
sys/dev/aic7xxx/aic7xxx.c
842
aic_le32toh(scb->sg_list[i].addr),
sys/dev/aic7xxx/aic7xxx.c
843
aic_le32toh(scb->sg_list[i].len)
sys/dev/aic7xxx/aic7xxx.c
851
ahc_freeze_devq(ahc, scb);
sys/dev/aic7xxx/aic7xxx.c
852
if ((scb->flags & SCB_SENSE) == 0) {
sys/dev/aic7xxx/aic7xxx.c
853
aic_set_transaction_status(scb, CAM_DATA_RUN_ERR);
sys/dev/aic7xxx/aic7xxx.c
855
scb->flags &= ~SCB_SENSE;
sys/dev/aic7xxx/aic7xxx.c
856
aic_set_transaction_status(scb, CAM_AUTOSENSE_FAIL);
sys/dev/aic7xxx/aic7xxx.c
858
aic_freeze_scb(scb);
sys/dev/aic7xxx/aic7xxx.c
889
scb = ahc_lookup_scb(ahc, scbindex);
sys/dev/aic7xxx/aic7xxx.c
890
if (scb != NULL
sys/dev/aic7xxx/aic7xxx.c
891
&& (scb->flags & SCB_RECOVERY_SCB) != 0)
sys/dev/aic7xxx/aic7xxx.c
896
ahc_search_qinfifo(ahc, SCB_GET_TARGET(ahc, scb),
sys/dev/aic7xxx/aic7xxx.c
897
SCB_GET_CHANNEL(ahc, scb),
sys/dev/aic7xxx/aic7xxx.c
898
SCB_GET_LUN(scb), scb->hscb->tag,
sys/dev/aic7xxx/aic7xxx.c
969
struct scb *scb;
sys/dev/aic7xxx/aic7xxx.h
100
(0x01 << (SCB_GET_TARGET_OFFSET(ahc, scb)))
sys/dev/aic7xxx/aic7xxx.h
102
#define SCB_IS_SILENT(scb) \
sys/dev/aic7xxx/aic7xxx.h
104
&& (((scb)->flags & SCB_SILENT) != 0))
sys/dev/aic7xxx/aic7xxx.h
106
#define SCB_IS_SILENT(scb) \
sys/dev/aic7xxx/aic7xxx.h
107
(((scb)->flags & SCB_SILENT) != 0)
sys/dev/aic7xxx/aic7xxx.h
1208
struct scb *scb);
sys/dev/aic7xxx/aic7xxx.h
1209
int ahc_match_scb(struct ahc_softc *ahc, struct scb *scb,
sys/dev/aic7xxx/aic7xxx.h
1262
void ahc_freeze_devq(struct ahc_softc *ahc, struct scb *scb);
sys/dev/aic7xxx/aic7xxx.h
1270
struct scb *scb);
sys/dev/aic7xxx/aic7xxx.h
1271
void ahc_timeout(struct scb *scb);
sys/dev/aic7xxx/aic7xxx.h
1359
void ahc_print_scb(struct scb *scb);
sys/dev/aic7xxx/aic7xxx.h
584
SLIST_ENTRY(scb) sle;
sys/dev/aic7xxx/aic7xxx.h
585
TAILQ_ENTRY(scb) tqe;
sys/dev/aic7xxx/aic7xxx.h
587
LIST_ENTRY(scb) pending_links;
sys/dev/aic7xxx/aic7xxx.h
588
LIST_ENTRY(scb) timedout_links;
sys/dev/aic7xxx/aic7xxx.h
602
SLIST_HEAD(, scb) free_scbs; /*
sys/dev/aic7xxx/aic7xxx.h
606
struct scb *scbindex[256]; /*
sys/dev/aic7xxx/aic7xxx.h
616
struct scb *scbarray; /* Array of kernel SCBs */
sys/dev/aic7xxx/aic7xxx.h
87
#define SCB_IS_SCSIBUS_B(ahc, scb) \
sys/dev/aic7xxx/aic7xxx.h
88
(SCSIID_CHANNEL(ahc, (scb)->hscb->scsiid) == 'B')
sys/dev/aic7xxx/aic7xxx.h
89
#define SCB_GET_OUR_ID(scb) \
sys/dev/aic7xxx/aic7xxx.h
891
TAILQ_HEAD(scb_tailq, scb);
sys/dev/aic7xxx/aic7xxx.h
90
SCSIID_OUR_ID((scb)->hscb->scsiid)
sys/dev/aic7xxx/aic7xxx.h
91
#define SCB_GET_TARGET(ahc, scb) \
sys/dev/aic7xxx/aic7xxx.h
92
SCSIID_TARGET((ahc), (scb)->hscb->scsiid)
sys/dev/aic7xxx/aic7xxx.h
93
#define SCB_GET_CHANNEL(ahc, scb) \
sys/dev/aic7xxx/aic7xxx.h
936
struct scb *next_queued_scb;
sys/dev/aic7xxx/aic7xxx.h
94
SCSIID_CHANNEL(ahc, (scb)->hscb->scsiid)
sys/dev/aic7xxx/aic7xxx.h
941
LIST_HEAD(, scb) pending_scbs;
sys/dev/aic7xxx/aic7xxx.h
946
LIST_HEAD(, scb) timedout_scbs;
sys/dev/aic7xxx/aic7xxx.h
95
#define SCB_GET_LUN(scb) \
sys/dev/aic7xxx/aic7xxx.h
96
((scb)->hscb->lun & LID)
sys/dev/aic7xxx/aic7xxx.h
97
#define SCB_GET_TARGET_OFFSET(ahc, scb) \
sys/dev/aic7xxx/aic7xxx.h
98
(SCB_GET_TARGET(ahc, scb) + (SCB_IS_SCSIBUS_B(ahc, scb) ? 8 : 0))
sys/dev/aic7xxx/aic7xxx.h
99
#define SCB_GET_TARGET_MASK(ahc, scb) \
sys/dev/aic7xxx/aic7xxx_inline.h
151
ahc_sg_bus_to_virt(struct scb *scb,
sys/dev/aic7xxx/aic7xxx_inline.h
154
ahc_sg_virt_to_bus(struct scb *scb,
sys/dev/aic7xxx/aic7xxx_inline.h
159
struct scb *scb, int op);
sys/dev/aic7xxx/aic7xxx_inline.h
161
struct scb *scb, int op);
sys/dev/aic7xxx/aic7xxx_inline.h
167
ahc_sg_bus_to_virt(struct scb *scb, uint32_t sg_busaddr)
sys/dev/aic7xxx/aic7xxx_inline.h
171
sg_index = (sg_busaddr - scb->sg_list_phys)/sizeof(struct ahc_dma_seg);
sys/dev/aic7xxx/aic7xxx_inline.h
175
return (&scb->sg_list[sg_index]);
sys/dev/aic7xxx/aic7xxx_inline.h
179
ahc_sg_virt_to_bus(struct scb *scb, struct ahc_dma_seg *sg)
sys/dev/aic7xxx/aic7xxx_inline.h
184
sg_index = sg - &scb->sg_list[1];
sys/dev/aic7xxx/aic7xxx_inline.h
186
return (scb->sg_list_phys + (sg_index * sizeof(*scb->sg_list)));
sys/dev/aic7xxx/aic7xxx_inline.h
197
ahc_sync_scb(struct ahc_softc *ahc, struct scb *scb, int op)
sys/dev/aic7xxx/aic7xxx_inline.h
201
/*offset*/(scb->hscb - ahc->hscbs) * sizeof(*scb->hscb),
sys/dev/aic7xxx/aic7xxx_inline.h
202
/*len*/sizeof(*scb->hscb), op);
sys/dev/aic7xxx/aic7xxx_inline.h
206
ahc_sync_sglist(struct ahc_softc *ahc, struct scb *scb, int op)
sys/dev/aic7xxx/aic7xxx_inline.h
208
if (scb->sg_count == 0)
sys/dev/aic7xxx/aic7xxx_inline.h
211
aic_dmamap_sync(ahc, ahc->scb_data->sg_dmat, scb->sg_map->sg_dmamap,
sys/dev/aic7xxx/aic7xxx_inline.h
212
/*offset*/(scb->sg_list - scb->sg_map->sg_vaddr)
sys/dev/aic7xxx/aic7xxx_inline.h
214
/*len*/sizeof(struct ahc_dma_seg) * scb->sg_count, op);
sys/dev/aic7xxx/aic7xxx_inline.h
235
struct scb *scb);
sys/dev/aic7xxx/aic7xxx_inline.h
253
static __inline struct scb*
sys/dev/aic7xxx/aic7xxx_inline.h
255
static __inline void ahc_free_scb(struct ahc_softc *ahc, struct scb *scb);
sys/dev/aic7xxx/aic7xxx_inline.h
257
struct scb *scb);
sys/dev/aic7xxx/aic7xxx_inline.h
258
static __inline void ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb);
sys/dev/aic7xxx/aic7xxx_inline.h
261
struct scb *scb);
sys/dev/aic7xxx/aic7xxx_inline.h
264
struct scb *scb);
sys/dev/aic7xxx/aic7xxx_inline.h
271
ahc_update_residual(struct ahc_softc *ahc, struct scb *scb)
sys/dev/aic7xxx/aic7xxx_inline.h
275
sgptr = aic_le32toh(scb->hscb->sgptr);
sys/dev/aic7xxx/aic7xxx_inline.h
277
ahc_calc_residual(ahc, scb);
sys/dev/aic7xxx/aic7xxx_inline.h
360
static __inline struct scb *
sys/dev/aic7xxx/aic7xxx_inline.h
363
struct scb *scb;
sys/dev/aic7xxx/aic7xxx_inline.h
365
if ((scb = SLIST_FIRST(&ahc->scb_data->free_scbs)) == NULL) {
sys/dev/aic7xxx/aic7xxx_inline.h
368
scb = SLIST_FIRST(&ahc->scb_data->free_scbs);
sys/dev/aic7xxx/aic7xxx_inline.h
369
if (scb == NULL)
sys/dev/aic7xxx/aic7xxx_inline.h
373
return (scb);
sys/dev/aic7xxx/aic7xxx_inline.h
380
ahc_free_scb(struct ahc_softc *ahc, struct scb *scb)
sys/dev/aic7xxx/aic7xxx_inline.h
384
hscb = scb->hscb;
sys/dev/aic7xxx/aic7xxx_inline.h
387
scb->flags = SCB_FLAG_NONE;
sys/dev/aic7xxx/aic7xxx_inline.h
390
SLIST_INSERT_HEAD(&ahc->scb_data->free_scbs, scb, links.sle);
sys/dev/aic7xxx/aic7xxx_inline.h
393
aic_platform_scb_free(ahc, scb);
sys/dev/aic7xxx/aic7xxx_inline.h
396
static __inline struct scb *
sys/dev/aic7xxx/aic7xxx_inline.h
399
struct scb* scb;
sys/dev/aic7xxx/aic7xxx_inline.h
401
scb = ahc->scb_data->scbindex[tag];
sys/dev/aic7xxx/aic7xxx_inline.h
402
if (scb != NULL)
sys/dev/aic7xxx/aic7xxx_inline.h
403
ahc_sync_scb(ahc, scb,
sys/dev/aic7xxx/aic7xxx_inline.h
405
return (scb);
sys/dev/aic7xxx/aic7xxx_inline.h
409
ahc_swap_with_next_hscb(struct ahc_softc *ahc, struct scb *scb)
sys/dev/aic7xxx/aic7xxx_inline.h
428
memcpy(q_hscb, scb->hscb, sizeof(*scb->hscb));
sys/dev/aic7xxx/aic7xxx_inline.h
429
if ((scb->flags & SCB_CDB32_PTR) != 0) {
sys/dev/aic7xxx/aic7xxx_inline.h
435
q_hscb->next = scb->hscb->tag;
sys/dev/aic7xxx/aic7xxx_inline.h
438
ahc->next_queued_scb->hscb = scb->hscb;
sys/dev/aic7xxx/aic7xxx_inline.h
439
scb->hscb = q_hscb;
sys/dev/aic7xxx/aic7xxx_inline.h
442
ahc->scb_data->scbindex[scb->hscb->tag] = scb;
sys/dev/aic7xxx/aic7xxx_inline.h
449
ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb)
sys/dev/aic7xxx/aic7xxx_inline.h
451
ahc_swap_with_next_hscb(ahc, scb);
sys/dev/aic7xxx/aic7xxx_inline.h
453
if (scb->hscb->tag == SCB_LIST_NULL
sys/dev/aic7xxx/aic7xxx_inline.h
454
|| scb->hscb->next == SCB_LIST_NULL)
sys/dev/aic7xxx/aic7xxx_inline.h
456
scb->hscb->tag, scb->hscb->next);
sys/dev/aic7xxx/aic7xxx_inline.h
461
scb->hscb->lun &= LID;
sys/dev/aic7xxx/aic7xxx_inline.h
462
if (aic_get_transfer_length(scb) & 0x1)
sys/dev/aic7xxx/aic7xxx_inline.h
463
scb->hscb->lun |= SCB_XFERLEN_ODD;
sys/dev/aic7xxx/aic7xxx_inline.h
468
ahc->qinfifo[ahc->qinfifonext++] = scb->hscb->tag;
sys/dev/aic7xxx/aic7xxx_inline.h
474
ahc_sync_scb(ahc, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
sys/dev/aic7xxx/aic7xxx_inline.h
489
ahc_get_sense_buf(struct ahc_softc *ahc, struct scb *scb)
sys/dev/aic7xxx/aic7xxx_inline.h
493
offset = scb - ahc->scb_data->scbarray;
sys/dev/aic7xxx/aic7xxx_inline.h
498
ahc_get_sense_bufaddr(struct ahc_softc *ahc, struct scb *scb)
sys/dev/aic7xxx/aic7xxx_inline.h
502
offset = scb - ahc->scb_data->scbarray;
sys/dev/aic7xxx/aic7xxx_osm.c
1012
aic_set_transaction_status(scb,
sys/dev/aic7xxx/aic7xxx_osm.c
1015
scb->dmamap);
sys/dev/aic7xxx/aic7xxx_osm.c
1016
ahc_free_scb(ahc, scb);
sys/dev/aic7xxx/aic7xxx_osm.c
1029
scb->hscb->dataptr = scb->sg_list->addr;
sys/dev/aic7xxx/aic7xxx_osm.c
1030
scb->hscb->datacnt = scb->sg_list->len;
sys/dev/aic7xxx/aic7xxx_osm.c
1032
scb->hscb->sgptr = aic_htole32(SG_LIST_NULL);
sys/dev/aic7xxx/aic7xxx_osm.c
1033
scb->hscb->dataptr = 0;
sys/dev/aic7xxx/aic7xxx_osm.c
1034
scb->hscb->datacnt = 0;
sys/dev/aic7xxx/aic7xxx_osm.c
1037
scb->sg_count = nsegments;
sys/dev/aic7xxx/aic7xxx_osm.c
1043
if (aic_get_transaction_status(scb) != CAM_REQ_INPROG) {
sys/dev/aic7xxx/aic7xxx_osm.c
1045
bus_dmamap_unload(ahc->buffer_dmat, scb->dmamap);
sys/dev/aic7xxx/aic7xxx_osm.c
1046
ahc_free_scb(ahc, scb);
sys/dev/aic7xxx/aic7xxx_osm.c
1051
tinfo = ahc_fetch_transinfo(ahc, SCSIID_CHANNEL(ahc, scb->hscb->scsiid),
sys/dev/aic7xxx/aic7xxx_osm.c
1052
SCSIID_OUR_ID(scb->hscb->scsiid),
sys/dev/aic7xxx/aic7xxx_osm.c
1053
SCSIID_TARGET(ahc, scb->hscb->scsiid),
sys/dev/aic7xxx/aic7xxx_osm.c
1056
mask = SCB_GET_TARGET_MASK(ahc, scb);
sys/dev/aic7xxx/aic7xxx_osm.c
1057
scb->hscb->scsirate = tinfo->scsirate;
sys/dev/aic7xxx/aic7xxx_osm.c
1058
scb->hscb->scsioffset = tinfo->curr.offset;
sys/dev/aic7xxx/aic7xxx_osm.c
1060
scb->hscb->control |= ULTRAENB;
sys/dev/aic7xxx/aic7xxx_osm.c
1064
scb->hscb->control |= DISCENB;
sys/dev/aic7xxx/aic7xxx_osm.c
1070
scb->flags |= SCB_NEGOTIATE;
sys/dev/aic7xxx/aic7xxx_osm.c
1071
scb->hscb->control |= MK_MESSAGE;
sys/dev/aic7xxx/aic7xxx_osm.c
1073
scb->flags |= SCB_AUTO_NEGOTIATE;
sys/dev/aic7xxx/aic7xxx_osm.c
1074
scb->hscb->control |= MK_MESSAGE;
sys/dev/aic7xxx/aic7xxx_osm.c
1077
LIST_INSERT_HEAD(&ahc->pending_scbs, scb, pending_links);
sys/dev/aic7xxx/aic7xxx_osm.c
1087
if ((scb->hscb->control & (TARGET_SCB|TAG_ENB)) == 0
sys/dev/aic7xxx/aic7xxx_osm.c
1092
target_offset = SCB_GET_TARGET_OFFSET(ahc, scb);
sys/dev/aic7xxx/aic7xxx_osm.c
1094
TAILQ_INSERT_TAIL(untagged_q, scb, links.tqe);
sys/dev/aic7xxx/aic7xxx_osm.c
1095
scb->flags |= SCB_UNTAGGEDQ;
sys/dev/aic7xxx/aic7xxx_osm.c
1096
if (TAILQ_FIRST(untagged_q) != scb) {
sys/dev/aic7xxx/aic7xxx_osm.c
1100
scb->flags |= SCB_ACTIVE;
sys/dev/aic7xxx/aic7xxx_osm.c
1105
aic_scb_timer_start(scb);
sys/dev/aic7xxx/aic7xxx_osm.c
1107
if ((scb->flags & SCB_TARGET_IMMEDIATE) != 0) {
sys/dev/aic7xxx/aic7xxx_osm.c
1109
ahc->scb_data->scbindex[scb->hscb->tag] = scb;
sys/dev/aic7xxx/aic7xxx_osm.c
1112
ahc_outb(ahc, SCBPTR, scb->hscb->tag);
sys/dev/aic7xxx/aic7xxx_osm.c
1113
ahc_outb(ahc, TARG_IMMEDIATE_SCB, scb->hscb->tag);
sys/dev/aic7xxx/aic7xxx_osm.c
1116
ahc_queue_scb(ahc, scb);
sys/dev/aic7xxx/aic7xxx_osm.c
1131
struct ccb_scsiio *csio, struct scb *scb)
sys/dev/aic7xxx/aic7xxx_osm.c
1137
hscb = scb->hscb;
sys/dev/aic7xxx/aic7xxx_osm.c
1147
aic_set_transaction_status(scb,
sys/dev/aic7xxx/aic7xxx_osm.c
1149
ahc_free_scb(ahc, scb);
sys/dev/aic7xxx/aic7xxx_osm.c
1157
scb->flags |= SCB_CDB32_PTR;
sys/dev/aic7xxx/aic7xxx_osm.c
1167
scb->flags |= SCB_CDB32_PTR;
sys/dev/aic7xxx/aic7xxx_osm.c
1177
scb->dmamap,
sys/dev/aic7xxx/aic7xxx_osm.c
1180
scb,
sys/dev/aic7xxx/aic7xxx_osm.c
1190
scb->io_ctx->ccb_h.status |= CAM_RELEASE_SIMQ;
sys/dev/aic7xxx/aic7xxx_osm.c
305
ahc_sync_ccb(struct ahc_softc *ahc, struct scb *scb, union ccb *ccb, bool post)
sys/dev/aic7xxx/aic7xxx_osm.c
320
bus_dmamap_sync(ahc->buffer_dmat, scb->dmamap, op);
sys/dev/aic7xxx/aic7xxx_osm.c
329
ahc_done(struct ahc_softc *ahc, struct scb *scb)
sys/dev/aic7xxx/aic7xxx_osm.c
333
CAM_DEBUG(scb->io_ctx->ccb_h.path, CAM_DEBUG_TRACE,
sys/dev/aic7xxx/aic7xxx_osm.c
334
("ahc_done - scb %d\n", scb->hscb->tag));
sys/dev/aic7xxx/aic7xxx_osm.c
336
ccb = scb->io_ctx;
sys/dev/aic7xxx/aic7xxx_osm.c
337
LIST_REMOVE(scb, pending_links);
sys/dev/aic7xxx/aic7xxx_osm.c
338
if ((scb->flags & SCB_TIMEDOUT) != 0)
sys/dev/aic7xxx/aic7xxx_osm.c
339
LIST_REMOVE(scb, timedout_links);
sys/dev/aic7xxx/aic7xxx_osm.c
340
if ((scb->flags & SCB_UNTAGGEDQ) != 0) {
sys/dev/aic7xxx/aic7xxx_osm.c
344
target_offset = SCB_GET_TARGET_OFFSET(ahc, scb);
sys/dev/aic7xxx/aic7xxx_osm.c
346
TAILQ_REMOVE(untagged_q, scb, links.tqe);
sys/dev/aic7xxx/aic7xxx_osm.c
347
scb->flags &= ~SCB_UNTAGGEDQ;
sys/dev/aic7xxx/aic7xxx_osm.c
351
callout_stop(&scb->io_timer);
sys/dev/aic7xxx/aic7xxx_osm.c
354
ahc_sync_ccb(ahc, scb, ccb, true);
sys/dev/aic7xxx/aic7xxx_osm.c
355
bus_dmamap_unload(ahc->buffer_dmat, scb->dmamap);
sys/dev/aic7xxx/aic7xxx_osm.c
381
if (aic_get_transaction_status(scb) == CAM_REQ_INPROG)
sys/dev/aic7xxx/aic7xxx_osm.c
384
ahc_free_scb(ahc, scb);
sys/dev/aic7xxx/aic7xxx_osm.c
393
if ((scb->flags & SCB_RECOVERY_SCB) != 0) {
sys/dev/aic7xxx/aic7xxx_osm.c
394
struct scb *list_scb;
sys/dev/aic7xxx/aic7xxx_osm.c
398
if (aic_get_transaction_status(scb) == CAM_BDR_SENT
sys/dev/aic7xxx/aic7xxx_osm.c
399
|| aic_get_transaction_status(scb) == CAM_REQ_ABORTED)
sys/dev/aic7xxx/aic7xxx_osm.c
400
aic_set_transaction_status(scb, CAM_CMD_TIMEOUT);
sys/dev/aic7xxx/aic7xxx_osm.c
411
aic_get_timeout(scb));
sys/dev/aic7xxx/aic7xxx_osm.c
414
ahc_print_path(ahc, scb);
sys/dev/aic7xxx/aic7xxx_osm.c
421
if (aic_get_transaction_status(scb) == CAM_REQ_INPROG) {
sys/dev/aic7xxx/aic7xxx_osm.c
423
} else if ((scb->flags & SCB_SENSE) != 0) {
sys/dev/aic7xxx/aic7xxx_osm.c
436
ahc_get_sense_buf(ahc, scb),
sys/dev/aic7xxx/aic7xxx_osm.c
437
(aic_le32toh(scb->sg_list->len) & AHC_SG_LEN_MASK)
sys/dev/aic7xxx/aic7xxx_osm.c
439
scb->io_ctx->ccb_h.status |= CAM_AUTOSNS_VALID;
sys/dev/aic7xxx/aic7xxx_osm.c
442
ahc_free_scb(ahc, scb);
sys/dev/aic7xxx/aic7xxx_osm.c
504
struct scb *scb;
sys/dev/aic7xxx/aic7xxx_osm.c
518
if ((scb = ahc_get_scb(ahc)) == NULL) {
sys/dev/aic7xxx/aic7xxx_osm.c
526
hscb = scb->hscb;
sys/dev/aic7xxx/aic7xxx_osm.c
529
("start scb(%p)\n", scb));
sys/dev/aic7xxx/aic7xxx_osm.c
530
scb->io_ctx = ccb;
sys/dev/aic7xxx/aic7xxx_osm.c
534
ccb->ccb_h.ccb_scb_ptr = scb;
sys/dev/aic7xxx/aic7xxx_osm.c
544
scb->flags |= SCB_DEVICE_RESET;
sys/dev/aic7xxx/aic7xxx_osm.c
546
ahc_execute_scb(scb, NULL, 0, 0);
sys/dev/aic7xxx/aic7xxx_osm.c
553
scb->flags |= SCB_TARGET_IMMEDIATE;
sys/dev/aic7xxx/aic7xxx_osm.c
555
scb->flags |= SCB_TARGET_SCB;
sys/dev/aic7xxx/aic7xxx_osm.c
570
ahc_setup_data(ahc, sim, &ccb->csio, scb);
sys/dev/aic7xxx/aic7xxx_osm.c
61
struct ccb_scsiio *csio, struct scb *scb);
sys/dev/aic7xxx/aic7xxx_osm.c
933
struct scb *scb;
sys/dev/aic7xxx/aic7xxx_osm.c
940
scb = (struct scb *)arg;
sys/dev/aic7xxx/aic7xxx_osm.c
941
ccb = scb->io_ctx;
sys/dev/aic7xxx/aic7xxx_osm.c
942
ahc = scb->ahc_softc;
sys/dev/aic7xxx/aic7xxx_osm.c
946
aic_set_transaction_status(scb, CAM_REQ_TOO_BIG);
sys/dev/aic7xxx/aic7xxx_osm.c
948
aic_set_transaction_status(scb, CAM_REQ_CMP_ERR);
sys/dev/aic7xxx/aic7xxx_osm.c
950
bus_dmamap_unload(ahc->buffer_dmat, scb->dmamap);
sys/dev/aic7xxx/aic7xxx_osm.c
951
ahc_free_scb(ahc, scb);
sys/dev/aic7xxx/aic7xxx_osm.c
962
sg = scb->sg_list;
sys/dev/aic7xxx/aic7xxx_osm.c
980
scb->hscb->sgptr = aic_htole32(scb->sg_list_phys|SG_FULL_RESID);
sys/dev/aic7xxx/aic7xxx_osm.c
982
ahc_sync_ccb(ahc, scb, ccb, false);
sys/dev/aic7xxx/aic7xxx_osm.c
987
tdata = &scb->hscb->shared_data.tdata;
sys/dev/aic7xxx/aic7xxx_osm.h
222
static __inline void ahc_print_path(struct ahc_softc *, struct scb *);
sys/dev/aic7xxx/aic7xxx_osm.h
226
ahc_print_path(struct ahc_softc *ahc, struct scb *scb)
sys/dev/aic7xxx/aic7xxx_osm.h
228
xpt_print_path(scb->io_ctx->ccb_h.path);
sys/dev/aic7xxx/aic7xxx_osm.h
251
void ahc_done(struct ahc_softc *ahc, struct scb *scb);
sys/dev/aic7xxx/aic7xxx_osm.h
83
#define SCB_GET_SIM(ahc, scb) \
sys/dev/aic7xxx/aic7xxx_osm.h
84
(SCB_GET_CHANNEL(ahc, scb) == 'A' ? (ahc)->platform_data->sim \
sys/dev/aic7xxx/aic_osm_lib.c
39
aic_set_recoveryscb(struct aic_softc *aic, struct scb *scb)
sys/dev/aic7xxx/aic_osm_lib.c
42
if ((scb->flags & SCB_RECOVERY_SCB) == 0) {
sys/dev/aic7xxx/aic_osm_lib.c
43
struct scb *list_scb;
sys/dev/aic7xxx/aic_osm_lib.c
45
scb->flags |= SCB_RECOVERY_SCB;
sys/dev/aic7xxx/aic_osm_lib.c
55
callout_stop(&scb->io_timer);
sys/dev/aic7xxx/aic_osm_lib.c
63
struct scb *scb;
sys/dev/aic7xxx/aic_osm_lib.c
65
scb = (struct scb *)arg;
sys/dev/aic7xxx/aic_osm_lib.c
66
aic_lock(scb->aic_softc);
sys/dev/aic7xxx/aic_osm_lib.c
67
aic_timeout(scb);
sys/dev/aic7xxx/aic_osm_lib.c
68
aic_unlock(scb->aic_softc);
sys/dev/aic7xxx/aic_osm_lib.h
158
static __inline u_int aic_get_timeout(struct scb *);
sys/dev/aic7xxx/aic_osm_lib.h
159
static __inline void aic_scb_timer_reset(struct scb *, u_int);
sys/dev/aic7xxx/aic_osm_lib.h
173
aic_get_timeout(struct scb *scb)
sys/dev/aic7xxx/aic_osm_lib.h
175
return (scb->io_ctx->ccb_h.timeout);
sys/dev/aic7xxx/aic_osm_lib.h
179
aic_scb_timer_reset(struct scb *scb, u_int msec)
sys/dev/aic7xxx/aic_osm_lib.h
186
callout_reset(&scb->io_timer, time, aic_platform_timeout, scb);
sys/dev/aic7xxx/aic_osm_lib.h
190
aic_scb_timer_start(struct scb *scb)
sys/dev/aic7xxx/aic_osm_lib.h
193
if (AIC_SCB_DATA(scb->aic_softc)->recovery_scbs == 0
sys/dev/aic7xxx/aic_osm_lib.h
194
&& scb->io_ctx->ccb_h.timeout != CAM_TIME_INFINITY) {
sys/dev/aic7xxx/aic_osm_lib.h
195
aic_scb_timer_reset(scb, scb->io_ctx->ccb_h.timeout);
sys/dev/aic7xxx/aic_osm_lib.h
200
static __inline void aic_set_transaction_status(struct scb *, uint32_t);
sys/dev/aic7xxx/aic_osm_lib.h
201
static __inline void aic_set_scsi_status(struct scb *, uint32_t);
sys/dev/aic7xxx/aic_osm_lib.h
202
static __inline uint32_t aic_get_transaction_status(struct scb *);
sys/dev/aic7xxx/aic_osm_lib.h
203
static __inline uint32_t aic_get_scsi_status(struct scb *);
sys/dev/aic7xxx/aic_osm_lib.h
204
static __inline void aic_set_transaction_tag(struct scb *, int, u_int);
sys/dev/aic7xxx/aic_osm_lib.h
205
static __inline u_long aic_get_transfer_length(struct scb *);
sys/dev/aic7xxx/aic_osm_lib.h
206
static __inline int aic_get_transfer_dir(struct scb *);
sys/dev/aic7xxx/aic_osm_lib.h
207
static __inline void aic_set_residual(struct scb *, u_long);
sys/dev/aic7xxx/aic_osm_lib.h
208
static __inline void aic_set_sense_residual(struct scb *, u_long);
sys/dev/aic7xxx/aic_osm_lib.h
209
static __inline u_long aic_get_residual(struct scb *);
sys/dev/aic7xxx/aic_osm_lib.h
210
static __inline int aic_perform_autosense(struct scb *);
sys/dev/aic7xxx/aic_osm_lib.h
211
static __inline uint32_t aic_get_sense_bufsize(struct aic_softc*, struct scb*);
sys/dev/aic7xxx/aic_osm_lib.h
213
static __inline void aic_freeze_scb(struct scb *scb);
sys/dev/aic7xxx/aic_osm_lib.h
214
static __inline void aic_platform_freeze_devq(struct aic_softc *, struct scb *);
sys/dev/aic7xxx/aic_osm_lib.h
220
void aic_set_transaction_status(struct scb *scb, uint32_t status)
sys/dev/aic7xxx/aic_osm_lib.h
222
scb->io_ctx->ccb_h.status &= ~CAM_STATUS_MASK;
sys/dev/aic7xxx/aic_osm_lib.h
223
scb->io_ctx->ccb_h.status |= status;
sys/dev/aic7xxx/aic_osm_lib.h
227
void aic_set_scsi_status(struct scb *scb, uint32_t status)
sys/dev/aic7xxx/aic_osm_lib.h
229
scb->io_ctx->csio.scsi_status = status;
sys/dev/aic7xxx/aic_osm_lib.h
233
uint32_t aic_get_transaction_status(struct scb *scb)
sys/dev/aic7xxx/aic_osm_lib.h
235
return (scb->io_ctx->ccb_h.status & CAM_STATUS_MASK);
sys/dev/aic7xxx/aic_osm_lib.h
239
uint32_t aic_get_scsi_status(struct scb *scb)
sys/dev/aic7xxx/aic_osm_lib.h
241
return (scb->io_ctx->csio.scsi_status);
sys/dev/aic7xxx/aic_osm_lib.h
245
void aic_set_transaction_tag(struct scb *scb, int enabled, u_int type)
sys/dev/aic7xxx/aic_osm_lib.h
247
scb->io_ctx->csio.tag_action = type;
sys/dev/aic7xxx/aic_osm_lib.h
249
scb->io_ctx->ccb_h.flags |= CAM_TAG_ACTION_VALID;
sys/dev/aic7xxx/aic_osm_lib.h
251
scb->io_ctx->ccb_h.flags &= ~CAM_TAG_ACTION_VALID;
sys/dev/aic7xxx/aic_osm_lib.h
255
u_long aic_get_transfer_length(struct scb *scb)
sys/dev/aic7xxx/aic_osm_lib.h
257
return (scb->io_ctx->csio.dxfer_len);
sys/dev/aic7xxx/aic_osm_lib.h
261
int aic_get_transfer_dir(struct scb *scb)
sys/dev/aic7xxx/aic_osm_lib.h
263
return (scb->io_ctx->ccb_h.flags & CAM_DIR_MASK);
sys/dev/aic7xxx/aic_osm_lib.h
267
void aic_set_residual(struct scb *scb, u_long resid)
sys/dev/aic7xxx/aic_osm_lib.h
269
scb->io_ctx->csio.resid = resid;
sys/dev/aic7xxx/aic_osm_lib.h
273
void aic_set_sense_residual(struct scb *scb, u_long resid)
sys/dev/aic7xxx/aic_osm_lib.h
275
scb->io_ctx->csio.sense_resid = resid;
sys/dev/aic7xxx/aic_osm_lib.h
279
u_long aic_get_residual(struct scb *scb)
sys/dev/aic7xxx/aic_osm_lib.h
281
return (scb->io_ctx->csio.resid);
sys/dev/aic7xxx/aic_osm_lib.h
285
int aic_perform_autosense(struct scb *scb)
sys/dev/aic7xxx/aic_osm_lib.h
287
return (!(scb->io_ctx->ccb_h.flags & CAM_DIS_AUTOSENSE));
sys/dev/aic7xxx/aic_osm_lib.h
291
aic_get_sense_bufsize(struct aic_softc *aic, struct scb *scb)
sys/dev/aic7xxx/aic_osm_lib.h
306
aic_freeze_scb(struct scb *scb)
sys/dev/aic7xxx/aic_osm_lib.h
308
aic_freeze_ccb(scb->io_ctx);
sys/dev/aic7xxx/aic_osm_lib.h
312
aic_platform_freeze_devq(struct aic_softc *aic, struct scb *scb)
sys/dev/aic7xxx/aic_osm_lib.h
327
aic_platform_scb_free(struct aic_softc *aic, struct scb *scb)
sys/dev/aic7xxx/aic_osm_lib.h
331
&& scb->io_ctx != NULL
sys/dev/aic7xxx/aic_osm_lib.h
332
&& (scb->io_ctx->ccb_h.status & CAM_RELEASE_SIMQ) == 0) {
sys/dev/aic7xxx/aic_osm_lib.h
333
scb->io_ctx->ccb_h.status |= CAM_RELEASE_SIMQ;
sys/dev/aic7xxx/aic_osm_lib.h
336
scb->io_ctx = NULL;
sys/dev/aic7xxx/aic_osm_lib.h
88
struct scb;
sys/dev/aic7xxx/aic_osm_lib.h
94
void aic_set_recoveryscb(struct aic_softc *aic, struct scb *scb);
sys/dev/aic7xxx/aicasm/aicasm_gram.y
237
| scb
sys/dev/aic7xxx/aicasm/aicasm_gram.y
238
| program scb
sys/dev/aic7xxx/aicasm/aicasm_gram.y
810
scb:
sys/dev/ic/i82586.h
328
ie_ack(volatile struct ie_sys_ctl_block *scb,
sys/dev/ic/i82586.h
331
scb->ie_command = scb->ie_status & mask;
sys/dev/usb/usb_controller.h
49
typedef void (usb_bus_mem_cb_t)(struct usb_bus *bus, usb_bus_mem_sub_cb_t *scb);
sys/net/if_epair.c
576
epair_clone_add(struct if_clone *ifc, struct epair_softc *scb)
sys/net/if_epair.c
581
ifp = scb->ifp;
sys/net/if_epair.c
584
memcpy(eaddr, scb->oifp->if_hw_addr, ETHER_ADDR_LEN);
sys/net/if_epair.c
587
epair_generate_mac_byname(scb, eaddr);
sys/net/if_epair.c
783
struct epair_softc *sca, *scb;
sys/net/if_epair.c
795
scb = epair_alloc_sc(ifc);
sys/net/if_epair.c
800
sca->oifp = scb->ifp;
sys/net/if_epair.c
801
scb->oifp = sca->ifp;
sys/net/if_epair.c
817
epair_setup_ifp(scb, name, unit);
sys/net/if_epair.c
819
ifp = scb->ifp;
sys/net/if_epair.c
823
strlcpy(name, scb->ifp->if_xname, len);
sys/net/if_epair.c
825
epair_clone_add(ifc, scb);
sys/net/if_epair.c
835
epair_set_state(scb->ifp, true);
sys/net/if_epair.c
865
struct epair_softc *sca, *scb;
sys/net/if_epair.c
879
scb = oifp->if_softc;
sys/net/if_epair.c
890
epair_drain_rings(scb);
sys/net/if_epair.c
896
epair_free_sc(scb);
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
1264
struct svc_rpc_gss_callback *scb;
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
1274
SLIST_FOREACH(scb, &KGSS_VNET(svc_rpc_gss_callbacks), cb_link) {
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
1275
if (scb->cb_callback.program == rqst->rq_prog
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
1276
&& scb->cb_callback.version == rqst->rq_vers) {
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
1283
cb_res = scb->cb_callback.callback(rqst,
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
250
struct svc_rpc_gss_callback *scb;
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
252
scb = mem_alloc(sizeof(struct svc_rpc_gss_callback));
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
253
if (!scb) {
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
257
scb->cb_callback = *cb;
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
259
SLIST_INSERT_HEAD(&KGSS_VNET(svc_rpc_gss_callbacks), scb, cb_link);
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
268
struct svc_rpc_gss_callback *scb;
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
271
SLIST_FOREACH(scb, &KGSS_VNET(svc_rpc_gss_callbacks), cb_link) {
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
272
if (scb->cb_callback.program == cb->program
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
273
&& scb->cb_callback.version == cb->version
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
274
&& scb->cb_callback.callback == cb->callback) {
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
275
SLIST_REMOVE(&KGSS_VNET(svc_rpc_gss_callbacks), scb,
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
278
mem_free(scb, sizeof(*scb));