Lines Matching refs:hscb
556 (((scb)->hscb->target_channel_lun & TID) >> 4)
558 ((scb)->hscb->target_channel_lun & LID)
560 (((scb)->hscb->target_channel_lun & SELBUSB) != 0)
782 struct aic7xxx_hwscb *hscb; /* corresponding hardware scb */ member
1031 #define CTL_OF_SCB(scb) (((scb->hscb)->target_channel_lun >> 3) & 0x1), \
1032 (((scb->hscb)->target_channel_lun >> 4) & 0xf), \
1033 ((scb->hscb)->target_channel_lun & 0x07)
2382 int targ = (scb->hscb->target_channel_lun >> 4) & 0x0F; in aic7xxx_match_scb()
2383 int chan = (scb->hscb->target_channel_lun >> 3) & 0x01; in aic7xxx_match_scb()
2384 int slun = scb->hscb->target_channel_lun & 0x07; in aic7xxx_match_scb()
2393 match = ((tag == scb->hscb->tag) || (tag == SCB_LIST_NULL)); in aic7xxx_match_scb()
2460 p->untagged_scbs[scb->hscb->target_channel_lun] = scb->hscb->tag; in aic7xxx_busy_target()
2506 if (aic_inb(p, SCB_TAG) == scb->hscb->tag) in aic7xxx_find_scb()
2599 scbp->hscb = &p->scb_data->hscbs[p->scb_data->numscbs]; in aic7xxx_allocate_scb()
2605 memset(scbp->hscb, 0, sizeof(struct aic7xxx_hwscb)); in aic7xxx_allocate_scb()
2606 scbp->hscb->tag = p->scb_data->numscbs; in aic7xxx_allocate_scb()
2670 scb->hscb->control = 0; in aic7xxx_free_scb()
2671 scb->hscb->target_status = 0; in aic7xxx_free_scb()
2672 scb->hscb->target_channel_lun = SCB_LIST_NULL; in aic7xxx_free_scb()
2823 aic7xxx_index_busy_target(p, scb->hscb->target_channel_lun, in aic7xxx_done()
2899 p->host_no, CTL_OF_SCB(scb), scb->hscb->tag); in aic7xxx_run_done_queue()
2904 scb->hscb->residual_SG_segment_count = 0; in aic7xxx_run_done_queue()
2905 scb->hscb->residual_data_count[0] = 0; in aic7xxx_run_done_queue()
2906 scb->hscb->residual_data_count[1] = 0; in aic7xxx_run_done_queue()
2907 scb->hscb->residual_data_count[2] = 0; in aic7xxx_run_done_queue()
3020 aic7xxx_index_busy_target(p, scbp->hscb->target_channel_lun, in aic7xxx_search_qinfifo()
3026 p->qinfifo[p->qinfifonext++] = scbp->hscb->tag; in aic7xxx_search_qinfifo()
3036 if (aic7xxx_index_busy_target(p, scbp->hscb->target_channel_lun, in aic7xxx_search_qinfifo()
3037 FALSE) == scbp->hscb->tag) in aic7xxx_search_qinfifo()
3039 aic7xxx_index_busy_target(p, scbp->hscb->target_channel_lun, in aic7xxx_search_qinfifo()
3047 p->qinfifo[p->qinfifonext++] = scbp->hscb->tag; in aic7xxx_search_qinfifo()
3084 if(p->qoutfifo[(p->qoutfifonext + i) & 0xff ] == scb->hscb->tag) in aic7xxx_scb_on_qoutfifo()
3326 scbp->hscb->control = 0; in aic7xxx_reset_device()
3666 p->qinfifo[p->qinfifonext++] = scb->hscb->tag; in aic7xxx_run_waiting_queues()
3811 struct aic7xxx_hwscb *hscb; in aic7xxx_calculate_residual() local
3816 hscb = scb->hscb; in aic7xxx_calculate_residual()
3822 if (((scb->hscb->control & DISCONNECTED) == 0) && in aic7xxx_calculate_residual()
3832 for (i=1; i < hscb->residual_SG_segment_count; i++) in aic7xxx_calculate_residual()
3836 actual -= (hscb->residual_data_count[2] << 16) | in aic7xxx_calculate_residual()
3837 (hscb->residual_data_count[1] << 8) | in aic7xxx_calculate_residual()
3838 hscb->residual_data_count[0]; in aic7xxx_calculate_residual()
3847 hscb->residual_SG_segment_count); in aic7xxx_calculate_residual()
3849 hscb->target_status); in aic7xxx_calculate_residual()
3858 aic7xxx_status(cmd) = hscb->target_status; in aic7xxx_calculate_residual()
3866 hscb->residual_data_count[2] = 0; in aic7xxx_calculate_residual()
3867 hscb->residual_data_count[1] = 0; in aic7xxx_calculate_residual()
3868 hscb->residual_data_count[0] = 0; in aic7xxx_calculate_residual()
3869 hscb->residual_SG_segment_count = 0; in aic7xxx_calculate_residual()
4049 scb->hscb->control &= ~SCB_TAG_TYPE; in aic7xxx_handle_seqint()
4050 scb->hscb->control |= MSG_SIMPLE_Q_TAG; in aic7xxx_handle_seqint()
4051 aic_outb(p, scb->hscb->control, SCB_CONTROL); in aic7xxx_handle_seqint()
4083 scb->hscb->control &= ~(TAG_ENB | SCB_TAG_TYPE); in aic7xxx_handle_seqint()
4084 aic_outb(p, scb->hscb->control, SCB_CONTROL); in aic7xxx_handle_seqint()
4205 struct aic7xxx_hwscb *hscb; in aic7xxx_handle_seqint() local
4227 hscb = scb->hscb; in aic7xxx_handle_seqint()
4239 hscb->target_status = aic_inb(p, SCB_TARGET_STATUS); in aic7xxx_handle_seqint()
4240 aic7xxx_status(cmd) = hscb->target_status; in aic7xxx_handle_seqint()
4242 cmd->result = hscb->target_status; in aic7xxx_handle_seqint()
4244 switch (status_byte(hscb->target_status)) in aic7xxx_handle_seqint()
4278 hscb->control = 0; in aic7xxx_handle_seqint()
4279 hscb->target_status = 0; in aic7xxx_handle_seqint()
4280 hscb->SG_list_pointer = in aic7xxx_handle_seqint()
4282 hscb->SCSI_cmd_pointer = in aic7xxx_handle_seqint()
4284 hscb->data_count = scb->sg_list[0].length; in aic7xxx_handle_seqint()
4285 hscb->data_pointer = scb->sg_list[0].address; in aic7xxx_handle_seqint()
4286 hscb->SCSI_cmd_length = COMMAND_SIZE(scb->sense_cmd[0]); in aic7xxx_handle_seqint()
4287 hscb->residual_SG_segment_count = 0; in aic7xxx_handle_seqint()
4288 hscb->residual_data_count[0] = 0; in aic7xxx_handle_seqint()
4289 hscb->residual_data_count[1] = 0; in aic7xxx_handle_seqint()
4290 hscb->residual_data_count[2] = 0; in aic7xxx_handle_seqint()
4292 scb->sg_count = hscb->SG_segment_count = 1; in aic7xxx_handle_seqint()
4459 CTL_OF_SCB(scb), scb->hscb->target_status); in aic7xxx_handle_seqint()
4487 (scb->hscb->control & TAG_ENB) ) in aic7xxx_handle_seqint()
4490 p->msg_buf[p->msg_index++] = scb->hscb->tag; in aic7xxx_handle_seqint()
4624 (lastphase == P_DATAIN) ? "Data-In" : "Data-Out", scb->hscb->tag); in aic7xxx_handle_seqint()
4629 for (i = 0; i < scb->hscb->SCSI_cmd_length; i++) in aic7xxx_handle_seqint()
5719 CTL_OF_SCB(scb), scb->hscb->tag); in aic7xxx_handle_scsiint()
5721 (message == MSG_ABORT) ? SCB_LIST_NULL : scb->hscb->tag ); in aic7xxx_handle_scsiint()
5743 aic7xxx_reset_device(p, target, channel, ALL_LUNS, scb->hscb->tag); in aic7xxx_handle_scsiint()
5753 if ((scb->hscb->control & TAG_ENB) != 0) in aic7xxx_handle_scsiint()
5755 tag = scb->hscb->tag; in aic7xxx_handle_scsiint()
6281 (aic_inb(p, SCB_TAG) == scb->hscb->tag) ) in aic7xxx_handle_command_completion_intr()
6287 scb->cmd->device->lun, scb->hscb->tag); in aic7xxx_handle_command_completion_intr()
6315 if (scb->hscb->residual_SG_segment_count != 0) in aic7xxx_handle_command_completion_intr()
10118 struct aic7xxx_hwscb *hscb; in aic7xxx_buildscb() local
10125 hscb = scb->hscb; in aic7xxx_buildscb()
10131 hscb->control = 0; in aic7xxx_buildscb()
10136 hscb->control |= DISCENB; in aic7xxx_buildscb()
10140 hscb->control |= MSG_SIMPLE_Q_TAG; in aic7xxx_buildscb()
10150 hscb->control &= DISCENB; in aic7xxx_buildscb()
10151 hscb->control |= MK_MESSAGE; in aic7xxx_buildscb()
10166 hscb->target_channel_lun = ((cmd->device->id << 4) & 0xF0) | in aic7xxx_buildscb()
10180 hscb->SCSI_cmd_length = cmd->cmd_len; in aic7xxx_buildscb()
10182 hscb->SCSI_cmd_pointer = cpu_to_le32(SCB_DMA_ADDR(scb, scb->cmnd)); in aic7xxx_buildscb()
10215 hscb->data_pointer = scb->sg_list[0].address; in aic7xxx_buildscb()
10216 hscb->data_count = scb->sg_list[0].length; in aic7xxx_buildscb()
10218 hscb->SG_segment_count = i; in aic7xxx_buildscb()
10219 hscb->SG_list_pointer = cpu_to_le32(SCB_DMA_ADDR(scb, &scb->sg_list[1])); in aic7xxx_buildscb()
10223 hscb->SG_segment_count = 0; in aic7xxx_buildscb()
10224 hscb->SG_list_pointer = 0; in aic7xxx_buildscb()
10225 hscb->data_count = 0; in aic7xxx_buildscb()
10226 hscb->data_pointer = 0; in aic7xxx_buildscb()
10275 aic7xxx_position(cmd) = scb->hscb->tag; in aic7xxx_queue_lck()
10312 struct aic7xxx_hwscb *hscb; in DEF_SCSI_QCMD() local
10331 hscb = scb->hscb; in DEF_SCSI_QCMD()
10409 CTL_OF_CMD(cmd), scb->hscb->tag, scb->flags); in DEF_SCSI_QCMD()
10413 if (scb->hscb->tag == aic_inb(p, SCB_TAG)) in DEF_SCSI_QCMD()
10446 scb->hscb->control |= MK_MESSAGE; in DEF_SCSI_QCMD()
10453 if (aic7xxx_search_qinfifo(p, cmd->device->channel, cmd->device->id, cmd->device->lun, hscb->tag, in DEF_SCSI_QCMD()
10482 p->qinfifo[p->qinfifonext++] = scb->hscb->tag; in DEF_SCSI_QCMD()
10588 p->host_no, CTL_OF_SCB(scb), scb->hscb->tag, scb->flags, in __aic7xxx_abort()
10618 cmd->device->lun, scb->hscb->tag, SCB_ABORT | SCB_QUEUED_FOR_DONE, in __aic7xxx_abort()
10725 scb->hscb->control |= MK_MESSAGE; in __aic7xxx_abort()
10731 p->qinfifo[p->qinfifonext++] = scb->hscb->tag; in __aic7xxx_abort()