Lines Matching defs:scb

73 			       struct ccb_scsiio *csio, struct scb *scb);
309 * We have an scb which has been processed by the
314 ahd_done(struct ahd_softc *ahd, struct scb *scb)
318 CAM_DEBUG(scb->io_ctx->ccb_h.path, CAM_DEBUG_TRACE,
319 ("ahd_done - scb %d\n", SCB_GET_TAG(scb)));
321 ccb = scb->io_ctx;
322 LIST_REMOVE(scb, pending_links);
323 if ((scb->flags & SCB_TIMEDOUT) != 0)
324 LIST_REMOVE(scb, timedout_links);
326 callout_stop(&scb->io_timer);
335 bus_dmamap_sync(ahd->buffer_dmat, scb->dmamap, op);
336 bus_dmamap_unload(ahd->buffer_dmat, scb->dmamap);
362 if (aic_get_transaction_status(scb) == CAM_REQ_INPROG)
365 ahd_free_scb(ahd, scb);
371 if ((scb->flags & SCB_RECOVERY_SCB) != 0) {
372 struct scb *list_scb;
376 if (aic_get_transaction_status(scb) == CAM_BDR_SENT
377 || aic_get_transaction_status(scb) == CAM_REQ_ABORTED)
378 aic_set_transaction_status(scb, CAM_CMD_TIMEOUT);
390 aic_get_timeout(scb));
393 ahd_print_path(ahd, scb);
400 if (aic_get_transaction_status(scb) == CAM_REQ_INPROG) {
402 } else if ((scb->flags & SCB_SENSE) != 0) {
415 ahd_get_sense_buf(ahd, scb),
419 scb->io_ctx->ccb_h.status |= CAM_AUTOSNS_VALID;
420 } else if ((scb->flags & SCB_PKT_SENSE) != 0) {
427 siu = (struct scsi_status_iu_header *)scb->sense_data;
432 ahd_get_sense_buf(ahd, scb) + SIU_SENSE_OFFSET(siu),
446 scb->io_ctx->ccb_h.status |= CAM_AUTOSNS_VALID;
449 ahd_free_scb(ahd, scb);
516 struct scb *scb;
531 * get an scb to use.
543 if ((scb = ahd_get_scb(ahd, col_idx)) == NULL) {
552 hscb = scb->hscb;
555 ("start scb(%p)\n", scb));
556 scb->io_ctx = ccb;
560 ccb->ccb_h.ccb_scb_ptr = scb;
563 * Put all the arguments for the xfer in the scb
570 scb->flags |= SCB_DEVICE_RESET;
573 ahd_execute_scb(scb, NULL, 0, 0);
581 scb->flags |= SCB_TARGET_IMMEDIATE;
600 ahd_setup_data(ahd, sim, &ccb->csio, scb);
946 struct scb *scb;
953 scb = (struct scb *)arg;
954 ccb = scb->io_ctx;
955 ahd = scb->ahd_softc;
959 aic_set_transaction_status(scb, CAM_REQ_TOO_BIG);
961 aic_set_transaction_status(scb, CAM_REQ_CMP_ERR);
963 bus_dmamap_unload(ahd->buffer_dmat, scb->dmamap);
964 ahd_free_scb(ahd, scb);
968 scb->sg_count = 0;
975 for (i = nsegments, sg = scb->sg_list; i > 0; i--) {
977 sg = ahd_sg_setup(ahd, scb, sg, dm_segs->ds_addr,
988 bus_dmamap_sync(ahd->buffer_dmat, scb->dmamap, op);
993 tdata = &scb->hscb->shared_data.tdata;
1006 if (aic_get_transaction_status(scb) != CAM_REQ_INPROG) {
1009 scb->dmamap);
1010 ahd_free_scb(ahd, scb);
1015 tinfo = ahd_fetch_transinfo(ahd, SCSIID_CHANNEL(ahd, scb->hscb->scsiid),
1016 SCSIID_OUR_ID(scb->hscb->scsiid),
1017 SCSIID_TARGET(ahd, scb->hscb->scsiid),
1020 mask = SCB_GET_TARGET_MASK(ahd, scb);
1024 scb->hscb->control |= DISCENB;
1027 scb->flags |= SCB_PACKETIZED;
1028 if (scb->hscb->task_management != 0)
1029 scb->hscb->control &= ~MK_MESSAGE;
1036 scb->flags |= SCB_NEGOTIATE;
1037 scb->hscb->control |= MK_MESSAGE;
1039 scb->flags |= SCB_AUTO_NEGOTIATE;
1040 scb->hscb->control |= MK_MESSAGE;
1043 LIST_INSERT_HEAD(&ahd->pending_scbs, scb, pending_links);
1047 aic_scb_timer_start(scb);
1049 if ((scb->flags & SCB_TARGET_IMMEDIATE) != 0) {
1051 ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = scb;
1053 ahd_set_scbptr(ahd, SCB_GET_TAG(scb));
1057 ahd_queue_scb(ahd, scb);
1070 struct ccb_scsiio *csio, struct scb *scb)
1076 hscb = scb->hscb;
1093 aic_set_transaction_status(scb,
1095 ahd_free_scb(ahd, scb);
1113 aic_set_transaction_status(scb,
1115 ahd_free_scb(ahd, scb);
1125 scb->dmamap,
1128 scb, /*flags*/0);
1135 scb->io_ctx->ccb_h.status |= CAM_RELEASE_SIMQ;