Lines Matching refs:hscb
436 scb->hscb->task_attribute = scb->hscb->control & SCB_TAG_TYPE; in ahd_setup_scb_common()
439 scb->hscb->task_attribute = SCB_XFERLEN_ODD; in ahd_setup_scb_common()
441 scb->hscb->task_attribute = 0; in ahd_setup_scb_common()
444 if (scb->hscb->cdb_len <= MAX_CDB_LEN_WITH_SENSE_ADDR in ahd_setup_scb_common()
445 || (scb->hscb->cdb_len & SCB_CDB_LEN_PTR) != 0) in ahd_setup_scb_common()
446 scb->hscb->shared_data.idata.cdb_plus_saddr.sense_addr = in ahd_setup_scb_common()
460 scb->hscb->dataptr = sg->addr; in ahd_setup_data_scb()
461 scb->hscb->datacnt = sg->len; in ahd_setup_data_scb()
467 dataptr_words = (uint32_t*)&scb->hscb->dataptr; in ahd_setup_data_scb()
474 scb->hscb->dataptr |= ahd_htole64(high_addr << 8); in ahd_setup_data_scb()
476 scb->hscb->datacnt = sg->len; in ahd_setup_data_scb()
484 scb->hscb->sgptr = ahd_htole32(scb->sg_list_busaddr|SG_FULL_RESID); in ahd_setup_data_scb()
490 scb->hscb->sgptr = ahd_htole32(SG_LIST_NULL); in ahd_setup_noxfer_scb()
491 scb->hscb->dataptr = 0; in ahd_setup_noxfer_scb()
492 scb->hscb->datacnt = 0; in ahd_setup_noxfer_scb()
523 /*offset*/(uint8_t*)scb->hscb - scb->hscb_map->vaddr, in ahd_sync_scb()
524 /*len*/sizeof(*scb->hscb), op); in ahd_sync_scb()
823 memcpy(q_hscb, scb->hscb, sizeof(*scb->hscb)); in ahd_swap_with_next_hscb()
825 q_hscb->next_hscb_busaddr = scb->hscb->hscb_busaddr; in ahd_swap_with_next_hscb()
828 ahd->next_queued_hscb = scb->hscb; in ahd_swap_with_next_hscb()
830 scb->hscb = q_hscb; in ahd_swap_with_next_hscb()
871 host_dataptr = ahd_le64toh(scb->hscb->dataptr); in ahd_queue_scb()
874 SCB_GET_TAG(scb), scb->hscb->scsiid, in ahd_queue_scb()
875 ahd_le32toh(scb->hscb->hscb_busaddr), in ahd_queue_scb()
878 ahd_le32toh(scb->hscb->datacnt)); in ahd_queue_scb()
1096 sgptr = ahd_le32toh(scb->hscb->sgptr); in ahd_update_residual()
1106 sgptr = ahd_le32toh(scb->hscb->sgptr); in ahd_complete_scb()
1338 hscb_ptr = (uint8_t *)scb->hscb; in ahd_flush_qoutfifo()
1816 ahd_outb(ahd, SAVED_SCSIID, scb->hscb->scsiid); in ahd_handle_seqint()
1817 ahd_outb(ahd, SAVED_LUN, scb->hscb->lun); in ahd_handle_seqint()
1947 scb->hscb->control &= ~(TAG_ENB|SCB_TAG_TYPE); in ahd_handle_seqint()
1948 scb->hscb->control |= MK_MESSAGE; in ahd_handle_seqint()
1949 ahd_outb(ahd, SCB_CONTROL, scb->hscb->control); in ahd_handle_seqint()
1951 ahd_outb(ahd, SAVED_SCSIID, scb->hscb->scsiid); in ahd_handle_seqint()
2269 scb->hscb->task_management); in ahd_handle_seqint()
2273 switch (scb->hscb->task_management) { in ahd_handle_seqint()
2279 lun = scb->hscb->lun; in ahd_handle_seqint()
2286 lun = scb->hscb->lun; in ahd_handle_seqint()
3088 saved_lun = scb->hscb->lun; in ahd_handle_nonpkt_busfree()
3259 if ((scb->hscb->control & TAG_ENB) != 0) in ahd_handle_nonpkt_busfree()
3567 struct hardware_scb *hscb;
3570 hscb = scb->hscb;
3573 hscb->control,
3574 hscb->scsiid,
3575 hscb->lun,
3576 hscb->cdb_len);
3578 for (i = 0; i < sizeof(hscb->shared_data.idata.cdb); i++)
3579 printk("%#02x", hscb->shared_data.idata.cdb[i]);
3581 (uint32_t)((ahd_le64toh(hscb->dataptr) >> 32) & 0xFFFFFFFF),
3582 (uint32_t)(ahd_le64toh(hscb->dataptr) & 0xFFFFFFFF),
3583 ahd_le32toh(hscb->datacnt),
3584 ahd_le32toh(hscb->sgptr),
4215 pending_scb->hscb->control &= ~MK_MESSAGE; in ahd_update_pending_scbs()
4255 control |= pending_scb->hscb->control & MK_MESSAGE; in ahd_update_pending_scbs()
4348 our_id = SCSIID_OUR_ID(scb->hscb->scsiid); in ahd_scb_devinfo()
4350 if ((scb->hscb->control & TARGET_SCB) != 0) in ahd_scb_devinfo()
4404 if ((scb->hscb->control & DISCENB) != 0) in ahd_setup_initiator_msgout()
4409 if ((scb->hscb->control & TAG_ENB) != 0) { in ahd_setup_initiator_msgout()
4411 scb->hscb->control & (TAG_ENB|SCB_TAG_TYPE); in ahd_setup_initiator_msgout()
4432 if ((scb->hscb->control & TAG_ENB) != 0) { in ahd_setup_initiator_msgout()
4440 (scb->hscb->control & TAG_ENB) != 0 ? " Tag" : ""); in ahd_setup_initiator_msgout()
4462 printk("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid, in ahd_setup_initiator_msgout()
4465 "SCB flags = %x", SCB_GET_TAG(scb), scb->hscb->control, in ahd_setup_initiator_msgout()
4476 scb->hscb->control &= ~MK_MESSAGE; in ahd_setup_initiator_msgout()
5580 } else if ((scb->hscb->control & SIMPLE_QUEUE_TAG) != 0) { in ahd_handle_msg_reject()
5584 tag_type = (scb->hscb->control & SIMPLE_QUEUE_TAG); in ahd_handle_msg_reject()
5608 scb->hscb->control &= mask; in ahd_handle_msg_reject()
5613 ahd_busy_tcl(ahd, BUILD_TCL(scb->hscb->scsiid, devinfo->lun), in ahd_handle_msg_reject()
6703 scb->hscb->control = 0; in ahd_free_scb()
6727 && (scb->col_scb->hscb->control & TAG_ENB) != 0) { in ahd_free_scb()
6755 struct hardware_scb *hscb; in ahd_alloc_scbs() local
6775 offset = (PAGE_SIZE / sizeof(*hscb)) - scb_data->scbs_left; in ahd_alloc_scbs()
6777 hscb = &((struct hardware_scb *)hscb_map->vaddr)[offset]; in ahd_alloc_scbs()
6778 hscb_busaddr = hscb_map->physaddr + (offset * sizeof(*hscb)); in ahd_alloc_scbs()
6799 hscb = (struct hardware_scb *)hscb_map->vaddr; in ahd_alloc_scbs()
6801 scb_data->scbs_left = PAGE_SIZE / sizeof(*hscb); in ahd_alloc_scbs()
6901 memset(hscb, 0, sizeof(*hscb)); in ahd_alloc_scbs()
6902 next_scb->hscb = hscb; in ahd_alloc_scbs()
6903 hscb->hscb_busaddr = ahd_htole32(hscb_busaddr); in ahd_alloc_scbs()
6917 next_scb->hscb->tag = ahd_htole16(scb_data->numscbs); in ahd_alloc_scbs()
6923 hscb++; in ahd_alloc_scbs()
6924 hscb_busaddr += sizeof(*hscb); in ahd_alloc_scbs()
8028 busaddr = ahd_le32toh(scb->hscb->hscb_busaddr); in ahd_qinfifo_requeue()
8031 prev_scb->hscb->next_hscb_busaddr = scb->hscb->hscb_busaddr; in ahd_qinfifo_requeue()
8037 scb->hscb->next_hscb_busaddr = ahd->next_queued_hscb->hscb_busaddr; in ahd_qinfifo_requeue()
8823 struct hardware_scb *hscb; in ahd_handle_scsi_status() local
8835 hscb = scb->hscb; in ahd_handle_scsi_status()
8865 ahd_set_scsi_status(scb, hscb->shared_data.istatus.scsi_status); in ahd_handle_scsi_status()
8866 switch (hscb->shared_data.istatus.scsi_status) { in ahd_handle_scsi_status()
8960 sc = (struct scsi_sense *)hscb->shared_data.idata.cdb; in ahd_handle_scsi_status()
8992 hscb->control = 0; in ahd_handle_scsi_status()
9008 hscb->control |= MK_MESSAGE; in ahd_handle_scsi_status()
9013 hscb->cdb_len = sizeof(*sc); in ahd_handle_scsi_status()
9032 if (scb->hscb->shared_data.istatus.scsi_status != 0) { in ahd_handle_scb_status()
9046 struct hardware_scb *hscb; in ahd_calc_residual() local
9068 hscb = scb->hscb; in ahd_calc_residual()
9069 sgptr = ahd_le32toh(hscb->sgptr); in ahd_calc_residual()
9085 spkt = &hscb->shared_data.istatus; in ahd_calc_residual()