sys/arch/alpha/alpha/interrupt.c
245
struct scbvec *scb;
sys/arch/alpha/alpha/interrupt.c
251
scb = &scb_iovectab[SCB_VECTOIDX(a1 - SCB_IOVECBASE)];
sys/arch/alpha/alpha/interrupt.c
252
(*scb->scb_func)(scb->scb_arg, a1);
sys/arch/hppa/gsc/if_ie_gsc.c
358
sc->scb = 94;
sys/dev/ic/aic79xx.c
10026
ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb,
sys/dev/ic/aic79xx.c
10029
scb->sg_count++;
sys/dev/ic/aic79xx.c
10050
ahd_setup_scb_common(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
10053
scb->crc_retry_count = 0;
sys/dev/ic/aic79xx.c
10054
if ((scb->flags & SCB_PACKETIZED) != 0) {
sys/dev/ic/aic79xx.c
10056
scb->hscb->task_attribute = scb->hscb->control & SCB_TAG_TYPE;
sys/dev/ic/aic79xx.c
10058
if (aic_get_transfer_length(scb) & 0x01)
sys/dev/ic/aic79xx.c
10059
scb->hscb->task_attribute = SCB_XFERLEN_ODD;
sys/dev/ic/aic79xx.c
10061
scb->hscb->task_attribute = 0;
sys/dev/ic/aic79xx.c
10064
if (scb->hscb->cdb_len <= MAX_CDB_LEN_WITH_SENSE_ADDR
sys/dev/ic/aic79xx.c
10065
|| (scb->hscb->cdb_len & SCB_CDB_LEN_PTR) != 0)
sys/dev/ic/aic79xx.c
10066
scb->hscb->shared_data.idata.cdb_plus_saddr.sense_addr =
sys/dev/ic/aic79xx.c
10067
aic_htole32(scb->sense_busaddr);
sys/dev/ic/aic79xx.c
10071
ahd_setup_data_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
10079
sg = (struct ahd_dma64_seg *)scb->sg_list;
sys/dev/ic/aic79xx.c
10080
scb->hscb->dataptr = sg->addr;
sys/dev/ic/aic79xx.c
10081
scb->hscb->datacnt = sg->len;
sys/dev/ic/aic79xx.c
10086
sg = (struct ahd_dma_seg *)scb->sg_list;
sys/dev/ic/aic79xx.c
10087
dataptr_words = (uint32_t*)&scb->hscb->dataptr;
sys/dev/ic/aic79xx.c
10094
scb->hscb->dataptr |= aic_htole64(high_addr << 8);
sys/dev/ic/aic79xx.c
10096
scb->hscb->datacnt = sg->len;
sys/dev/ic/aic79xx.c
10104
scb->hscb->sgptr = aic_htole32(scb->sg_list_busaddr|SG_FULL_RESID);
sys/dev/ic/aic79xx.c
10108
ahd_setup_noxfer_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
10110
scb->hscb->sgptr = aic_htole32(SG_LIST_NULL);
sys/dev/ic/aic79xx.c
10111
scb->hscb->dataptr = 0;
sys/dev/ic/aic79xx.c
10112
scb->hscb->datacnt = 0;
sys/dev/ic/aic79xx.c
10124
ahd_sg_bus_to_virt(struct ahd_softc *ahd, struct scb *scb, uint32_t sg_busaddr)
sys/dev/ic/aic79xx.c
10129
sg_offset = sg_busaddr - (scb->sg_list_busaddr - ahd_sg_size(ahd));
sys/dev/ic/aic79xx.c
10130
return ((uint8_t *)scb->sg_list + sg_offset);
sys/dev/ic/aic79xx.c
10134
ahd_sg_virt_to_bus(struct ahd_softc *ahd, struct scb *scb, void *sg)
sys/dev/ic/aic79xx.c
10139
sg_offset = ((uint8_t *)sg - (uint8_t *)scb->sg_list)
sys/dev/ic/aic79xx.c
10142
return (scb->sg_list_busaddr + sg_offset);
sys/dev/ic/aic79xx.c
10146
ahd_sync_scb(struct ahd_softc *ahd, struct scb *scb, int op)
sys/dev/ic/aic79xx.c
10148
ahd_dmamap_sync(ahd, ahd->parent_dmat, scb->hscb_map->dmamap,
sys/dev/ic/aic79xx.c
10149
/*offset*/(uint8_t*)scb->hscb - scb->hscb_map->vaddr,
sys/dev/ic/aic79xx.c
10150
/*len*/sizeof(*scb->hscb), op);
sys/dev/ic/aic79xx.c
10154
ahd_sync_sglist(struct ahd_softc *ahd, struct scb *scb, int op)
sys/dev/ic/aic79xx.c
10156
if (scb->sg_count == 0)
sys/dev/ic/aic79xx.c
10160
scb->sense_map->dmamap,
sys/dev/ic/aic79xx.c
10161
/*offset*/scb->sg_list_busaddr - ahd_sg_size(ahd),
sys/dev/ic/aic79xx.c
10162
/*len*/ahd_sg_size(ahd) * scb->sg_count, op);
sys/dev/ic/aic79xx.c
10166
ahd_sync_sense(struct ahd_softc *ahd, struct scb *scb, int op)
sys/dev/ic/aic79xx.c
10169
scb->sense_map->dmamap,
sys/dev/ic/aic79xx.c
1017
struct scb *scb;
sys/dev/ic/aic79xx.c
10170
/*offset*/scb->sense_busaddr,
sys/dev/ic/aic79xx.c
10182
ahd_complete_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
10186
sgptr = aic_le32toh(scb->hscb->sgptr);
sys/dev/ic/aic79xx.c
10188
ahd_handle_scb_status(ahd, scb);
sys/dev/ic/aic79xx.c
10190
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
10198
ahd_update_residual(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
10202
sgptr = aic_le32toh(scb->hscb->sgptr);
sys/dev/ic/aic79xx.c
10204
ahd_calc_residual(ahd, scb);
sys/dev/ic/aic79xx.c
1021
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1022
if (scb != NULL)
sys/dev/ic/aic79xx.c
1023
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
1033
struct scb *scb;
sys/dev/ic/aic79xx.c
1037
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1038
if (scb == NULL) {
sys/dev/ic/aic79xx.c
1043
ahd_outq(ahd, HADDR, scb->sense_busaddr);
sys/dev/ic/aic79xx.c
10433
struct scb *
sys/dev/ic/aic79xx.c
10436
struct scb* scb;
sys/dev/ic/aic79xx.c
10440
scb = ahd->scb_data.scbindex[tag];
sys/dev/ic/aic79xx.c
10441
if (scb != NULL)
sys/dev/ic/aic79xx.c
10442
ahd_sync_scb(ahd, scb,
sys/dev/ic/aic79xx.c
10444
return (scb);
sys/dev/ic/aic79xx.c
10448
ahd_swap_with_next_hscb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
10469
memcpy(q_hscb, scb->hscb, sizeof(*scb->hscb));
sys/dev/ic/aic79xx.c
10471
q_hscb->next_hscb_busaddr = scb->hscb->hscb_busaddr;
sys/dev/ic/aic79xx.c
10474
ahd->next_queued_hscb = scb->hscb;
sys/dev/ic/aic79xx.c
10475
ahd->next_queued_hscb_map = scb->hscb_map;
sys/dev/ic/aic79xx.c
10476
scb->hscb = q_hscb;
sys/dev/ic/aic79xx.c
10477
scb->hscb_map = q_hscb_map;
sys/dev/ic/aic79xx.c
10480
ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = scb;
sys/dev/ic/aic79xx.c
10487
ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
10489
ahd_swap_with_next_hscb(ahd, scb);
sys/dev/ic/aic79xx.c
10491
if (SCBID_IS_NULL(SCB_GET_TAG(scb)))
sys/dev/ic/aic79xx.c
10493
SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
10498
ahd->qinfifo[AHD_QIN_WRAP(ahd->qinfifonext)] = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx.c
10501
if (scb->sg_count != 0)
sys/dev/ic/aic79xx.c
10502
ahd_setup_data_scb(ahd, scb);
sys/dev/ic/aic79xx.c
10504
ahd_setup_noxfer_scb(ahd, scb);
sys/dev/ic/aic79xx.c
10505
ahd_setup_scb_common(ahd, scb);
sys/dev/ic/aic79xx.c
10511
ahd_sync_scb(ahd, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
sys/dev/ic/aic79xx.c
10517
host_dataptr = aic_le64toh(scb->hscb->dataptr);
sys/dev/ic/aic79xx.c
10520
SCB_GET_TAG(scb), scb->hscb->scsiid,
sys/dev/ic/aic79xx.c
10521
aic_le32toh(scb->hscb->hscb_busaddr),
sys/dev/ic/aic79xx.c
10524
aic_le32toh(scb->hscb->datacnt));
sys/dev/ic/aic79xx.c
10532
ahd_get_sense_buf(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
10534
return (scb->sense_data);
sys/dev/ic/aic79xx.c
10538
ahd_get_sense_bufaddr(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
10540
return (scb->sense_busaddr);
sys/dev/ic/aic79xx.c
1072
struct scb *scb;
sys/dev/ic/aic79xx.c
1089
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1090
if (scb == NULL) {
sys/dev/ic/aic79xx.c
1097
ahd_compile_devinfo(&devinfo, SCB_GET_OUR_ID(scb),
sys/dev/ic/aic79xx.c
1098
SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
1099
SCB_GET_LUN(scb),
sys/dev/ic/aic79xx.c
1100
SCB_GET_CHANNEL(ahd, scb),
sys/dev/ic/aic79xx.c
1119
scb->hscb->control &= ~(TAG_ENB|SCB_TAG_TYPE);
sys/dev/ic/aic79xx.c
1120
scb->hscb->control |= MK_MESSAGE;
sys/dev/ic/aic79xx.c
1121
ahd_outb(ahd, SCB_CONTROL, scb->hscb->control);
sys/dev/ic/aic79xx.c
1123
ahd_outb(ahd, SAVED_SCSIID, scb->hscb->scsiid);
sys/dev/ic/aic79xx.c
1131
scb->flags &= ~SCB_PACKETIZED;
sys/dev/ic/aic79xx.c
1132
scb->flags |= SCB_ABORT|SCB_CMDPHASE_ABORT;
sys/dev/ic/aic79xx.c
1133
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
1134
aic_set_transaction_status(scb, CAM_REQUEUE_REQ);
sys/dev/ic/aic79xx.c
1135
aic_freeze_scb(scb);
sys/dev/ic/aic79xx.c
1148
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
1160
struct scb *scb;
sys/dev/ic/aic79xx.c
1170
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/ic/aic79xx.c
1171
if (scb == NULL) {
sys/dev/ic/aic79xx.c
1227
struct scb *scb;
sys/dev/ic/aic79xx.c
1247
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/ic/aic79xx.c
1252
scb);
sys/dev/ic/aic79xx.c
1269
scb);
sys/dev/ic/aic79xx.c
1363
struct scb *scb;
sys/dev/ic/aic79xx.c
1370
scb = ahd_lookup_scb(ahd, scbindex);
sys/dev/ic/aic79xx.c
1374
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
1377
SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
1378
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
1383
aic_get_transfer_length(scb), scb->sg_count);
sys/dev/ic/aic79xx.c
1384
ahd_dump_sglist(scb);
sys/dev/ic/aic79xx.c
1392
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
1393
aic_set_transaction_status(scb, CAM_DATA_RUN_ERR);
sys/dev/ic/aic79xx.c
1394
aic_freeze_scb(scb);
sys/dev/ic/aic79xx.c
1400
struct scb *scb;
sys/dev/ic/aic79xx.c
1408
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1409
if (scb != NULL)
sys/dev/ic/aic79xx.c
1414
ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
1415
SCB_GET_CHANNEL(ahd, scb),
sys/dev/ic/aic79xx.c
1416
SCB_GET_LUN(scb), SCB_GET_TAG(scb),
sys/dev/ic/aic79xx.c
1426
struct scb *scb;
sys/dev/ic/aic79xx.c
1429
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1430
if (scb != NULL) {
sys/dev/ic/aic79xx.c
1435
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
1437
scb->hscb->task_management);
sys/dev/ic/aic79xx.c
1441
switch (scb->hscb->task_management) {
sys/dev/ic/aic79xx.c
1443
tag = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx.c
1446
lun = scb->hscb->lun;
sys/dev/ic/aic79xx.c
1448
ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
1453
lun = scb->hscb->lun;
sys/dev/ic/aic79xx.c
1458
ahd_scb_devinfo(ahd, &devinfo, scb);
sys/dev/ic/aic79xx.c
1478
struct scb *scb;
sys/dev/ic/aic79xx.c
1485
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1486
if (scb != NULL) {
sys/dev/ic/aic79xx.c
1491
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
1505
ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
1506
SCB_GET_CHANNEL(ahd, scb),
sys/dev/ic/aic79xx.c
1507
SCB_GET_LUN(scb), SCB_GET_TAG(scb),
sys/dev/ic/aic79xx.c
1541
struct scb *scb;
sys/dev/ic/aic79xx.c
1568
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1569
if (scb != NULL
sys/dev/ic/aic79xx.c
1571
scb = NULL;
sys/dev/ic/aic79xx.c
1633
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1634
if (scb == NULL) {
sys/dev/ic/aic79xx.c
1643
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
1648
ahd_scb_devinfo(ahd, &devinfo, scb);
sys/dev/ic/aic79xx.c
1649
aic_set_transaction_status(scb, CAM_SEL_TIMEOUT);
sys/dev/ic/aic79xx.c
165
struct scb *scb);
sys/dev/ic/aic79xx.c
1650
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
168
struct scb *scb);
sys/dev/ic/aic79xx.c
1722
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1723
if (scb == NULL) {
sys/dev/ic/aic79xx.c
1729
packetized = (scb->flags & SCB_PACKETIZED) != 0;
sys/dev/ic/aic79xx.c
1808
struct scb *scb;
sys/dev/ic/aic79xx.c
1819
scb = NULL;
sys/dev/ic/aic79xx.c
1858
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1859
if (scb != NULL && SCB_IS_SILENT(scb))
sys/dev/ic/aic79xx.c
1954
if (scb == NULL) {
sys/dev/ic/aic79xx.c
1985
if (scb != NULL && msg_out == MSG_INITIATOR_DET_ERR)
sys/dev/ic/aic79xx.c
1986
scb->flags |= SCB_TRANSMISSION_ERROR;
sys/dev/ic/aic79xx.c
204
struct scb *scb);
sys/dev/ic/aic79xx.c
2043
struct scb *scb;
sys/dev/ic/aic79xx.c
2067
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
2068
if (scb == NULL)
sys/dev/ic/aic79xx.c
2109
if (scb->crc_retry_count < AHD_MAX_LQ_CRC_ERRORS) {
sys/dev/ic/aic79xx.c
211
struct scb * ahd_find_scb_by_tag(struct ahd_softc *, u_int);
sys/dev/ic/aic79xx.c
2110
if (SCB_IS_SILENT(scb) == FALSE) {
sys/dev/ic/aic79xx.c
2111
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2115
scb->crc_retry_count++;
sys/dev/ic/aic79xx.c
2117
aic_set_transaction_status(scb, CAM_UNCOR_PARITY);
sys/dev/ic/aic79xx.c
2118
aic_freeze_scb(scb);
sys/dev/ic/aic79xx.c
2119
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
2143
struct scb *scb;
sys/dev/ic/aic79xx.c
2146
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
2147
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2150
ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb), 'A',
sys/dev/ic/aic79xx.c
2151
SCB_GET_LUN(scb), SCB_GET_TAG(scb),
sys/dev/ic/aic79xx.c
217
struct scb *prev_scb,
sys/dev/ic/aic79xx.c
2170
struct scb *scb;
sys/dev/ic/aic79xx.c
218
struct scb *scb);
sys/dev/ic/aic79xx.c
2195
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
2196
if (scb != NULL
sys/dev/ic/aic79xx.c
2198
scb = NULL;
sys/dev/ic/aic79xx.c
2210
if (scb == NULL) {
sys/dev/ic/aic79xx.c
2218
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2220
SCB_GET_TAG(scb),
sys/dev/ic/aic79xx.c
2224
tag = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx.c
2226
if ((scb->flags & SCB_CMDPHASE_ABORT) != 0) {
sys/dev/ic/aic79xx.c
2239
tag = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx.c
2240
saved_lun = scb->hscb->lun;
sys/dev/ic/aic79xx.c
2254
if (scb != NULL
sys/dev/ic/aic79xx.c
2255
&& scb->io_ctx->ccb_h.func_code== XPT_RESET_DEV
sys/dev/ic/aic79xx.c
2256
&& ahd_match_scb(ahd, scb, target, 'A',
sys/dev/ic/aic79xx.c
2259
aic_set_transaction_status(scb, CAM_REQ_CMP);
sys/dev/ic/aic79xx.c
2311
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
2312
ahd_qinfifo_requeue_tail(ahd, scb);
sys/dev/ic/aic79xx.c
2334
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
2335
ahd_qinfifo_requeue_tail(ahd, scb);
sys/dev/ic/aic79xx.c
2357
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
2358
ahd_qinfifo_requeue_tail(ahd, scb);
sys/dev/ic/aic79xx.c
2389
&& (scb != NULL)) {
sys/dev/ic/aic79xx.c
2391
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
2392
aic_set_transaction_status(scb, CAM_REQUEUE_REQ);
sys/dev/ic/aic79xx.c
2393
aic_freeze_scb(scb);
sys/dev/ic/aic79xx.c
2395
ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
2396
SCB_GET_CHANNEL(ahd, scb),
sys/dev/ic/aic79xx.c
2397
SCB_GET_LUN(scb), SCB_LIST_NULL,
sys/dev/ic/aic79xx.c
2404
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
2412
if (scb != NULL) {
sys/dev/ic/aic79xx.c
2415
if ((scb->hscb->control & TAG_ENB) != 0)
sys/dev/ic/aic79xx.c
2416
tag = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx.c
2419
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2421
SCB_GET_LUN(scb), tag,
sys/dev/ic/aic79xx.c
2448
struct scb *scb;
sys/dev/ic/aic79xx.c
2457
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
2471
scb = NULL;
sys/dev/ic/aic79xx.c
2472
} else if (scb == NULL) {
sys/dev/ic/aic79xx.c
2481
aic_set_transaction_status(scb, CAM_SEQUENCE_FAIL);
sys/dev/ic/aic79xx.c
2483
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
249
struct scb *scb);
sys/dev/ic/aic79xx.c
2494
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2497
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
251
struct scb *scb);
sys/dev/ic/aic79xx.c
2524
if (scb == NULL) {
sys/dev/ic/aic79xx.c
2531
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2532
scb->flags |= SCB_ABORT;
sys/dev/ic/aic79xx.c
2720
ahd_print_scb(struct scb *scb)
sys/dev/ic/aic79xx.c
2725
hscb = scb->hscb;
sys/dev/ic/aic79xx.c
2727
(void *)scb,
sys/dev/ic/aic79xx.c
2740
SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
2741
ahd_dump_sglist(scb);
sys/dev/ic/aic79xx.c
2745
ahd_dump_sglist(struct scb *scb)
sys/dev/ic/aic79xx.c
2749
if (scb->sg_count > 0) {
sys/dev/ic/aic79xx.c
2750
if ((scb->ahd_softc->flags & AHD_64BIT_ADDRESSING) != 0) {
sys/dev/ic/aic79xx.c
2753
sg_list = (struct ahd_dma64_seg*)scb->sg_list;
sys/dev/ic/aic79xx.c
2754
for (i = 0; i < scb->sg_count; i++) {
sys/dev/ic/aic79xx.c
2771
sg_list = (struct ahd_dma_seg*)scb->sg_list;
sys/dev/ic/aic79xx.c
2772
for (i = 0; i < scb->sg_count; i++) {
sys/dev/ic/aic79xx.c
3379
struct scb *pending_scb;
sys/dev/ic/aic79xx.c
3536
struct scb *scb)
sys/dev/ic/aic79xx.c
3541
our_id = SCSIID_OUR_ID(scb->hscb->scsiid);
sys/dev/ic/aic79xx.c
3543
if ((scb->hscb->control & TARGET_SCB) != 0)
sys/dev/ic/aic79xx.c
3545
ahd_compile_devinfo(devinfo, our_id, SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
3546
SCB_GET_LUN(scb), SCB_GET_CHANNEL(ahd, scb), role);
sys/dev/ic/aic79xx.c
3559
struct scb *scb)
sys/dev/ic/aic79xx.c
3582
} else if (scb == NULL) {
sys/dev/ic/aic79xx.c
3591
if ((scb->flags & SCB_DEVICE_RESET) == 0
sys/dev/ic/aic79xx.c
3592
&& (scb->flags & SCB_PACKETIZED) == 0
sys/dev/ic/aic79xx.c
3596
identify_msg = MSG_IDENTIFYFLAG | SCB_GET_LUN(scb);
sys/dev/ic/aic79xx.c
3597
if ((scb->hscb->control & DISCENB) != 0)
sys/dev/ic/aic79xx.c
3602
if ((scb->hscb->control & TAG_ENB) != 0) {
sys/dev/ic/aic79xx.c
3604
scb->hscb->control & (TAG_ENB|SCB_TAG_TYPE);
sys/dev/ic/aic79xx.c
3605
ahd->msgout_buf[ahd->msgout_index++] = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx.c
3610
if (scb->flags & SCB_DEVICE_RESET) {
sys/dev/ic/aic79xx.c
3613
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
3623
} else if ((scb->flags & SCB_ABORT) != 0) {
sys/dev/ic/aic79xx.c
3625
if ((scb->hscb->control & TAG_ENB) != 0) {
sys/dev/ic/aic79xx.c
3631
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
3633
(scb->hscb->control & TAG_ENB) != 0 ? " Tag" : "");
sys/dev/ic/aic79xx.c
3642
} else if ((scb->flags & (SCB_AUTO_NEGOTIATE|SCB_NEGOTIATE)) != 0) {
sys/dev/ic/aic79xx.c
3655
printf("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid,
sys/dev/ic/aic79xx.c
3658
"SCB flags = %x", SCB_GET_TAG(scb), scb->hscb->control,
sys/dev/ic/aic79xx.c
3660
scb->flags);
sys/dev/ic/aic79xx.c
3669
scb->hscb->control &= ~MK_MESSAGE;
sys/dev/ic/aic79xx.c
402
struct scb *scb;
sys/dev/ic/aic79xx.c
421
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
422
if (scb == NULL) {
sys/dev/ic/aic79xx.c
439
if (ahd_scb_active_in_fifo(ahd, scb) == 0)
sys/dev/ic/aic79xx.c
442
ahd_run_data_fifo(ahd, scb);
sys/dev/ic/aic79xx.c
4695
struct scb *scb;
sys/dev/ic/aic79xx.c
4703
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/ic/aic79xx.c
4783
} else if ((scb->hscb->control & MSG_SIMPLE_TASK) != 0) {
sys/dev/ic/aic79xx.c
4787
tag_type = (scb->hscb->control & MSG_SIMPLE_TASK);
sys/dev/ic/aic79xx.c
4811
scb->hscb->control &= mask;
sys/dev/ic/aic79xx.c
4812
aic_set_transaction_tag(scb, /*enabled*/FALSE,
sys/dev/ic/aic79xx.c
4816
ahd_busy_tcl(ahd, BUILD_TCL(scb->hscb->scsiid, devinfo->lun),
sys/dev/ic/aic79xx.c
4817
SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
4824
ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
4825
SCB_GET_CHANNEL(ahd, scb),
sys/dev/ic/aic79xx.c
4826
SCB_GET_LUN(scb), /*tag*/SCB_LIST_NULL,
sys/dev/ic/aic79xx.c
4861
struct scb *scb;
sys/dev/ic/aic79xx.c
4864
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/ic/aic79xx.c
4870
|| aic_get_transfer_dir(scb) != CAM_DIR_IN) {
sys/dev/ic/aic79xx.c
4918
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/ic/aic79xx.c
4926
if (sg != scb->sg_list
sys/dev/ic/aic79xx.c
4945
sgptr = ahd_sg_virt_to_bus(ahd, scb,
sys/dev/ic/aic79xx.c
495
ahd_complete_scb(ahd, scb);
sys/dev/ic/aic79xx.c
4951
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/ic/aic79xx.c
4959
if (sg != scb->sg_list
sys/dev/ic/aic79xx.c
4978
sgptr = ahd_sg_virt_to_bus(ahd, scb,
sys/dev/ic/aic79xx.c
5010
struct scb *scb;
sys/dev/ic/aic79xx.c
5022
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/ic/aic79xx.c
5033
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
5057
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/ic/aic79xx.c
5069
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/ic/aic79xx.c
5158
struct scb *scb)
sys/dev/ic/aic79xx.c
5169
if (scb != NULL && (scb->flags & SCB_AUTO_NEGOTIATE) != 0)
sys/dev/ic/aic79xx.c
5273
ahd_name(ahd), (u_int)sizeof(struct scb),
sys/dev/ic/aic79xx.c
545
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
546
if (scb == NULL) {
sys/dev/ic/aic79xx.c
551
hscb_ptr = (uint8_t *)scb->hscb;
sys/dev/ic/aic79xx.c
555
ahd_complete_scb(ahd, scb);
sys/dev/ic/aic79xx.c
5653
struct scb *
sys/dev/ic/aic79xx.c
5656
struct scb *scb;
sys/dev/ic/aic79xx.c
566
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
5661
TAILQ_FOREACH(scb, &ahd->pending_scbs, next) {
sys/dev/ic/aic79xx.c
5662
if (SCB_GET_TAG(scb) == tag)
sys/dev/ic/aic79xx.c
5663
return (scb);
sys/dev/ic/aic79xx.c
5669
TAILQ_FOREACH(scb, &ahd->scb_data.free_scbs, next) {
sys/dev/ic/aic79xx.c
567
if (scb == NULL) {
sys/dev/ic/aic79xx.c
5670
if (SCB_GET_TAG(scb) == tag)
sys/dev/ic/aic79xx.c
5671
return (scb);
sys/dev/ic/aic79xx.c
573
ahd_complete_scb(ahd, scb);
sys/dev/ic/aic79xx.c
5785
struct scb *scb;
sys/dev/ic/aic79xx.c
5788
scb = TAILQ_FIRST(&ahd->scb_data.free_scbs);
sys/dev/ic/aic79xx.c
5789
if (scb) {
sys/dev/ic/aic79xx.c
5790
TAILQ_REMOVE(&ahd->scb_data.free_scbs, scb, next);
sys/dev/ic/aic79xx.c
5791
scb->flags |= SCB_ACTIVE;
sys/dev/ic/aic79xx.c
5795
return (scb);
sys/dev/ic/aic79xx.c
5805
struct scb *scb = xscb;
sys/dev/ic/aic79xx.c
5808
scb->flags = SCB_FLAG_NONE;
sys/dev/ic/aic79xx.c
5809
scb->hscb->control = 0;
sys/dev/ic/aic79xx.c
5810
ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = NULL;
sys/dev/ic/aic79xx.c
5813
TAILQ_INSERT_HEAD(&ahd->scb_data.free_scbs, scb, next);
sys/dev/ic/aic79xx.c
5814
aic_platform_scb_free(ahd, scb);
sys/dev/ic/aic79xx.c
5822
struct scb *next_scb;
sys/dev/ic/aic79xx.c
583
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
584
if (scb == NULL) {
sys/dev/ic/aic79xx.c
590
ahd_complete_scb(ahd, scb);
sys/dev/ic/aic79xx.c
5947
next_scb = (struct scb *)malloc(sizeof(*next_scb),
sys/dev/ic/aic79xx.c
608
ahd_scb_active_in_fifo(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
617
if (ahd_get_scbptr(ahd) != SCB_GET_TAG(scb)
sys/dev/ic/aic79xx.c
637
ahd_run_data_fifo(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
6944
ahd_match_scb(struct ahd_softc *ahd, struct scb *scb, int target,
sys/dev/ic/aic79xx.c
6947
int targ = SCB_GET_TARGET(ahd, scb);
sys/dev/ic/aic79xx.c
6948
char chan = SCB_GET_CHANNEL(ahd, scb);
sys/dev/ic/aic79xx.c
6949
int slun = SCB_GET_LUN(scb);
sys/dev/ic/aic79xx.c
6961
group = XPT_FC_GROUP(scb->io_ctx->ccb_h.func_code);
sys/dev/ic/aic79xx.c
6964
&& ((tag == SCB_GET_TAG(scb))
sys/dev/ic/aic79xx.c
6968
&& ((tag == scb->io_ctx->csio.tag_id)
sys/dev/ic/aic79xx.c
6972
match = ((tag == SCB_GET_TAG(scb)) || (tag == SCB_LIST_NULL));
sys/dev/ic/aic79xx.c
6980
ahd_freeze_devq(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
6986
target = SCB_GET_TARGET(ahd, scb);
sys/dev/ic/aic79xx.c
6987
lun = SCB_GET_LUN(scb);
sys/dev/ic/aic79xx.c
6988
channel = SCB_GET_CHANNEL(ahd, scb);
sys/dev/ic/aic79xx.c
6996
ahd_qinfifo_requeue_tail(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
6998
struct scb *prev_scb;
sys/dev/ic/aic79xx.c
7012
ahd_qinfifo_requeue(ahd, prev_scb, scb);
sys/dev/ic/aic79xx.c
7018
ahd_qinfifo_requeue(struct ahd_softc *ahd, struct scb *prev_scb,
sys/dev/ic/aic79xx.c
7019
struct scb *scb)
sys/dev/ic/aic79xx.c
7024
busaddr = aic_le32toh(scb->hscb->hscb_busaddr);
sys/dev/ic/aic79xx.c
7027
prev_scb->hscb->next_hscb_busaddr = scb->hscb->hscb_busaddr;
sys/dev/ic/aic79xx.c
7031
ahd->qinfifo[AHD_QIN_WRAP(ahd->qinfifonext)] = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx.c
7033
scb->hscb->next_hscb_busaddr = ahd->next_queued_hscb->hscb_busaddr;
sys/dev/ic/aic79xx.c
7034
ahd_sync_scb(ahd, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
sys/dev/ic/aic79xx.c
7058
struct scb *scb;
sys/dev/ic/aic79xx.c
7072
TAILQ_FOREACH(scb, &ahd->pending_scbs, next) {
sys/dev/ic/aic79xx.c
7081
ahd_done_with_status(struct ahd_softc *ahd, struct scb *scb, uint32_t status)
sys/dev/ic/aic79xx.c
7086
ostat = aic_get_transaction_status(scb);
sys/dev/ic/aic79xx.c
7088
aic_set_transaction_status(scb, status);
sys/dev/ic/aic79xx.c
7089
cstat = aic_get_transaction_status(scb);
sys/dev/ic/aic79xx.c
7091
aic_freeze_scb(scb);
sys/dev/ic/aic79xx.c
7092
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
7100
struct scb *scb;
sys/dev/ic/aic79xx.c
7101
struct scb *mk_msg_scb;
sys/dev/ic/aic79xx.c
7102
struct scb *prev_scb;
sys/dev/ic/aic79xx.c
7152
scb = ahd_lookup_scb(ahd, ahd->qinfifo[qinpos]);
sys/dev/ic/aic79xx.c
7153
if (scb == NULL) {
sys/dev/ic/aic79xx.c
7159
if (ahd_match_scb(ahd, scb, target, channel, lun, tag, role)) {
sys/dev/ic/aic79xx.c
7166
if ((scb->flags & SCB_ACTIVE) == 0)
sys/dev/ic/aic79xx.c
7168
ahd_done_with_status(ahd, scb, status);
sys/dev/ic/aic79xx.c
7176
ahd_qinfifo_requeue(ahd, prev_scb, scb);
sys/dev/ic/aic79xx.c
7177
prev_scb = scb;
sys/dev/ic/aic79xx.c
7181
ahd_qinfifo_requeue(ahd, prev_scb, scb);
sys/dev/ic/aic79xx.c
7182
prev_scb = scb;
sys/dev/ic/aic79xx.c
7224
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
7225
if (scb == NULL) {
sys/dev/ic/aic79xx.c
7232
if (ahd_match_scb(ahd, scb, target, channel, CAM_LUN_WILDCARD,
sys/dev/ic/aic79xx.c
7242
printf(" %d ( ", SCB_GET_TARGET(ahd, scb));
sys/dev/ic/aic79xx.c
7247
SCB_GET_TARGET(ahd, scb));
sys/dev/ic/aic79xx.c
7288
printf(" 0x%x", SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
7297
&& ahd_match_scb(ahd, scb, target, channel, CAM_LUN_WILDCARD,
sys/dev/ic/aic79xx.c
7331
struct scb *scb;
sys/dev/ic/aic79xx.c
7350
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
7351
if (scb == NULL) {
sys/dev/ic/aic79xx.c
7359
if (ahd_match_scb(ahd, scb, target, channel,
sys/dev/ic/aic79xx.c
7367
if ((scb->flags & SCB_ACTIVE) == 0)
sys/dev/ic/aic79xx.c
7369
ahd_done_with_status(ahd, scb, status);
sys/dev/ic/aic79xx.c
7485
struct scb *scbp;
sys/dev/ic/aic79xx.c
7486
struct scb *scbp_next;
sys/dev/ic/aic79xx.c
7844
ahd_handle_scb_status(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
7846
if (scb->hscb->shared_data.istatus.scsi_status != 0) {
sys/dev/ic/aic79xx.c
7847
ahd_handle_scsi_status(ahd, scb);
sys/dev/ic/aic79xx.c
7849
ahd_calc_residual(ahd, scb);
sys/dev/ic/aic79xx.c
7850
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
7855
ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
7869
hscb = scb->hscb;
sys/dev/ic/aic79xx.c
7879
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
7880
aic_freeze_scb(scb);
sys/dev/ic/aic79xx.c
7888
if ((scb->flags & SCB_SENSE) != 0) {
sys/dev/ic/aic79xx.c
7893
scb->flags &= ~SCB_SENSE;
sys/dev/ic/aic79xx.c
7894
aic_set_transaction_status(scb, CAM_AUTOSENSE_FAIL);
sys/dev/ic/aic79xx.c
7895
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
7898
aic_set_transaction_status(scb, CAM_SCSI_STATUS_ERROR);
sys/dev/ic/aic79xx.c
7899
aic_set_scsi_status(scb, hscb->shared_data.istatus.scsi_status);
sys/dev/ic/aic79xx.c
7905
ahd_sync_sense(ahd, scb, BUS_DMASYNC_POSTREAD);
sys/dev/ic/aic79xx.c
7906
siu = (struct scsi_status_iu_header *)scb->sense_data;
sys/dev/ic/aic79xx.c
7907
aic_set_scsi_status(scb, siu->status);
sys/dev/ic/aic79xx.c
791
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/ic/aic79xx.c
7910
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
7912
SCB_GET_TAG(scb), siu->status);
sys/dev/ic/aic79xx.c
7920
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
7948
aic_set_transaction_status(scb,
sys/dev/ic/aic79xx.c
7952
scb->flags |= SCB_PKT_SENSE;
sys/dev/ic/aic79xx.c
7958
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
7972
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
7974
SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
7978
if (aic_perform_autosense(scb) == 0)
sys/dev/ic/aic79xx.c
798
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/ic/aic79xx.c
7981
ahd_compile_devinfo(&devinfo, SCB_GET_OUR_ID(scb),
sys/dev/ic/aic79xx.c
7982
SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
7983
SCB_GET_LUN(scb),
sys/dev/ic/aic79xx.c
7984
SCB_GET_CHANNEL(ahd, scb),
sys/dev/ic/aic79xx.c
7992
sg = scb->sg_list;
sys/dev/ic/aic79xx.c
7997
ahd_update_residual(ahd, scb);
sys/dev/ic/aic79xx.c
8000
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
8004
scb->sg_count = 0;
sys/dev/ic/aic79xx.c
8005
sg = ahd_sg_setup(ahd, scb, sg, ahd_get_sense_bufaddr(ahd, scb),
sys/dev/ic/aic79xx.c
8006
aic_get_sense_bufsize(ahd, scb),
sys/dev/ic/aic79xx.c
8011
&& SCB_GET_LUN(scb) < 8)
sys/dev/ic/aic79xx.c
8012
sc->byte2 = SCB_GET_LUN(scb) << 5;
sys/dev/ic/aic79xx.c
8015
sc->length = aic_get_sense_bufsize(ahd, scb);
sys/dev/ic/aic79xx.c
8035
if (aic_get_residual(scb) == aic_get_transfer_length(scb)) {
sys/dev/ic/aic79xx.c
8042
scb->flags &=
sys/dev/ic/aic79xx.c
8044
scb->flags |= SCB_AUTO_NEGOTIATE;
sys/dev/ic/aic79xx.c
8047
ahd_setup_data_scb(ahd, scb);
sys/dev/ic/aic79xx.c
8048
scb->flags |= SCB_SENSE;
sys/dev/ic/aic79xx.c
8049
ahd_queue_scb(ahd, scb);
sys/dev/ic/aic79xx.c
8057
aic_scb_timer_reset(scb, 5 * 1000);
sys/dev/ic/aic79xx.c
8065
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
8074
ahd_calc_residual(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
8098
hscb = scb->hscb;
sys/dev/ic/aic79xx.c
8119
resid = aic_get_transfer_length(scb);
sys/dev/ic/aic79xx.c
8124
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
8126
SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
8127
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
8128
aic_set_transaction_status(scb, CAM_DATA_RUN_ERR);
sys/dev/ic/aic79xx.c
8129
aic_freeze_scb(scb);
sys/dev/ic/aic79xx.c
8142
sg = ahd_sg_bus_to_virt(ahd, scb, resid_sgptr & SG_PTR_MASK);
sys/dev/ic/aic79xx.c
8157
if ((scb->flags & SCB_SENSE) == 0)
sys/dev/ic/aic79xx.c
8158
aic_set_residual(scb, resid);
sys/dev/ic/aic79xx.c
8160
aic_set_sense_residual(scb, resid);
sys/dev/ic/aic79xx.c
8164
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
8166
(scb->flags & SCB_SENSE) ? "Sense " : "", resid);
sys/dev/ic/aic79xx.c
8674
struct scb *scb;
sys/dev/ic/aic79xx.c
874
struct scb *scb;
sys/dev/ic/aic79xx.c
8757
TAILQ_FOREACH(scb, &ahd->pending_scbs, next) {
sys/dev/ic/aic79xx.c
8760
cur_col = printf("\n%3d FIFO_USE[0x%x] ", SCB_GET_TAG(scb),
sys/dev/ic/aic79xx.c
8762
ahd_set_scbptr(ahd, SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
8772
TAILQ_FOREACH(scb, &ahd->scb_data.free_scbs, next) {
sys/dev/ic/aic79xx.c
8773
printf("%d ", SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
8820
struct scb *fifo_scb;
sys/dev/ic/aic79xx.c
888
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/ic/aic79xx.c
889
if (scb == NULL) {
sys/dev/ic/aic79xx.c
8953
struct scb *scb, *list_scb;
sys/dev/ic/aic79xx.c
896
ahd_handle_scb_status(ahd, scb);
sys/dev/ic/aic79xx.c
8962
scb = (struct scb *)arg;
sys/dev/ic/aic79xx.c
8963
ahd = scb->ahd_softc;
sys/dev/ic/aic79xx.c
8970
SCB_GET_TAG(scb), was_paused ? "" : "not ");
sys/dev/ic/aic79xx.c
8976
if (scb->flags & SCB_ACTIVE) {
sys/dev/ic/aic79xx.c
8977
aic_set_transaction_status(scb, CAM_CMD_TIMEOUT);
sys/dev/ic/aic79xx.c
898
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
8987
channel = SCB_GET_CHANNEL(ahd, scb);
sys/dev/ic/aic79xx.c
9506
struct scb *scb;
sys/dev/ic/aic79xx.c
9517
TAILQ_FOREACH(scb, &ahd->pending_scbs, next) {
sys/dev/ic/aic79xx.c
9520
ccbh = &scb->io_ctx->ccb_h;
sys/dev/ic/aic79xx.c
971
struct scb *scb;
sys/dev/ic/aic79xx.c
977
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
978
if (scb == NULL) {
sys/dev/ic/aic79xx.c
986
ahd_outb(ahd, SAVED_SCSIID, scb->hscb->scsiid);
sys/dev/ic/aic79xx.c
987
ahd_outb(ahd, SAVED_LUN, scb->hscb->lun);
sys/dev/ic/aic79xx.h
1061
TAILQ_HEAD(, scb) pending_scbs;
sys/dev/ic/aic79xx.h
1066
LIST_HEAD(, scb) timedout_scbs;
sys/dev/ic/aic79xx.h
115
#define SCB_IS_SCSIBUS_B(ahd, scb) (0)
sys/dev/ic/aic79xx.h
116
#define SCB_GET_OUR_ID(scb) \
sys/dev/ic/aic79xx.h
117
SCSIID_OUR_ID((scb)->hscb->scsiid)
sys/dev/ic/aic79xx.h
118
#define SCB_GET_TARGET(ahd, scb) \
sys/dev/ic/aic79xx.h
119
SCSIID_TARGET((ahd), (scb)->hscb->scsiid)
sys/dev/ic/aic79xx.h
120
#define SCB_GET_CHANNEL(ahd, scb) \
sys/dev/ic/aic79xx.h
121
SCSIID_CHANNEL(ahd, (scb)->hscb->scsiid)
sys/dev/ic/aic79xx.h
122
#define SCB_GET_LUN(scb) \
sys/dev/ic/aic79xx.h
123
((scb)->hscb->lun)
sys/dev/ic/aic79xx.h
124
#define SCB_GET_TARGET_OFFSET(ahd, scb) \
sys/dev/ic/aic79xx.h
125
SCB_GET_TARGET(ahd, scb)
sys/dev/ic/aic79xx.h
126
#define SCB_GET_TARGET_MASK(ahd, scb) \
sys/dev/ic/aic79xx.h
127
(0x01 << (SCB_GET_TARGET_OFFSET(ahd, scb)))
sys/dev/ic/aic79xx.h
129
#define SCB_IS_SILENT(scb) \
sys/dev/ic/aic79xx.h
131
&& (((scb)->flags & SCB_SILENT) != 0))
sys/dev/ic/aic79xx.h
133
#define SCB_IS_SILENT(scb) \
sys/dev/ic/aic79xx.h
1336
struct scb *scb);
sys/dev/ic/aic79xx.h
1337
int ahd_match_scb(struct ahd_softc *ahd, struct scb *scb,
sys/dev/ic/aic79xx.h
134
(((scb)->flags & SCB_SILENT) != 0)
sys/dev/ic/aic79xx.h
1400
struct scb *scb, uint32_t status);
sys/dev/ic/aic79xx.h
1405
void ahd_freeze_devq(struct ahd_softc *ahd, struct scb *scb);
sys/dev/ic/aic79xx.h
1414
struct scb *scb);
sys/dev/ic/aic79xx.h
1416
struct scb *scb);
sys/dev/ic/aic79xx.h
1418
struct scb *scb);
sys/dev/ic/aic79xx.h
1439
struct ahd_devinfo *, struct scb *);
sys/dev/ic/aic79xx.h
148
#define SCB_GET_TAG(scb) \
sys/dev/ic/aic79xx.h
149
aic_le16toh(scb->hscb->tag)
sys/dev/ic/aic79xx.h
1511
void ahd_print_scb(struct scb *scb);
sys/dev/ic/aic79xx.h
1514
void ahd_dump_sglist(struct scb *scb);
sys/dev/ic/aic79xx.h
616
TAILQ_ENTRY(scb) next;
sys/dev/ic/aic79xx.h
618
LIST_ENTRY(scb) timedout_links;
sys/dev/ic/aic79xx.h
636
TAILQ_HEAD(scb_tailq, scb);
sys/dev/ic/aic79xx.h
637
LIST_HEAD(scb_list, scb);
sys/dev/ic/aic79xx.h
648
struct scb *scbindex[AHD_SCB_MAX];
sys/dev/ic/aic79xx_inline.h
101
struct scb *scb);
sys/dev/ic/aic79xx_inline.h
103
struct scb *scb);
sys/dev/ic/aic79xx_inline.h
105
struct scb *scb);
sys/dev/ic/aic79xx_inline.h
110
ahd_sg_bus_to_virt(struct ahd_softc *, struct scb *,
sys/dev/ic/aic79xx_inline.h
113
ahd_sg_virt_to_bus(struct ahd_softc *, struct scb *,
sys/dev/ic/aic79xx_inline.h
115
void ahd_sync_scb(struct ahd_softc *, struct scb *, int);
sys/dev/ic/aic79xx_inline.h
116
void ahd_sync_sglist(struct ahd_softc *, struct scb *, int);
sys/dev/ic/aic79xx_inline.h
117
void ahd_sync_sense(struct ahd_softc *, struct scb *, int);
sys/dev/ic/aic79xx_inline.h
122
void ahd_complete_scb(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_inline.h
123
void ahd_update_residual(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_inline.h
151
struct scb *ahd_lookup_scb(struct ahd_softc *, u_int);
sys/dev/ic/aic79xx_inline.h
152
void ahd_swap_with_next_hscb(struct ahd_softc *ahd, struct scb *scb);
sys/dev/ic/aic79xx_inline.h
153
void ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb);
sys/dev/ic/aic79xx_inline.h
154
uint8_t *ahd_get_sense_buf(struct ahd_softc *ahd, struct scb *scb);
sys/dev/ic/aic79xx_inline.h
155
uint32_t ahd_get_sense_bufaddr(struct ahd_softc *ahd, struct scb *scb);
sys/dev/ic/aic79xx_inline.h
97
void *ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb,
sys/dev/ic/aic79xx_openbsd.c
150
ahd_done(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_openbsd.c
152
struct scsi_xfer *xs = scb->xs;
sys/dev/ic/aic79xx_openbsd.c
156
TAILQ_REMOVE(&ahd->pending_scbs, scb, next);
sys/dev/ic/aic79xx_openbsd.c
167
bus_dmamap_sync(ahd->parent_dmat, scb->dmamap, 0,
sys/dev/ic/aic79xx_openbsd.c
168
scb->dmamap->dm_mapsize, op);
sys/dev/ic/aic79xx_openbsd.c
169
bus_dmamap_unload(ahd->parent_dmat, scb->dmamap);
sys/dev/ic/aic79xx_openbsd.c
184
if ((scb->flags & SCB_SENSE) == 0) {
sys/dev/ic/aic79xx_openbsd.c
216
} else if ((scb->flags & SCB_SENSE) != 0) {
sys/dev/ic/aic79xx_openbsd.c
228
memcpy(&xs->sense, ahd_get_sense_buf(ahd, scb),
sys/dev/ic/aic79xx_openbsd.c
231
} else if ((scb->flags & SCB_PKT_SENSE) != 0) {
sys/dev/ic/aic79xx_openbsd.c
235
siu = (struct scsi_status_iu_header *)scb->sense_data;
sys/dev/ic/aic79xx_openbsd.c
250
struct scb *scb;
sys/dev/ic/aic79xx_openbsd.c
283
scb = xs->io;
sys/dev/ic/aic79xx_openbsd.c
284
hscb = scb->hscb;
sys/dev/ic/aic79xx_openbsd.c
285
scb->flags = SCB_FLAG_NONE;
sys/dev/ic/aic79xx_openbsd.c
286
scb->hscb->control = 0;
sys/dev/ic/aic79xx_openbsd.c
287
ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = NULL;
sys/dev/ic/aic79xx_openbsd.c
290
printf("%s: start scb(%p)\n", ahd_name(ahd), scb);
sys/dev/ic/aic79xx_openbsd.c
293
scb->xs = xs;
sys/dev/ic/aic79xx_openbsd.c
294
timeout_set(&xs->stimeout, ahd_timeout, scb);
sys/dev/ic/aic79xx_openbsd.c
304
scb->flags |= SCB_DEVICE_RESET;
sys/dev/ic/aic79xx_openbsd.c
307
ahd_execute_scb(scb, NULL, 0);
sys/dev/ic/aic79xx_openbsd.c
310
ahd_setup_data(ahd, xs, scb);
sys/dev/ic/aic79xx_openbsd.c
317
struct scb *scb;
sys/dev/ic/aic79xx_openbsd.c
325
scb = (struct scb *)arg;
sys/dev/ic/aic79xx_openbsd.c
326
xs = scb->xs;
sys/dev/ic/aic79xx_openbsd.c
336
ahd_setup_data_scb(ahd, scb);
sys/dev/ic/aic79xx_openbsd.c
339
for (i = nsegments, sg = scb->sg_list; i > 0; i--) {
sys/dev/ic/aic79xx_openbsd.c
341
sg = ahd_sg_setup(ahd, scb, sg, dm_segs->ds_addr,
sys/dev/ic/aic79xx_openbsd.c
352
bus_dmamap_sync(ahd->parent_dmat, scb->dmamap, 0,
sys/dev/ic/aic79xx_openbsd.c
353
scb->dmamap->dm_mapsize, op);
sys/dev/ic/aic79xx_openbsd.c
366
scb->dmamap);
sys/dev/ic/aic79xx_openbsd.c
371
tinfo = ahd_fetch_transinfo(ahd, SCSIID_CHANNEL(ahd, scb->hscb->scsiid),
sys/dev/ic/aic79xx_openbsd.c
372
SCSIID_OUR_ID(scb->hscb->scsiid),
sys/dev/ic/aic79xx_openbsd.c
373
SCSIID_TARGET(ahd, scb->hscb->scsiid),
sys/dev/ic/aic79xx_openbsd.c
376
mask = SCB_GET_TARGET_MASK(ahd, scb);
sys/dev/ic/aic79xx_openbsd.c
379
scb->hscb->control |= DISCENB;
sys/dev/ic/aic79xx_openbsd.c
382
scb->hscb->control |= TAG_ENB;
sys/dev/ic/aic79xx_openbsd.c
385
scb->flags |= SCB_PACKETIZED;
sys/dev/ic/aic79xx_openbsd.c
386
if (scb->hscb->task_management != 0)
sys/dev/ic/aic79xx_openbsd.c
387
scb->hscb->control &= ~MK_MESSAGE;
sys/dev/ic/aic79xx_openbsd.c
391
scb->flags |= SCB_AUTO_NEGOTIATE;
sys/dev/ic/aic79xx_openbsd.c
392
scb->hscb->control |= MK_MESSAGE;
sys/dev/ic/aic79xx_openbsd.c
397
TAILQ_INSERT_HEAD(&ahd->pending_scbs, scb, next);
sys/dev/ic/aic79xx_openbsd.c
402
scb->flags |= SCB_ACTIVE;
sys/dev/ic/aic79xx_openbsd.c
404
if ((scb->flags & SCB_TARGET_IMMEDIATE) != 0) {
sys/dev/ic/aic79xx_openbsd.c
406
ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = scb;
sys/dev/ic/aic79xx_openbsd.c
408
ahd_set_scbptr(ahd, SCB_GET_TAG(scb));
sys/dev/ic/aic79xx_openbsd.c
412
ahd_queue_scb(ahd, scb);
sys/dev/ic/aic79xx_openbsd.c
417
int lun = SCB_GET_LUN(scb);
sys/dev/ic/aic79xx_openbsd.c
422
ahd_adapter_req_set_xfer_mode(ahd, scb);
sys/dev/ic/aic79xx_openbsd.c
425
ahd_scb_devinfo(ahd, &devinfo, scb);
sys/dev/ic/aic79xx_openbsd.c
446
ahd_timeout(scb);
sys/dev/ic/aic79xx_openbsd.c
474
struct scb *scb)
sys/dev/ic/aic79xx_openbsd.c
478
hscb = scb->hscb;
sys/dev/ic/aic79xx_openbsd.c
496
scb->dmamap, xs->data,
sys/dev/ic/aic79xx_openbsd.c
512
ahd_execute_scb(scb, scb->dmamap->dm_segs,
sys/dev/ic/aic79xx_openbsd.c
513
scb->dmamap->dm_nsegs);
sys/dev/ic/aic79xx_openbsd.c
515
ahd_execute_scb(scb, NULL, 0);
sys/dev/ic/aic79xx_openbsd.c
557
ahd_adapter_req_set_xfer_mode(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_openbsd.c
567
target_id = scb->xs->sc_link->target;
sys/dev/ic/aic79xx_openbsd.c
568
our_id = SCSI_SCSI_ID(ahd, scb->xs->sc_link);
sys/dev/ic/aic79xx_openbsd.c
572
quirks = scb->xs->sc_link->quirks;
sys/dev/ic/aic79xx_openbsd.c
644
aic_scb_timer_reset(struct scb *scb, u_int msec)
sys/dev/ic/aic79xx_openbsd.c
651
if (!(scb->xs->xs_control & XS_CTL_POLL))
sys/dev/ic/aic79xx_openbsd.c
652
callout_reset(&scb->xs->xs_callout, nticks, ahd_timeout, scb);
sys/dev/ic/aic79xx_openbsd.c
663
aic_platform_scb_free(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_openbsd.c
675
timeout_del(&scb->xs->stimeout);
sys/dev/ic/aic79xx_openbsd.c
682
ahd_print_path(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_openbsd.c
684
sc_print_addr(scb->xs->sc_link);
sys/dev/ic/aic79xx_openbsd.c
76
struct scb *);
sys/dev/ic/aic79xx_openbsd.c
78
void ahd_adapter_req_set_xfer_mode(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_openbsd.h
153
void aic_scb_timer_reset(struct scb *, u_int);
sys/dev/ic/aic79xx_openbsd.h
156
#define aic_get_timeout(scb) ((scb)->xs->timeout)
sys/dev/ic/aic79xx_openbsd.h
207
#define aic_set_transaction_status(scb, status) (scb)->xs->error = (status)
sys/dev/ic/aic79xx_openbsd.h
208
#define aic_set_scsi_status(scb, status) (scb)->xs->xs_status = (status)
sys/dev/ic/aic79xx_openbsd.h
209
#define aic_set_transaction_tag(scb, enabled, type)
sys/dev/ic/aic79xx_openbsd.h
210
#define aic_set_residual(scb, residual) (scb)->xs->resid = (residual)
sys/dev/ic/aic79xx_openbsd.h
211
#define aic_set_sense_residual(scb, residual) (scb)->xs->resid = (residual)
sys/dev/ic/aic79xx_openbsd.h
213
#define aic_get_transaction_status(scb) \
sys/dev/ic/aic79xx_openbsd.h
214
(((scb)->xs->flags & ITSDONE) ? CAM_REQ_CMP : (scb)->xs->error)
sys/dev/ic/aic79xx_openbsd.h
215
#define aic_get_scsi_status(scb) ((scb)->xs->status)
sys/dev/ic/aic79xx_openbsd.h
216
#define aic_get_transfer_length(scb) ((scb)->xs->datalen)
sys/dev/ic/aic79xx_openbsd.h
217
#define aic_get_transfer_dir(scb) \
sys/dev/ic/aic79xx_openbsd.h
218
((scb)->xs->flags & (SCSI_DATA_IN | SCSI_DATA_OUT))
sys/dev/ic/aic79xx_openbsd.h
219
#define aic_get_residual(scb) ((scb)->xs->resid)
sys/dev/ic/aic79xx_openbsd.h
220
#define aic_get_sense_bufsize(ahd, scb) (sizeof(struct scsi_sense_data))
sys/dev/ic/aic79xx_openbsd.h
222
#define aic_perform_autosense(scb) (1)
sys/dev/ic/aic79xx_openbsd.h
226
#define aic_freeze_scb(scb)
sys/dev/ic/aic79xx_openbsd.h
228
void aic_platform_scb_free(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_openbsd.h
246
void ahd_print_path(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_openbsd.h
262
void ahd_done(struct ahd_softc *, struct scb *);
sys/dev/ic/aic7xxx.c
1004
struct scb *scb;
sys/dev/ic/aic7xxx.c
1040
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
1041
if (scb != NULL
sys/dev/ic/aic7xxx.c
1043
scb = NULL;
sys/dev/ic/aic7xxx.c
1119
if (scb != NULL) {
sys/dev/ic/aic7xxx.c
1120
if (SCB_IS_SILENT(scb))
sys/dev/ic/aic7xxx.c
1123
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
1124
scb->flags |= SCB_TRANSMISSION_ERROR;
sys/dev/ic/aic7xxx.c
1211
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
1212
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
1221
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
1226
ahc_scb_devinfo(ahc, &devinfo, scb);
sys/dev/ic/aic7xxx.c
1227
ahc_set_transaction_status(scb, CAM_SEL_TIMEOUT);
sys/dev/ic/aic7xxx.c
1228
ahc_freeze_devq(ahc, scb);
sys/dev/ic/aic7xxx.c
1296
tag = scb->hscb->tag;
sys/dev/ic/aic7xxx.c
1297
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
1299
scb->hscb->tag, tag == SCB_LIST_NULL ?
sys/dev/ic/aic7xxx.c
1314
if (scb != NULL
sys/dev/ic/aic7xxx.c
1315
&& scb->io_ctx->ccb_h.func_code== XPT_RESET_DEV
sys/dev/ic/aic7xxx.c
1316
&& ahc_match_scb(ahc, scb, target, channel,
sys/dev/ic/aic7xxx.c
1320
ahc_set_transaction_status(scb, CAM_REQ_CMP);
sys/dev/ic/aic7xxx.c
1351
ahc_qinfifo_requeue_tail(ahc, scb);
sys/dev/ic/aic7xxx.c
1363
ahc_qinfifo_requeue_tail(ahc, scb);
sys/dev/ic/aic7xxx.c
1377
ahc_qinfifo_requeue_tail(ahc, scb);
sys/dev/ic/aic7xxx.c
1384
if (scb != NULL) {
sys/dev/ic/aic7xxx.c
1387
if ((scb->hscb->control & TAG_ENB) != 0)
sys/dev/ic/aic7xxx.c
1388
tag = scb->hscb->tag;
sys/dev/ic/aic7xxx.c
1391
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
1393
SCB_GET_LUN(scb), tag,
sys/dev/ic/aic7xxx.c
1561
ahc_print_scb(struct scb *scb)
sys/dev/ic/aic7xxx.c
1565
struct hardware_scb *hscb = scb->hscb;
sys/dev/ic/aic7xxx.c
1568
(void *)scb,
sys/dev/ic/aic7xxx.c
1581
if (scb->sg_count > 0) {
sys/dev/ic/aic7xxx.c
1582
for (i = 0; i < scb->sg_count; i++) {
sys/dev/ic/aic7xxx.c
1585
(aic_le32toh(scb->sg_list[i].len) >> 24
sys/dev/ic/aic7xxx.c
1587
aic_le32toh(scb->sg_list[i].addr),
sys/dev/ic/aic7xxx.c
1588
aic_le32toh(scb->sg_list[i].len));
sys/dev/ic/aic7xxx.c
170
struct scb *scb);
sys/dev/ic/aic7xxx.c
207
struct scb *scb);
sys/dev/ic/aic7xxx.c
2131
struct scb *pending_scb;
sys/dev/ic/aic7xxx.c
215
struct scb *prev_scb,
sys/dev/ic/aic7xxx.c
216
struct scb *scb);
sys/dev/ic/aic7xxx.c
2280
struct scb *scb)
sys/dev/ic/aic7xxx.c
2285
our_id = SCSIID_OUR_ID(scb->hscb->scsiid);
sys/dev/ic/aic7xxx.c
2287
if ((scb->flags & SCB_TARGET_SCB) != 0)
sys/dev/ic/aic7xxx.c
2289
ahc_compile_devinfo(devinfo, our_id, SCB_GET_TARGET(ahc, scb),
sys/dev/ic/aic7xxx.c
2290
SCB_GET_LUN(scb), SCB_GET_CHANNEL(ahc, scb), role);
sys/dev/ic/aic7xxx.c
2314
struct scb *scb)
sys/dev/ic/aic7xxx.c
2324
if ((scb->flags & SCB_DEVICE_RESET) == 0
sys/dev/ic/aic7xxx.c
2328
identify_msg = MSG_IDENTIFYFLAG | SCB_GET_LUN(scb);
sys/dev/ic/aic7xxx.c
2329
if ((scb->hscb->control & DISCENB) != 0)
sys/dev/ic/aic7xxx.c
2334
if ((scb->hscb->control & TAG_ENB) != 0) {
sys/dev/ic/aic7xxx.c
2336
scb->hscb->control & (TAG_ENB|SCB_TAG_TYPE);
sys/dev/ic/aic7xxx.c
2337
ahc->msgout_buf[ahc->msgout_index++] = scb->hscb->tag;
sys/dev/ic/aic7xxx.c
2342
if (scb->flags & SCB_DEVICE_RESET) {
sys/dev/ic/aic7xxx.c
2345
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
2355
} else if ((scb->flags & SCB_ABORT) != 0) {
sys/dev/ic/aic7xxx.c
2356
if ((scb->hscb->control & TAG_ENB) != 0)
sys/dev/ic/aic7xxx.c
2361
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
2363
(scb->hscb->control & TAG_ENB) != 0 ? " Tag" : "");
sys/dev/ic/aic7xxx.c
2372
} else if ((scb->flags & (SCB_AUTO_NEGOTIATE|SCB_NEGOTIATE)) != 0) {
sys/dev/ic/aic7xxx.c
2377
printf("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid,
sys/dev/ic/aic7xxx.c
2380
"SCB flags = %x", scb->hscb->tag, scb->hscb->control,
sys/dev/ic/aic7xxx.c
2381
ahc_inb(ahc, MSG_OUT), scb->flags);
sys/dev/ic/aic7xxx.c
2389
scb->hscb->control &= ~MK_MESSAGE;
sys/dev/ic/aic7xxx.c
2588
struct scb *scb;
sys/dev/ic/aic7xxx.c
2597
scb = ahc_lookup_scb(ahc, scbid);
sys/dev/ic/aic7xxx.c
2611
scb = NULL;
sys/dev/ic/aic7xxx.c
2612
} else if (scb == NULL) {
sys/dev/ic/aic7xxx.c
2621
ahc_set_transaction_status(scb, CAM_SEQUENCE_FAIL);
sys/dev/ic/aic7xxx.c
2623
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
2633
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
2636
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
2663
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
2670
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
2671
scb->flags |= SCB_ABORT;
sys/dev/ic/aic7xxx.c
330
struct scb *scb;
sys/dev/ic/aic7xxx.c
3461
struct scb *scb;
sys/dev/ic/aic7xxx.c
3469
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
3530
} else if ((scb->hscb->control & MSG_SIMPLE_TASK) != 0) {
sys/dev/ic/aic7xxx.c
3534
tag_type = (scb->hscb->control & MSG_SIMPLE_TASK);
sys/dev/ic/aic7xxx.c
3558
scb->hscb->control &= mask;
sys/dev/ic/aic7xxx.c
3559
ahc_set_transaction_tag(scb, /*enabled*/FALSE,
sys/dev/ic/aic7xxx.c
356
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
357
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
3573
TAILQ_INSERT_HEAD(untagged_q, scb, links.tqe);
sys/dev/ic/aic7xxx.c
3574
scb->flags |= SCB_UNTAGGEDQ;
sys/dev/ic/aic7xxx.c
3576
ahc_busy_tcl(ahc, BUILD_TCL(scb->hscb->scsiid, devinfo->lun),
sys/dev/ic/aic7xxx.c
3577
scb->hscb->tag);
sys/dev/ic/aic7xxx.c
3584
ahc_search_qinfifo(ahc, SCB_GET_TARGET(ahc, scb),
sys/dev/ic/aic7xxx.c
3585
SCB_GET_CHANNEL(ahc, scb),
sys/dev/ic/aic7xxx.c
3586
SCB_GET_LUN(scb), /*tag*/SCB_LIST_NULL,
sys/dev/ic/aic7xxx.c
3607
struct scb *scb;
sys/dev/ic/aic7xxx.c
3610
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
3616
|| ahc_get_transfer_dir(scb) != CAM_DIR_IN) {
sys/dev/ic/aic7xxx.c
3665
sg = ahc_sg_bus_to_virt(scb, sgptr);
sys/dev/ic/aic7xxx.c
3673
if (sg != scb->sg_list
sys/dev/ic/aic7xxx.c
369
ahc_update_residual(ahc, scb);
sys/dev/ic/aic7xxx.c
3691
sgptr = ahc_sg_virt_to_bus(scb, sg);
sys/dev/ic/aic7xxx.c
370
ahc_done(ahc, scb);
sys/dev/ic/aic7xxx.c
3715
struct scb *scb;
sys/dev/ic/aic7xxx.c
3723
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
3730
sg = ahc_sg_bus_to_virt(scb, sgptr);
sys/dev/ic/aic7xxx.c
3825
struct scb *scb)
sys/dev/ic/aic7xxx.c
3836
if (scb != NULL && (scb->flags & SCB_AUTO_NEGOTIATE) != 0)
sys/dev/ic/aic7xxx.c
386
struct scb *scb;
sys/dev/ic/aic7xxx.c
391
if ((scb = TAILQ_FIRST(queue)) != NULL
sys/dev/ic/aic7xxx.c
392
&& (scb->flags & SCB_ACTIVE) == 0) {
sys/dev/ic/aic7xxx.c
393
scb->flags |= SCB_ACTIVE;
sys/dev/ic/aic7xxx.c
394
ahc_queue_scb(ahc, scb);
sys/dev/ic/aic7xxx.c
4210
scb_data->scbarray = mallocarray(AHC_SCB_MAX_ALLOC, sizeof(struct scb),
sys/dev/ic/aic7xxx.c
4325
AHC_SCB_MAX_ALLOC * sizeof(struct scb));
sys/dev/ic/aic7xxx.c
4333
struct scb *next_scb;
sys/dev/ic/aic7xxx.c
435
struct scb *scb;
sys/dev/ic/aic7xxx.c
470
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
471
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
4771
(u_int)sizeof(struct scb),
sys/dev/ic/aic7xxx.c
481
hscb = scb->hscb;
sys/dev/ic/aic7xxx.c
484
if ((scb->flags & SCB_SENSE) != 0) {
sys/dev/ic/aic7xxx.c
490
scb->flags &= ~SCB_SENSE;
sys/dev/ic/aic7xxx.c
491
ahc_set_transaction_status(scb, CAM_AUTOSENSE_FAIL);
sys/dev/ic/aic7xxx.c
494
ahc_set_transaction_status(scb, CAM_SCSI_STATUS_ERROR);
sys/dev/ic/aic7xxx.c
496
ahc_freeze_devq(ahc, scb);
sys/dev/ic/aic7xxx.c
497
ahc_freeze_scb(scb);
sys/dev/ic/aic7xxx.c
498
ahc_set_scsi_status(scb, hscb->shared_data.status.scsi_status);
sys/dev/ic/aic7xxx.c
5003
ahc_match_scb(struct ahc_softc *ahc, struct scb *scb, int target,
sys/dev/ic/aic7xxx.c
5009
if (scb == NULL)
sys/dev/ic/aic7xxx.c
5012
targ = SCB_GET_TARGET(ahc, scb);
sys/dev/ic/aic7xxx.c
5013
chan = SCB_GET_CHANNEL(ahc, scb);
sys/dev/ic/aic7xxx.c
5014
slun = SCB_GET_LUN(scb);
sys/dev/ic/aic7xxx.c
5025
group = XPT_FC_GROUP(scb->io_ctx->ccb_h.func_code);
sys/dev/ic/aic7xxx.c
5028
&& ((tag == scb->hscb->tag)
sys/dev/ic/aic7xxx.c
5032
&& ((tag == scb->io_ctx->csio.tag_id)
sys/dev/ic/aic7xxx.c
5036
match = ((tag == scb->hscb->tag) || (tag == SCB_LIST_NULL));
sys/dev/ic/aic7xxx.c
5044
ahc_freeze_devq(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx.c
5050
target = SCB_GET_TARGET(ahc, scb);
sys/dev/ic/aic7xxx.c
5051
lun = SCB_GET_LUN(scb);
sys/dev/ic/aic7xxx.c
5052
channel = SCB_GET_CHANNEL(ahc, scb);
sys/dev/ic/aic7xxx.c
5060
ahc_qinfifo_requeue_tail(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx.c
5062
struct scb *prev_scb;
sys/dev/ic/aic7xxx.c
5073
ahc_qinfifo_requeue(ahc, prev_scb, scb);
sys/dev/ic/aic7xxx.c
5082
ahc_qinfifo_requeue(struct ahc_softc *ahc, struct scb *prev_scb,
sys/dev/ic/aic7xxx.c
5083
struct scb *scb)
sys/dev/ic/aic7xxx.c
5086
ahc_outb(ahc, NEXT_QUEUED_SCB, scb->hscb->tag);
sys/dev/ic/aic7xxx.c
5088
prev_scb->hscb->next = scb->hscb->tag;
sys/dev/ic/aic7xxx.c
5092
ahc->qinfifo[ahc->qinfifonext] = scb->hscb->tag;
sys/dev/ic/aic7xxx.c
5097
scb->hscb->next = ahc->next_queued_scb->hscb->tag;
sys/dev/ic/aic7xxx.c
5098
ahc_sync_scb(ahc, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
sys/dev/ic/aic7xxx.c
5121
struct scb *scb;
sys/dev/ic/aic7xxx.c
5122
struct scb *prev_scb;
sys/dev/ic/aic7xxx.c
514
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
5159
scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinpos]);
sys/dev/ic/aic7xxx.c
516
scb->hscb->tag);
sys/dev/ic/aic7xxx.c
5160
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
5166
if (ahc_match_scb(ahc, scb, target, channel, lun, tag, role)) {
sys/dev/ic/aic7xxx.c
5177
ostat = ahc_get_transaction_status(scb);
sys/dev/ic/aic7xxx.c
5179
ahc_set_transaction_status(scb, status);
sys/dev/ic/aic7xxx.c
5180
cstat = ahc_get_transaction_status(scb);
sys/dev/ic/aic7xxx.c
5182
ahc_freeze_scb(scb);
sys/dev/ic/aic7xxx.c
5183
if ((scb->flags & SCB_ACTIVE) == 0)
sys/dev/ic/aic7xxx.c
5185
ahc_done(ahc, scb);
sys/dev/ic/aic7xxx.c
5192
ahc_qinfifo_requeue(ahc, prev_scb, scb);
sys/dev/ic/aic7xxx.c
5193
prev_scb = scb;
sys/dev/ic/aic7xxx.c
5197
ahc_qinfifo_requeue(ahc, prev_scb, scb);
sys/dev/ic/aic7xxx.c
5198
prev_scb = scb;
sys/dev/ic/aic7xxx.c
520
if (ahc_perform_autosense(scb) == 0)
sys/dev/ic/aic7xxx.c
5224
scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinstart]);
sys/dev/ic/aic7xxx.c
5226
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
5237
next = scb->hscb->next;
sys/dev/ic/aic7xxx.c
5238
ahc->scb_data->scbindex[scb->hscb->tag] = NULL;
sys/dev/ic/aic7xxx.c
5239
ahc_swap_with_next_hscb(ahc, scb);
sys/dev/ic/aic7xxx.c
5240
scb->hscb->next = next;
sys/dev/ic/aic7xxx.c
5241
ahc->qinfifo[qinstart] = scb->hscb->tag;
sys/dev/ic/aic7xxx.c
5244
ahc_outb(ahc, NEXT_QUEUED_SCB, scb->hscb->tag);
sys/dev/ic/aic7xxx.c
5248
scb = ahc_lookup_scb(ahc, ahc->qinfifo[qintail]);
sys/dev/ic/aic7xxx.c
5249
scb->hscb->next = ahc->next_queued_scb->hscb->tag;
sys/dev/ic/aic7xxx.c
5271
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
5272
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
5277
if (ahc_match_scb(ahc, scb, target, channel,
sys/dev/ic/aic7xxx.c
5289
ostat = ahc_get_transaction_status(scb);
sys/dev/ic/aic7xxx.c
529
sg = scb->sg_list;
sys/dev/ic/aic7xxx.c
5291
ahc_set_transaction_status(scb, status);
sys/dev/ic/aic7xxx.c
5292
cstat = ahc_get_transaction_status(scb);
sys/dev/ic/aic7xxx.c
5294
ahc_freeze_scb(scb);
sys/dev/ic/aic7xxx.c
5295
if ((scb->flags & SCB_ACTIVE) == 0)
sys/dev/ic/aic7xxx.c
5297
ahc_done(ahc, scb);
sys/dev/ic/aic7xxx.c
5329
struct scb *scb;
sys/dev/ic/aic7xxx.c
534
ahc_update_residual(ahc, scb);
sys/dev/ic/aic7xxx.c
5360
struct scb *next_scb;
sys/dev/ic/aic7xxx.c
5366
scb = next_scb;
sys/dev/ic/aic7xxx.c
5367
next_scb = TAILQ_NEXT(scb, links.tqe);
sys/dev/ic/aic7xxx.c
537
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
5378
if ((scb->flags & SCB_ACTIVE) != 0)
sys/dev/ic/aic7xxx.c
5381
if (ahc_match_scb(ahc, scb, target, channel, lun,
sys/dev/ic/aic7xxx.c
5383
|| (xs != NULL && xs != scb->xs))
sys/dev/ic/aic7xxx.c
5396
ostat = ahc_get_transaction_status(scb);
sys/dev/ic/aic7xxx.c
5398
ahc_set_transaction_status(scb, status);
sys/dev/ic/aic7xxx.c
5399
cstat = ahc_get_transaction_status(scb);
sys/dev/ic/aic7xxx.c
5401
ahc_freeze_scb(scb);
sys/dev/ic/aic7xxx.c
5402
ahc_done(ahc, scb);
sys/dev/ic/aic7xxx.c
5406
scb->flags &= ~SCB_UNTAGGEDQ;
sys/dev/ic/aic7xxx.c
5407
TAILQ_REMOVE(untagged_q, scb, links.tqe);
sys/dev/ic/aic7xxx.c
541
sg->addr = ahc_get_sense_bufaddr(ahc, scb);
sys/dev/ic/aic7xxx.c
542
sg->len = ahc_get_sense_bufsize(ahc, scb);
sys/dev/ic/aic7xxx.c
5425
struct scb *scbp;
sys/dev/ic/aic7xxx.c
552
&& SCB_GET_LUN(scb) < 8)
sys/dev/ic/aic7xxx.c
553
sc->byte2 = SCB_GET_LUN(scb) << 5;
sys/dev/ic/aic7xxx.c
5587
struct scb *scbp;
sys/dev/ic/aic7xxx.c
5588
struct scb *scbp_next;
sys/dev/ic/aic7xxx.c
576
if (ahc_get_residual(scb)
sys/dev/ic/aic7xxx.c
577
== ahc_get_transfer_length(scb)) {
sys/dev/ic/aic7xxx.c
584
scb->flags &= ~SCB_NEGOTIATE;
sys/dev/ic/aic7xxx.c
585
scb->flags |= SCB_AUTO_NEGOTIATE;
sys/dev/ic/aic7xxx.c
590
hscb->sgptr = scb->sg_list_phys | SG_FULL_RESID;
sys/dev/ic/aic7xxx.c
5903
ahc_calc_residual(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx.c
5927
hscb = scb->hscb;
sys/dev/ic/aic7xxx.c
5942
resid = ahc_get_transfer_length(scb);
sys/dev/ic/aic7xxx.c
595
(scb - ahc->scb_data->scbarray) *
sys/dev/ic/aic7xxx.c
5956
sg = ahc_sg_bus_to_virt(scb, resid_sgptr & SG_PTR_MASK);
sys/dev/ic/aic7xxx.c
5971
if ((scb->flags & SCB_SENSE) == 0)
sys/dev/ic/aic7xxx.c
5972
ahc_set_residual(scb, resid);
sys/dev/ic/aic7xxx.c
5974
ahc_set_sense_residual(scb, resid);
sys/dev/ic/aic7xxx.c
5978
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
5980
(scb->flags & SCB_SENSE) ? "Sense " : "", resid);
sys/dev/ic/aic7xxx.c
600
scb->sg_map->sg_dmamap,
sys/dev/ic/aic7xxx.c
601
0, scb->sg_map->sg_dmamap->dm_mapsize,
sys/dev/ic/aic7xxx.c
608
scb->sg_count = 1;
sys/dev/ic/aic7xxx.c
609
scb->flags |= SCB_SENSE;
sys/dev/ic/aic7xxx.c
610
ahc_qinfifo_requeue_tail(ahc, scb);
sys/dev/ic/aic7xxx.c
616
ahc_scb_timer_reset(scb, 5 * 1000000);
sys/dev/ic/aic7xxx.c
6421
struct scb *scb;
sys/dev/ic/aic7xxx.c
6552
LIST_FOREACH(scb, &ahc->pending_scbs, pending_links) {
sys/dev/ic/aic7xxx.c
6555
/*cur_col =*/ printf("\n%3d ", scb->hscb->tag);
sys/dev/ic/aic7xxx.c
6556
ahc_scb_control_print(scb->hscb->control, &cur_col, 60);
sys/dev/ic/aic7xxx.c
6557
ahc_scb_scsiid_print(scb->hscb->scsiid, &cur_col, 60);
sys/dev/ic/aic7xxx.c
6558
ahc_scb_lun_print(scb->hscb->lun, &cur_col, 60);
sys/dev/ic/aic7xxx.c
6560
ahc_outb(ahc, SCBPTR, scb->hscb->tag);
sys/dev/ic/aic7xxx.c
6573
SLIST_FOREACH(scb, &ahc->scb_data->free_scbs, links.sle) {
sys/dev/ic/aic7xxx.c
6576
printf("%d ", scb->hscb->tag);
sys/dev/ic/aic7xxx.c
6588
TAILQ_FOREACH(scb, untagged_q, links.tqe) {
sys/dev/ic/aic7xxx.c
6591
printf("%d ", scb->hscb->tag);
sys/dev/ic/aic7xxx.c
6905
struct scb *scb;
sys/dev/ic/aic7xxx.c
6916
LIST_FOREACH(scb, &ahc->pending_scbs, pending_links) {
sys/dev/ic/aic7xxx.c
6919
ccbh = &scb->io_ctx->ccb_h;
sys/dev/ic/aic7xxx.c
736
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
738
if (scb == NULL)
sys/dev/ic/aic7xxx.c
745
scb);
sys/dev/ic/aic7xxx.c
762
scb);
sys/dev/ic/aic7xxx.c
824
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
825
if (scb != NULL)
sys/dev/ic/aic7xxx.c
826
ahc_set_transaction_status(scb,
sys/dev/ic/aic7xxx.c
851
scb = ahc_lookup_scb(ahc, scbindex);
sys/dev/ic/aic7xxx.c
858
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
862
scb->hscb->tag);
sys/dev/ic/aic7xxx.c
863
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
866
ahc_get_transfer_length(scb), scb->sg_count);
sys/dev/ic/aic7xxx.c
867
if (scb->sg_count > 0) {
sys/dev/ic/aic7xxx.c
868
for (i = 0; i < scb->sg_count; i++) {
sys/dev/ic/aic7xxx.c
872
(aic_le32toh(scb->sg_list[i].len) >> 24
sys/dev/ic/aic7xxx.c
874
aic_le32toh(scb->sg_list[i].addr),
sys/dev/ic/aic7xxx.c
875
aic_le32toh(scb->sg_list[i].len)
sys/dev/ic/aic7xxx.c
885
ahc_freeze_devq(ahc, scb);
sys/dev/ic/aic7xxx.c
886
if ((scb->flags & SCB_SENSE) == 0) {
sys/dev/ic/aic7xxx.c
887
ahc_set_transaction_status(scb, CAM_DATA_RUN_ERR);
sys/dev/ic/aic7xxx.c
889
scb->flags &= ~SCB_SENSE;
sys/dev/ic/aic7xxx.c
890
ahc_set_transaction_status(scb, CAM_AUTOSENSE_FAIL);
sys/dev/ic/aic7xxx.c
892
ahc_freeze_scb(scb);
sys/dev/ic/aic7xxx.c
923
scb = ahc_lookup_scb(ahc, scbindex);
sys/dev/ic/aic7xxx.c
924
if (scb != NULL)
sys/dev/ic/aic7xxx.c
929
ahc_search_qinfifo(ahc, SCB_GET_TARGET(ahc, scb),
sys/dev/ic/aic7xxx.c
930
SCB_GET_CHANNEL(ahc, scb),
sys/dev/ic/aic7xxx.c
931
SCB_GET_LUN(scb), scb->hscb->tag,
sys/dev/ic/aic7xxx_inline.h
169
ahc_sg_bus_to_virt(struct scb *scb,
sys/dev/ic/aic7xxx_inline.h
172
ahc_sg_virt_to_bus(struct scb *scb,
sys/dev/ic/aic7xxx_inline.h
177
struct scb *scb, int op);
sys/dev/ic/aic7xxx_inline.h
187
ahc_sg_bus_to_virt(struct scb *scb, uint32_t sg_busaddr)
sys/dev/ic/aic7xxx_inline.h
191
sg_index = (sg_busaddr - scb->sg_list_phys)/sizeof(struct ahc_dma_seg);
sys/dev/ic/aic7xxx_inline.h
195
return (&scb->sg_list[sg_index]);
sys/dev/ic/aic7xxx_inline.h
199
ahc_sg_virt_to_bus(struct scb *scb, struct ahc_dma_seg *sg)
sys/dev/ic/aic7xxx_inline.h
204
sg_index = sg - &scb->sg_list[1];
sys/dev/ic/aic7xxx_inline.h
206
return (scb->sg_list_phys + (sg_index * sizeof(*scb->sg_list)));
sys/dev/ic/aic7xxx_inline.h
217
ahc_sync_scb(struct ahc_softc *ahc, struct scb *scb, int op)
sys/dev/ic/aic7xxx_inline.h
221
/*offset*/(scb->hscb - ahc->scb_data->hscbs) * sizeof(*scb->hscb),
sys/dev/ic/aic7xxx_inline.h
222
/*len*/sizeof(*scb->hscb), op);
sys/dev/ic/aic7xxx_inline.h
246
struct scb *scb);
sys/dev/ic/aic7xxx_inline.h
261
IO_INLINE struct scb *ahc_lookup_scb(struct ahc_softc *ahc, u_int tag);
sys/dev/ic/aic7xxx_inline.h
263
struct scb *scb);
sys/dev/ic/aic7xxx_inline.h
264
IO_INLINE void ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb);
sys/dev/ic/aic7xxx_inline.h
267
struct scb *scb);
sys/dev/ic/aic7xxx_inline.h
270
struct scb *scb);
sys/dev/ic/aic7xxx_inline.h
279
ahc_update_residual(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_inline.h
283
sgptr = aic_le32toh(scb->hscb->sgptr);
sys/dev/ic/aic7xxx_inline.h
285
ahc_calc_residual(ahc, scb);
sys/dev/ic/aic7xxx_inline.h
339
IO_INLINE struct scb *
sys/dev/ic/aic7xxx_inline.h
342
struct scb* scb;
sys/dev/ic/aic7xxx_inline.h
344
scb = ahc->scb_data->scbindex[tag];
sys/dev/ic/aic7xxx_inline.h
345
if (scb != NULL)
sys/dev/ic/aic7xxx_inline.h
346
ahc_sync_scb(ahc, scb,
sys/dev/ic/aic7xxx_inline.h
348
return (scb);
sys/dev/ic/aic7xxx_inline.h
353
ahc_swap_with_next_hscb(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_inline.h
372
memcpy(q_hscb, scb->hscb, sizeof(*scb->hscb));
sys/dev/ic/aic7xxx_inline.h
373
if ((scb->flags & SCB_CDB32_PTR) != 0) {
sys/dev/ic/aic7xxx_inline.h
379
q_hscb->next = scb->hscb->tag;
sys/dev/ic/aic7xxx_inline.h
382
ahc->next_queued_scb->hscb = scb->hscb;
sys/dev/ic/aic7xxx_inline.h
383
scb->hscb = q_hscb;
sys/dev/ic/aic7xxx_inline.h
386
ahc->scb_data->scbindex[scb->hscb->tag] = scb;
sys/dev/ic/aic7xxx_inline.h
393
ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_inline.h
395
ahc_swap_with_next_hscb(ahc, scb);
sys/dev/ic/aic7xxx_inline.h
397
if (scb->hscb->tag == SCB_LIST_NULL
sys/dev/ic/aic7xxx_inline.h
398
|| scb->hscb->next == SCB_LIST_NULL)
sys/dev/ic/aic7xxx_inline.h
400
scb->hscb->tag, scb->hscb->next);
sys/dev/ic/aic7xxx_inline.h
405
scb->hscb->lun &= LID;
sys/dev/ic/aic7xxx_inline.h
406
if (ahc_get_transfer_length(scb) & 0x1)
sys/dev/ic/aic7xxx_inline.h
407
scb->hscb->lun |= SCB_XFERLEN_ODD;
sys/dev/ic/aic7xxx_inline.h
412
ahc->qinfifo[ahc->qinfifonext] = scb->hscb->tag;
sys/dev/ic/aic7xxx_inline.h
422
ahc_sync_scb(ahc, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
sys/dev/ic/aic7xxx_inline.h
438
ahc_get_sense_buf(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_inline.h
442
offset = scb - ahc->scb_data->scbarray;
sys/dev/ic/aic7xxx_inline.h
447
ahc_get_sense_bufaddr(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_inline.h
451
offset = scb - ahc->scb_data->scbarray;
sys/dev/ic/aic7xxx_openbsd.c
146
ahc_done(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_openbsd.c
148
struct scsi_xfer *xs = scb->xs;
sys/dev/ic/aic7xxx_openbsd.c
154
LIST_REMOVE(scb, pending_links);
sys/dev/ic/aic7xxx_openbsd.c
155
if ((scb->flags & SCB_UNTAGGEDQ) != 0) {
sys/dev/ic/aic7xxx_openbsd.c
159
target_offset = SCB_GET_TARGET_OFFSET(ahc, scb);
sys/dev/ic/aic7xxx_openbsd.c
161
TAILQ_REMOVE(untagged_q, scb, links.tqe);
sys/dev/ic/aic7xxx_openbsd.c
162
scb->flags &= ~SCB_UNTAGGEDQ;
sys/dev/ic/aic7xxx_openbsd.c
175
bus_dmamap_sync(ahc->parent_dmat, scb->dmamap, 0,
sys/dev/ic/aic7xxx_openbsd.c
176
scb->dmamap->dm_mapsize, op);
sys/dev/ic/aic7xxx_openbsd.c
177
bus_dmamap_unload(ahc->parent_dmat, scb->dmamap);
sys/dev/ic/aic7xxx_openbsd.c
192
if ((scb->flags & SCB_SENSE) == 0) {
sys/dev/ic/aic7xxx_openbsd.c
225
} else if ((scb->flags & SCB_SENSE) != 0) {
sys/dev/ic/aic7xxx_openbsd.c
237
memcpy(&xs->sense, ahc_get_sense_buf(ahc, scb),
sys/dev/ic/aic7xxx_openbsd.c
238
aic_le32toh(scb->sg_list->len) & AHC_SG_LEN_MASK);
sys/dev/ic/aic7xxx_openbsd.c
249
struct scb *scb;
sys/dev/ic/aic7xxx_openbsd.c
265
scb = xs->io;
sys/dev/ic/aic7xxx_openbsd.c
268
scb->flags = SCB_FLAG_NONE;
sys/dev/ic/aic7xxx_openbsd.c
270
hscb = scb->hscb;
sys/dev/ic/aic7xxx_openbsd.c
275
printf("%s: start scb(%p)\n", ahc_name(ahc), scb);
sys/dev/ic/aic7xxx_openbsd.c
277
scb->xs = xs;
sys/dev/ic/aic7xxx_openbsd.c
278
timeout_set(&xs->stimeout, ahc_timeout, scb);
sys/dev/ic/aic7xxx_openbsd.c
288
scb->flags |= SCB_DEVICE_RESET;
sys/dev/ic/aic7xxx_openbsd.c
290
ahc_execute_scb(scb, NULL, 0);
sys/dev/ic/aic7xxx_openbsd.c
294
ahc_setup_data(ahc, xs, scb);
sys/dev/ic/aic7xxx_openbsd.c
300
struct scb *scb;
sys/dev/ic/aic7xxx_openbsd.c
309
scb = (struct scb *)arg;
sys/dev/ic/aic7xxx_openbsd.c
310
xs = scb->xs;
sys/dev/ic/aic7xxx_openbsd.c
323
sg = scb->sg_list;
sys/dev/ic/aic7xxx_openbsd.c
341
scb->hscb->sgptr = aic_htole32(scb->sg_list_phys|SG_FULL_RESID);
sys/dev/ic/aic7xxx_openbsd.c
348
bus_dmamap_sync(ahc->parent_dmat, scb->dmamap, 0,
sys/dev/ic/aic7xxx_openbsd.c
349
scb->dmamap->dm_mapsize, op);
sys/dev/ic/aic7xxx_openbsd.c
354
bus_dmamap_sync(ahc->parent_dmat, scb->sg_map->sg_dmamap,
sys/dev/ic/aic7xxx_openbsd.c
355
0, scb->sg_map->sg_dmamap->dm_mapsize,
sys/dev/ic/aic7xxx_openbsd.c
359
scb->hscb->dataptr = scb->sg_list->addr;
sys/dev/ic/aic7xxx_openbsd.c
360
scb->hscb->datacnt = scb->sg_list->len;
sys/dev/ic/aic7xxx_openbsd.c
362
scb->hscb->sgptr = aic_htole32(SG_LIST_NULL);
sys/dev/ic/aic7xxx_openbsd.c
363
scb->hscb->dataptr = 0;
sys/dev/ic/aic7xxx_openbsd.c
364
scb->hscb->datacnt = 0;
sys/dev/ic/aic7xxx_openbsd.c
367
scb->sg_count = nsegments;
sys/dev/ic/aic7xxx_openbsd.c
371
tinfo = ahc_fetch_transinfo(ahc, SCSIID_CHANNEL(ahc, scb->hscb->scsiid),
sys/dev/ic/aic7xxx_openbsd.c
372
SCSIID_OUR_ID(scb->hscb->scsiid),
sys/dev/ic/aic7xxx_openbsd.c
373
SCSIID_TARGET(ahc, scb->hscb->scsiid),
sys/dev/ic/aic7xxx_openbsd.c
376
mask = SCB_GET_TARGET_MASK(ahc, scb);
sys/dev/ic/aic7xxx_openbsd.c
377
scb->hscb->scsirate = tinfo->scsirate;
sys/dev/ic/aic7xxx_openbsd.c
378
scb->hscb->scsioffset = tinfo->curr.offset;
sys/dev/ic/aic7xxx_openbsd.c
381
scb->hscb->control |= ULTRAENB;
sys/dev/ic/aic7xxx_openbsd.c
384
scb->hscb->control |= DISCENB;
sys/dev/ic/aic7xxx_openbsd.c
387
scb->flags |= SCB_AUTO_NEGOTIATE;
sys/dev/ic/aic7xxx_openbsd.c
388
scb->hscb->control |= MK_MESSAGE;
sys/dev/ic/aic7xxx_openbsd.c
392
scb->hscb->control |= TAG_ENB;
sys/dev/ic/aic7xxx_openbsd.c
398
LIST_INSERT_HEAD(&ahc->pending_scbs, scb, pending_links);
sys/dev/ic/aic7xxx_openbsd.c
413
if ((scb->hscb->control & (TARGET_SCB|TAG_ENB)) == 0
sys/dev/ic/aic7xxx_openbsd.c
418
target_offset = SCB_GET_TARGET_OFFSET(ahc, scb);
sys/dev/ic/aic7xxx_openbsd.c
420
TAILQ_INSERT_TAIL(untagged_q, scb, links.tqe);
sys/dev/ic/aic7xxx_openbsd.c
421
scb->flags |= SCB_UNTAGGEDQ;
sys/dev/ic/aic7xxx_openbsd.c
422
if (TAILQ_FIRST(untagged_q) != scb) {
sys/dev/ic/aic7xxx_openbsd.c
431
scb->flags |= SCB_ACTIVE;
sys/dev/ic/aic7xxx_openbsd.c
433
if ((scb->flags & SCB_TARGET_IMMEDIATE) != 0) {
sys/dev/ic/aic7xxx_openbsd.c
435
ahc->scb_data->scbindex[scb->hscb->tag] = scb;
sys/dev/ic/aic7xxx_openbsd.c
438
ahc_outb(ahc, SCBPTR, scb->hscb->tag);
sys/dev/ic/aic7xxx_openbsd.c
439
ahc_outb(ahc, TARG_IMMEDIATE_SCB, scb->hscb->tag);
sys/dev/ic/aic7xxx_openbsd.c
442
ahc_queue_scb(ahc, scb);
sys/dev/ic/aic7xxx_openbsd.c
449
ahc_adapter_req_set_xfer_mode(ahc, scb);
sys/dev/ic/aic7xxx_openbsd.c
450
ahc_scb_devinfo(ahc, &devinfo, scb);
sys/dev/ic/aic7xxx_openbsd.c
472
ahc_timeout(scb);
sys/dev/ic/aic7xxx_openbsd.c
500
struct scb *scb)
sys/dev/ic/aic7xxx_openbsd.c
504
hscb = scb->hscb;
sys/dev/ic/aic7xxx_openbsd.c
517
scb->flags |= SCB_CDB32_PTR;
sys/dev/ic/aic7xxx_openbsd.c
527
scb->dmamap, xs->data,
sys/dev/ic/aic7xxx_openbsd.c
54
void ahc_setup_data(struct ahc_softc *, struct scsi_xfer *, struct scb *);
sys/dev/ic/aic7xxx_openbsd.c
541
ahc_execute_scb(scb, scb->dmamap->dm_segs,
sys/dev/ic/aic7xxx_openbsd.c
542
scb->dmamap->dm_nsegs);
sys/dev/ic/aic7xxx_openbsd.c
544
ahc_execute_scb(scb, NULL, 0);
sys/dev/ic/aic7xxx_openbsd.c
551
struct scb *scb, *list_scb;
sys/dev/ic/aic7xxx_openbsd.c
557
scb = arg;
sys/dev/ic/aic7xxx_openbsd.c
558
ahc = scb->xs->sc_link->bus->sb_adapter_softc;
sys/dev/ic/aic7xxx_openbsd.c
56
void ahc_adapter_req_set_xfer_mode(struct ahc_softc *, struct scb *);
sys/dev/ic/aic7xxx_openbsd.c
563
printf("%s: SCB %d timed out\n", ahc_name(ahc), scb->hscb->tag);
sys/dev/ic/aic7xxx_openbsd.c
569
if (scb->flags & SCB_ACTIVE) {
sys/dev/ic/aic7xxx_openbsd.c
570
channel = SCB_GET_CHANNEL(ahc, scb);
sys/dev/ic/aic7xxx_openbsd.c
571
ahc_set_transaction_status(scb, CAM_CMD_TIMEOUT);
sys/dev/ic/aic7xxx_openbsd.c
629
ahc_adapter_req_set_xfer_mode(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_openbsd.c
641
ahc_scb_devinfo(ahc, &devinfo, scb);
sys/dev/ic/aic7xxx_openbsd.c
642
quirks = scb->xs->sc_link->quirks;
sys/dev/ic/aic7xxx_openbsd.c
709
struct scb *scb;
sys/dev/ic/aic7xxx_openbsd.c
712
scb = SLIST_FIRST(&ahc->scb_data->free_scbs);
sys/dev/ic/aic7xxx_openbsd.c
714
if (scb != NULL)
sys/dev/ic/aic7xxx_openbsd.c
719
return (scb);
sys/dev/ic/aic7xxx_openbsd.c
729
struct scb *scb = io;
sys/dev/ic/aic7xxx_openbsd.c
732
hscb = scb->hscb;
sys/dev/ic/aic7xxx_openbsd.c
735
scb->flags = SCB_FLAG_NONE;
sys/dev/ic/aic7xxx_openbsd.c
739
SLIST_INSERT_HEAD(&ahc->scb_data->free_scbs, scb, links.sle);
sys/dev/ic/aic7xxx_openbsd.c
743
ahc_platform_scb_free(ahc, scb);
sys/dev/ic/aic7xxx_openbsd.h
161
ahc_scb_timer_reset(struct scb *scb, u_int usec)
sys/dev/ic/aic7xxx_openbsd.h
163
if (!(scb->xs->xs_control & XS_CTL_POLL)) {
sys/dev/ic/aic7xxx_openbsd.h
164
callout_reset(&scb->xs->xs_callout,
sys/dev/ic/aic7xxx_openbsd.h
165
(usec * hz)/1000000, ahc_timeout, scb);
sys/dev/ic/aic7xxx_openbsd.h
197
static __inline void ahc_set_transaction_status(struct scb *, uint32_t);
sys/dev/ic/aic7xxx_openbsd.h
198
static __inline void ahc_set_scsi_status(struct scb *, uint32_t);
sys/dev/ic/aic7xxx_openbsd.h
199
static __inline uint32_t ahc_get_transaction_status(struct scb *);
sys/dev/ic/aic7xxx_openbsd.h
200
static __inline uint32_t ahc_get_scsi_status(struct scb *);
sys/dev/ic/aic7xxx_openbsd.h
201
static __inline void ahc_set_transaction_tag(struct scb *, int, u_int);
sys/dev/ic/aic7xxx_openbsd.h
202
static __inline u_long ahc_get_transfer_length(struct scb *);
sys/dev/ic/aic7xxx_openbsd.h
203
static __inline int ahc_get_transfer_dir(struct scb *);
sys/dev/ic/aic7xxx_openbsd.h
204
static __inline void ahc_set_residual(struct scb *, u_long);
sys/dev/ic/aic7xxx_openbsd.h
205
static __inline void ahc_set_sense_residual(struct scb *, u_long);
sys/dev/ic/aic7xxx_openbsd.h
206
static __inline u_long ahc_get_residual(struct scb *);
sys/dev/ic/aic7xxx_openbsd.h
207
static __inline int ahc_perform_autosense(struct scb *);
sys/dev/ic/aic7xxx_openbsd.h
209
struct scb *);
sys/dev/ic/aic7xxx_openbsd.h
210
static __inline void ahc_freeze_scb(struct scb *);
sys/dev/ic/aic7xxx_openbsd.h
213
ahc_set_transaction_status(struct scb *scb, uint32_t status)
sys/dev/ic/aic7xxx_openbsd.h
215
scb->xs->error = status;
sys/dev/ic/aic7xxx_openbsd.h
219
ahc_set_scsi_status(struct scb *scb, uint32_t status)
sys/dev/ic/aic7xxx_openbsd.h
221
scb->xs->status = status;
sys/dev/ic/aic7xxx_openbsd.h
225
ahc_get_transaction_status(struct scb *scb)
sys/dev/ic/aic7xxx_openbsd.h
227
if (scb->xs->flags & ITSDONE)
sys/dev/ic/aic7xxx_openbsd.h
230
return scb->xs->error;
sys/dev/ic/aic7xxx_openbsd.h
234
ahc_get_scsi_status(struct scb *scb)
sys/dev/ic/aic7xxx_openbsd.h
236
return (scb->xs->status);
sys/dev/ic/aic7xxx_openbsd.h
240
ahc_set_transaction_tag(struct scb *scb, int enabled, u_int type)
sys/dev/ic/aic7xxx_openbsd.h
245
ahc_get_transfer_length(struct scb *scb)
sys/dev/ic/aic7xxx_openbsd.h
247
return (scb->xs->datalen);
sys/dev/ic/aic7xxx_openbsd.h
251
ahc_get_transfer_dir(struct scb *scb)
sys/dev/ic/aic7xxx_openbsd.h
253
return (scb->xs->flags & (SCSI_DATA_IN | SCSI_DATA_OUT));
sys/dev/ic/aic7xxx_openbsd.h
257
ahc_set_residual(struct scb *scb, u_long resid)
sys/dev/ic/aic7xxx_openbsd.h
259
scb->xs->resid = resid;
sys/dev/ic/aic7xxx_openbsd.h
263
ahc_set_sense_residual(struct scb *scb, u_long resid)
sys/dev/ic/aic7xxx_openbsd.h
265
scb->xs->resid = resid;
sys/dev/ic/aic7xxx_openbsd.h
269
ahc_get_residual(struct scb *scb)
sys/dev/ic/aic7xxx_openbsd.h
271
return (scb->xs->resid);
sys/dev/ic/aic7xxx_openbsd.h
275
ahc_perform_autosense(struct scb *scb)
sys/dev/ic/aic7xxx_openbsd.h
282
ahc_get_sense_bufsize(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_openbsd.h
288
ahc_freeze_scb(struct scb *scb)
sys/dev/ic/aic7xxx_openbsd.h
293
ahc_platform_scb_free(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_openbsd.h
303
timeout_del(&scb->xs->stimeout);
sys/dev/ic/aic7xxx_openbsd.h
361
static __inline void ahc_print_path(struct ahc_softc *, struct scb *);
sys/dev/ic/aic7xxx_openbsd.h
365
ahc_print_path(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_openbsd.h
367
sc_print_addr(scb->xs->sc_link);
sys/dev/ic/aic7xxx_openbsd.h
388
void ahc_done(struct ahc_softc *, struct scb *);
sys/dev/ic/aic7xxxvar.h
100
#define SCB_GET_TARGET_OFFSET(ahc, scb) \
sys/dev/ic/aic7xxxvar.h
101
(SCB_GET_TARGET(ahc, scb))
sys/dev/ic/aic7xxxvar.h
102
#define SCB_GET_TARGET_MASK(ahc, scb) \
sys/dev/ic/aic7xxxvar.h
103
(0x01 << (SCB_GET_TARGET_OFFSET(ahc, scb)))
sys/dev/ic/aic7xxxvar.h
105
#define SCB_IS_SILENT(scb) \
sys/dev/ic/aic7xxxvar.h
107
&& (((scb)->flags & SCB_SILENT) != 0))
sys/dev/ic/aic7xxxvar.h
109
#define SCB_IS_SILENT(scb) \
sys/dev/ic/aic7xxxvar.h
110
(((scb)->flags & SCB_SILENT) != 0)
sys/dev/ic/aic7xxxvar.h
1186
struct scb *scb);
sys/dev/ic/aic7xxxvar.h
1187
int ahc_match_scb(struct ahc_softc *ahc, struct scb *scb,
sys/dev/ic/aic7xxxvar.h
1233
void ahc_freeze_devq(struct ahc_softc *, struct scb *);
sys/dev/ic/aic7xxxvar.h
1238
void ahc_calc_residual(struct ahc_softc *, struct scb *);
sys/dev/ic/aic7xxxvar.h
1278
struct ahc_devinfo *, struct scb *);
sys/dev/ic/aic7xxxvar.h
1320
void ahc_print_scb(struct scb *scb);
sys/dev/ic/aic7xxxvar.h
588
SLIST_ENTRY(scb) sle;
sys/dev/ic/aic7xxxvar.h
589
TAILQ_ENTRY(scb) tqe;
sys/dev/ic/aic7xxxvar.h
591
LIST_ENTRY(scb) pending_links;
sys/dev/ic/aic7xxxvar.h
604
SLIST_HEAD(, scb) free_scbs; /*
sys/dev/ic/aic7xxxvar.h
608
struct scb *scbindex[256]; /*
sys/dev/ic/aic7xxxvar.h
618
struct scb *scbarray; /* Array of kernel SCBs */
sys/dev/ic/aic7xxxvar.h
898
TAILQ_HEAD(scb_tailq, scb);
sys/dev/ic/aic7xxxvar.h
90
#define SCB_IS_SCSIBUS_B(ahc, scb) \
sys/dev/ic/aic7xxxvar.h
91
(SCSIID_CHANNEL(ahc, (scb)->hscb->scsiid) == 'B')
sys/dev/ic/aic7xxxvar.h
92
#define SCB_GET_OUR_ID(scb) \
sys/dev/ic/aic7xxxvar.h
93
SCSIID_OUR_ID((scb)->hscb->scsiid)
sys/dev/ic/aic7xxxvar.h
94
#define SCB_GET_TARGET(ahc, scb) \
sys/dev/ic/aic7xxxvar.h
948
struct scb *next_queued_scb;
sys/dev/ic/aic7xxxvar.h
95
SCSIID_TARGET((ahc), (scb)->hscb->scsiid)
sys/dev/ic/aic7xxxvar.h
953
LIST_HEAD(, scb) pending_scbs;
sys/dev/ic/aic7xxxvar.h
96
#define SCB_GET_CHANNEL(ahc, scb) \
sys/dev/ic/aic7xxxvar.h
97
SCSIID_CHANNEL(ahc, (scb)->hscb->scsiid)
sys/dev/ic/aic7xxxvar.h
98
#define SCB_GET_LUN(scb) \
sys/dev/ic/aic7xxxvar.h
99
((scb)->hscb->lun & LID)
sys/dev/ic/i82596.c
1142
off = IE_SCB_STATUS(sc->scb);
sys/dev/ic/i82596.c
1156
off = IE_SCB_CMDLST(sc->scb);
sys/dev/ic/i82596.c
1368
sc->ie_bus_write16(sc, IE_SCB_CMDLST(sc->scb), cmdbuf);
sys/dev/ic/i82596.c
1765
sc->ie_bus_write16(sc, IE_SCB_RCVLST(sc->scb),
sys/dev/ic/i82596.c
1777
sc->ie_bus_write16(sc, IE_SCB_CMDLST(sc->scb),
sys/dev/ic/i82596.c
215
sc->scb = 32;
sys/dev/ic/i82596.c
218
(sc->ie_bus_write16)(sc, IE_ISCP_SCB(sc->iscp), sc->scb);
sys/dev/ic/i82596.c
276
(sc->ie_bus_write16)(sc, IE_ISCP_SCB(sc->iscp), sc->scb);
sys/dev/ic/i82596.c
348
off = IE_SCB_CMD(sc->scb);
sys/dev/ic/i82596.c
365
sc->ie_bus_read16(sc, IE_SCB_STATUS(sc->scb)),
sys/dev/ic/i82596.c
402
off = IE_SCB_CMD(sc->scb);
sys/dev/ic/i82596.c
454
int scb = sc->scb;
sys/dev/ic/i82596.c
457
sc->ie_bus_read16(sc, IE_SCB_ERRCRC(scb)) +
sys/dev/ic/i82596.c
458
sc->ie_bus_read16(sc, IE_SCB_ERRALN(scb)) +
sys/dev/ic/i82596.c
459
sc->ie_bus_read16(sc, IE_SCB_ERRRES(scb)) +
sys/dev/ic/i82596.c
460
sc->ie_bus_read16(sc, IE_SCB_ERROVR(scb));
sys/dev/ic/i82596.c
463
sc->ie_bus_write16(sc, IE_SCB_ERRCRC(scb), 0);
sys/dev/ic/i82596.c
464
sc->ie_bus_write16(sc, IE_SCB_ERRALN(scb), 0);
sys/dev/ic/i82596.c
465
sc->ie_bus_write16(sc, IE_SCB_ERRRES(scb), 0);
sys/dev/ic/i82596.c
466
sc->ie_bus_write16(sc, IE_SCB_ERROVR(scb), 0);
sys/dev/ic/i82596.c
486
off = IE_SCB_STATUS(sc->scb);
sys/dev/ic/i82596var.h
227
int scb; /* Offset to SCB (set by front-end) */
sys/dev/ic/i82596var.h
292
int off = IE_SCB_STATUS(sc->scb);
sys/dev/isa/if_ie.c
1109
sc->scb->ie_command_list = MK_16(MEM, sc->xmit_cmds[sc->xctail]);
sys/dev/isa/if_ie.c
1387
volatile struct ie_sys_ctl_block *scb;
sys/dev/isa/if_ie.c
1407
scb = (volatile struct ie_sys_ctl_block *)where;
sys/dev/isa/if_ie.c
1408
bzero((char *)scb, sizeof *scb);
sys/dev/isa/if_ie.c
1415
iscp->ie_scb_offset = MK_16(realbase, scb) + 256;
sys/dev/isa/if_ie.c
1437
iscp->ie_scb_offset = MK_16(realbase, scb);
sys/dev/isa/if_ie.c
1453
sc->scb = scb;
sys/dev/isa/if_ie.c
1656
volatile struct ie_sys_ctl_block *scb = sc->scb;
sys/dev/isa/if_ie.c
1659
scb->ie_command = (u_short)cmd;
sys/dev/isa/if_ie.c
1685
while (scb->ie_command)
sys/dev/isa/if_ie.c
1704
sc->scb->ie_command_list = MK_16(MEM, cmd);
sys/dev/isa/if_ie.c
1785
sc->scb->ie_recv_list = MK_16(MEM, sc->rframes[0]);
sys/dev/isa/if_ie.c
1825
sc->scb->ie_command_list = MK_16(MEM, cmd);
sys/dev/isa/if_ie.c
1846
volatile struct ie_sys_ctl_block *scb = sc->scb;
sys/dev/isa/if_ie.c
1849
ptr = (void *)ALIGN(scb + 1);
sys/dev/isa/if_ie.c
1857
scb->ie_command_list = MK_16(MEM, cmd);
sys/dev/isa/if_ie.c
1879
scb->ie_command_list = MK_16(MEM, cmd);
sys/dev/isa/if_ie.c
1913
sc->scb->ie_recv_list = MK_16(MEM, sc->rframes[0]);
sys/dev/isa/if_ie.c
225
volatile struct ie_sys_ctl_block *scb;
sys/dev/isa/if_ie.c
346
volatile struct ie_sys_ctl_block *scb = sc->scb;
sys/dev/isa/if_ie.c
348
scb->ie_command = scb->ie_status & mask;
sys/dev/isa/if_ie.c
351
while (scb->ie_command)
sys/dev/isa/if_ie.c
808
status = sc->scb->ie_status & IE_ST_WHENCE;
sys/dev/isa/if_ie.c
855
status = sc->scb->ie_status & IE_ST_WHENCE;
sys/dev/isa/if_ie.c
872
volatile struct ie_sys_ctl_block *scb = sc->scb;
sys/dev/isa/if_ie.c
883
scb->ie_err_crc + scb->ie_err_align +
sys/dev/isa/if_ie.c
884
scb->ie_err_resource + scb->ie_err_overrun;
sys/dev/isa/if_ie.c
885
scb->ie_err_crc = scb->ie_err_align =
sys/dev/isa/if_ie.c
886
scb->ie_err_resource = scb->ie_err_overrun =
sys/dev/isa/if_ie.c
893
(scb->ie_status & IE_RU_READY) == 0) {
sys/dev/isa/if_ie.c
896
scb->ie_recv_list = MK_16(MEM, sc->rframes[0]);
sys/dev/isa/wds.c
1000
scb->cmd.opcode = WDSX_SCSICMD;
sys/dev/isa/wds.c
1001
ltophys(0, scb->cmd.data);
sys/dev/isa/wds.c
1002
ltophys(0, scb->cmd.len);
sys/dev/isa/wds.c
1005
scb->cmd.stat = 0x00;
sys/dev/isa/wds.c
1006
scb->cmd.venderr = 0x00;
sys/dev/isa/wds.c
1007
ltophys(0, scb->cmd.link);
sys/dev/isa/wds.c
1013
scb->flags |= SCB_POLLED;
sys/dev/isa/wds.c
1020
wds_queue_scb(sc, scb);
sys/dev/isa/wds.c
1027
if (wds_poll(sc, xs, scb->timeout)) {
sys/dev/isa/wds.c
1028
wds_timeout(scb);
sys/dev/isa/wds.c
1029
if (wds_poll(sc, xs, scb->timeout))
sys/dev/isa/wds.c
1030
wds_timeout(scb);
sys/dev/isa/wds.c
1042
wds_sense(struct wds_softc *sc, struct wds_scb *scb)
sys/dev/isa/wds.c
1044
struct scsi_xfer *xs = scb->xs;
sys/dev/isa/wds.c
1045
struct scsi_sense *ss = (void *)&scb->sense.scb;
sys/dev/isa/wds.c
1052
scb->flags |= SCB_SENSE;
sys/dev/isa/wds.c
1057
bcopy(scb->buf->data, xs->data, xs->datalen);
sys/dev/isa/wds.c
1067
scb->sense.targ = scb->cmd.targ;
sys/dev/isa/wds.c
1068
scb->sense.write = 0x80;
sys/dev/isa/wds.c
1069
scb->sense.opcode = WDSX_SCSICMD;
sys/dev/isa/wds.c
1070
ltophys(KVTOPHYS(&scb->sense_data), scb->sense.data);
sys/dev/isa/wds.c
1071
ltophys(sizeof(struct scsi_sense_data), scb->sense.len);
sys/dev/isa/wds.c
1074
wds_queue_scb(sc, scb);
sys/dev/isa/wds.c
1119
wds_ipoll(struct wds_softc *sc, struct wds_scb *scb, int count)
sys/dev/isa/wds.c
1136
if (scb->flags & SCB_DONE)
sys/dev/isa/wds.c
1147
struct wds_scb *scb = arg;
sys/dev/isa/wds.c
1154
xs = scb->xs;
sys/dev/isa/wds.c
1166
if (scb->flags & SCB_SENDING)
sys/dev/isa/wds.c
1175
if (scb->flags & SCB_ABORT) {
sys/dev/isa/wds.c
1182
scb->xs->error = XS_TIMEOUT;
sys/dev/isa/wds.c
1183
scb->timeout = WDS_ABORT_TIMEOUT;
sys/dev/isa/wds.c
1184
scb->flags |= SCB_ABORT;
sys/dev/isa/wds.c
1185
wds_queue_scb(sc, scb);
sys/dev/isa/wds.c
305
struct wds_scb *scb;
sys/dev/isa/wds.c
328
scb = wds_scb_phys_kv(sc, phystol(wmbi->scb_addr));
sys/dev/isa/wds.c
329
if (!scb) {
sys/dev/isa/wds.c
337
u_int8_t *cp = (u_int8_t *)&scb->cmd.scb;
sys/dev/isa/wds.c
342
printf("scb addr = %p\n", scb);
sys/dev/isa/wds.c
346
timeout_del(&scb->xs->stimeout);
sys/dev/isa/wds.c
347
wds_done(sc, scb, wmbi->stat);
sys/dev/isa/wds.c
397
wds_reset_scb(struct wds_softc *sc, struct wds_scb *scb)
sys/dev/isa/wds.c
399
scb->flags = 0;
sys/dev/isa/wds.c
409
struct wds_scb *scb = xscb;
sys/dev/isa/wds.c
411
if (scb->buf) {
sys/dev/isa/wds.c
412
wds_free_buf(sc, scb->buf);
sys/dev/isa/wds.c
413
scb->buf = NULL;
sys/dev/isa/wds.c
416
wds_reset_scb(sc, scb);
sys/dev/isa/wds.c
418
TAILQ_INSERT_HEAD(&sc->sc_free_scb, scb, chain);
sys/dev/isa/wds.c
443
wds_init_scb(struct wds_softc *sc, struct wds_scb *scb)
sys/dev/isa/wds.c
447
bzero(scb, sizeof(struct wds_scb));
sys/dev/isa/wds.c
452
scb->hashkey = KVTOPHYS(scb);
sys/dev/isa/wds.c
453
hashnum = SCB_HASH(scb->hashkey);
sys/dev/isa/wds.c
454
scb->nexthash = sc->sc_scbhash[hashnum];
sys/dev/isa/wds.c
455
sc->sc_scbhash[hashnum] = scb;
sys/dev/isa/wds.c
456
wds_reset_scb(sc, scb);
sys/dev/isa/wds.c
466
struct wds_scb *scb;
sys/dev/isa/wds.c
469
scb = TAILQ_FIRST(&sc->sc_free_scb);
sys/dev/isa/wds.c
470
if (scb) {
sys/dev/isa/wds.c
471
TAILQ_REMOVE(&sc->sc_free_scb, scb, chain);
sys/dev/isa/wds.c
472
scb->flags |= SCB_ALLOC;
sys/dev/isa/wds.c
476
return (scb);
sys/dev/isa/wds.c
509
struct wds_scb *scb = sc->sc_scbhash[hashnum];
sys/dev/isa/wds.c
511
while (scb) {
sys/dev/isa/wds.c
512
if (scb->hashkey == scb_phys)
sys/dev/isa/wds.c
515
if (scb->hashkey == (scb_phys - sizeof(struct wds_cmd)))
sys/dev/isa/wds.c
517
scb = scb->nexthash;
sys/dev/isa/wds.c
519
return scb;
sys/dev/isa/wds.c
526
wds_queue_scb(struct wds_softc *sc, struct wds_scb *scb)
sys/dev/isa/wds.c
528
TAILQ_INSERT_TAIL(&sc->sc_waiting_scb, scb, chain);
sys/dev/isa/wds.c
540
struct wds_scb *scb;
sys/dev/isa/wds.c
550
scb = wds_scb_phys_kv(sc, phystol(wmbo->scb_addr));
sys/dev/isa/wds.c
551
scb->flags &= ~SCB_SENDING;
sys/dev/isa/wds.c
568
struct wds_scb *scb;
sys/dev/isa/wds.c
573
while ((scb = TAILQ_FIRST(&sc->sc_waiting_scb)) != NULL) {
sys/dev/isa/wds.c
583
TAILQ_REMOVE(&sc->sc_waiting_scb, scb, chain);
sys/dev/isa/wds.c
585
scb->flags |= SCB_SENDING;
sys/dev/isa/wds.c
587
timeout_set(&scb->xs->stimeout, wds_timeout, scb);
sys/dev/isa/wds.c
590
if (scb->flags & SCB_SENSE)
sys/dev/isa/wds.c
591
ltophys(KVTOPHYS(&scb->sense), wmbo->scb_addr);
sys/dev/isa/wds.c
593
ltophys(KVTOPHYS(&scb->cmd), wmbo->scb_addr);
sys/dev/isa/wds.c
601
if ((scb->flags & SCB_POLLED) == 0)
sys/dev/isa/wds.c
602
timeout_add_msec(&scb->xs->stimeout, scb->timeout);
sys/dev/isa/wds.c
615
wds_done(struct wds_softc *sc, struct wds_scb *scb, u_int8_t stat)
sys/dev/isa/wds.c
617
struct scsi_xfer *xs = scb->xs;
sys/dev/isa/wds.c
623
scb->flags |= SCB_DONE;
sys/dev/isa/wds.c
629
bcopy(&scb->sense_data, &xs->sense, sizeof (struct scsi_sense_data));
sys/dev/isa/wds.c
641
switch (scb->cmd.venderr) {
sys/dev/isa/wds.c
648
if (scb->cmd.stat == SCSI_CHECK) {
sys/dev/isa/wds.c
650
wds_sense (sc, scb);
sys/dev/isa/wds.c
652
} else if (scb->cmd.stat == SCSI_BUSY) {
sys/dev/isa/wds.c
663
printf("%s: VENDOR ERROR %02x, scsi %02x\n", sc->sc_dev.dv_xname, scb->cmd.venderr, scb->cmd.stat);
sys/dev/isa/wds.c
692
bcopy(scb->buf->data, xs->data, xs->datalen);
sys/dev/isa/wds.c
821
struct wds_scb *scb;
sys/dev/isa/wds.c
825
scb = scsi_io_get(&sc->sc_iopool, SCSI_NOSLEEP);
sys/dev/isa/wds.c
826
if (scb == NULL) {
sys/dev/isa/wds.c
831
scb->xs = NULL;
sys/dev/isa/wds.c
832
scb->timeout = 40;
sys/dev/isa/wds.c
834
bzero(&scb->cmd, sizeof scb->cmd);
sys/dev/isa/wds.c
835
scb->cmd.write = 0x80;
sys/dev/isa/wds.c
836
scb->cmd.opcode = WDSX_GETFIRMREV;
sys/dev/isa/wds.c
840
scb->flags |= SCB_POLLED;
sys/dev/isa/wds.c
843
wds_queue_scb(sc, scb);
sys/dev/isa/wds.c
846
if (wds_ipoll(sc, scb, scb->timeout))
sys/dev/isa/wds.c
850
printf(": version %x.%02x ", scb->cmd.targ, scb->cmd.scb.opcode);
sys/dev/isa/wds.c
851
sc->sc_revision = (scb->cmd.targ << 8) | scb->cmd.scb.opcode;
sys/dev/isa/wds.c
853
j = 2 + &(scb->cmd.targ);
sys/dev/isa/wds.c
861
scsi_io_put(&sc->sc_iopool, scb);
sys/dev/isa/wds.c
874
struct wds_scb *scb;
sys/dev/isa/wds.c
890
scb = xs->io;
sys/dev/isa/wds.c
891
scb->xs = xs;
sys/dev/isa/wds.c
892
scb->timeout = xs->timeout;
sys/dev/isa/wds.c
895
bzero(&scb->cmd, sizeof scb->cmd);
sys/dev/isa/wds.c
896
bcopy(&xs->cmd, &scb->cmd.scb, xs->cmdlen < 12 ? xs->cmdlen : 12);
sys/dev/isa/wds.c
899
scb->cmd.targ = (xs->sc_link->target << 5) | xs->sc_link->lun;
sys/dev/isa/wds.c
904
scb->cmd.write = (xs->flags & SCSI_DATA_IN) ? 0x80 : 0x00;
sys/dev/isa/wds.c
907
sg = scb->scat_gath;
sys/dev/isa/wds.c
982
scb->cmd.opcode = WDSX_SCSISG;
sys/dev/isa/wds.c
983
ltophys(KVTOPHYS(scb->scat_gath), scb->cmd.data);
sys/dev/isa/wds.c
984
ltophys(seg * sizeof(struct wds_scat_gath), scb->cmd.len);
sys/dev/isa/wds.c
993
bcopy(xs->data, scb->buf->data, xs->datalen);
sys/dev/isa/wds.c
995
bzero(scb->buf->data, xs->datalen);
sys/dev/isa/wds.c
996
scb->cmd.opcode = WDSX_SCSICMD;
sys/dev/isa/wds.c
997
ltophys(KVTOPHYS(scb->buf->data), scb->cmd.data);
sys/dev/isa/wds.c
998
ltophys(xs->datalen, scb->cmd.len);
sys/dev/isa/wdsreg.h
57
struct scsi_generic scb;
sys/dev/microcode/aic7xxx/aicasm_gram.y
241
| scb
sys/dev/microcode/aic7xxx/aicasm_gram.y
242
| program scb
sys/dev/microcode/aic7xxx/aicasm_gram.y
814
scb:
usr.bin/cdio/mmc.c
307
struct scsi_blank *scb;
usr.bin/cdio/mmc.c
312
scb = (struct scsi_blank *)scr.cmd;
usr.bin/cdio/mmc.c
313
scb->opcode = BLANK;
usr.bin/cdio/mmc.c
314
scb->byte2 |= BLANK_MINIMAL;
usr.bin/cdio/mmc.c
315
scr.cmdlen = sizeof(*scb);
usr.bin/cdio/mmc.c
328
struct scsi_test_unit_ready *scb;
usr.bin/cdio/mmc.c
333
scb = (struct scsi_test_unit_ready *)scr.cmd;
usr.bin/cdio/mmc.c
334
scb->opcode = TEST_UNIT_READY;
usr.bin/cdio/mmc.c
335
scr.cmdlen = sizeof(*scb);
usr.bin/cdio/mmc.c
348
struct scsi_synchronize_cache *scb;
usr.bin/cdio/mmc.c
353
scb = (struct scsi_synchronize_cache *)scr.cmd;
usr.bin/cdio/mmc.c
354
scb->opcode = SYNCHRONIZE_CACHE;
usr.bin/cdio/mmc.c
355
scr.cmdlen = sizeof(*scb);
usr.bin/cdio/mmc.c
368
struct scsi_close_track *scb;
usr.bin/cdio/mmc.c
373
scb = (struct scsi_close_track *)scr.cmd;
usr.bin/cdio/mmc.c
374
scb->opcode = CLOSE_TRACK;
usr.bin/cdio/mmc.c
375
scb->closefunc = CT_CLOSE_SESS;
usr.bin/cdio/mmc.c
376
scr.cmdlen = sizeof(*scb);
usr.bin/cdio/mmc.c
525
struct scsi_mode_sense_big *scb;
usr.bin/cdio/mmc.c
530
scb = (struct scsi_mode_sense_big *)scr.cmd;
usr.bin/cdio/mmc.c
531
scb->opcode = MODE_SENSE_BIG;
usr.bin/cdio/mmc.c
533
scb->page = WRITE_PARAM_PAGE;
usr.bin/cdio/mmc.c
534
scb->length[1] = 0x46; /* 16 for the header + size from pg. 89 mmc-r10a.pdf */
usr.bin/cdio/mmc.c
535
scr.cmdlen = sizeof(*scb);
usr.bin/cdio/mmc.c
549
struct scsi_mode_select_big *scb;
usr.bin/cdio/mmc.c
554
scb = (struct scsi_mode_select_big *)scr.cmd;
usr.bin/cdio/mmc.c
555
scb->opcode = MODE_SELECT_BIG;
usr.bin/cdio/mmc.c
562
scb->byte2 = 0x10;
usr.bin/cdio/mmc.c
563
scb->length[1] = 2 + buf[1] + 256 * buf[0];
usr.bin/cdio/mmc.c
566
scr.cmdlen = sizeof(*scb);
usr.bin/cdio/mmc.c
579
struct scsi_read_track_info *scb;
usr.bin/cdio/mmc.c
584
scb = (struct scsi_read_track_info *)scr.cmd;
usr.bin/cdio/mmc.c
587
scb->opcode = READ_TRACK_INFO;
usr.bin/cdio/mmc.c
588
scb->addrtype = RTI_TRACK;
usr.bin/cdio/mmc.c
589
scb->addr[3] = 1;
usr.bin/cdio/mmc.c
590
scb->data_len[1] = 0x1c;
usr.bin/cdio/mmc.c
591
scr.cmdlen = sizeof(*scb);