Lines Matching refs:cblk

2524  *	@cblk: Firmware command block
2532 static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * cblk, struct scsi_cmnd * cmnd)
2541 cblk->post = i91uSCBPost; /* i91u's callback routine */
2542 cblk->srb = cmnd;
2543 cblk->opcode = ExecSCSI;
2544 cblk->flags = SCF_POST; /* After SCSI done, call post routine */
2545 cblk->target = cmnd->device->id;
2546 cblk->lun = cmnd->device->lun;
2547 cblk->ident = cmnd->device->lun | DISC_ALLOW;
2549 cblk->flags |= SCF_SENSE; /* Turn on auto request sense */
2554 cblk->senseptr = (u32)dma_addr;
2555 cblk->senselen = SENSE_SIZE;
2557 cblk->cdblen = cmnd->cmd_len;
2560 cblk->hastat = 0;
2561 cblk->tastat = 0;
2563 memcpy(cblk->cdb, cmnd->cmnd, cmnd->cmd_len);
2567 cblk->tagmsg = SIMPLE_QUEUE_TAG; /* Do simple tag only */
2569 cblk->tagmsg = 0; /* No tag support */
2576 dma_addr = dma_map_single(&host->pci_dev->dev, &cblk->sglist[0],
2579 cblk->bufptr = (u32)dma_addr;
2582 cblk->sglen = nseg;
2584 cblk->flags |= SCF_SG; /* Turn on SG list flag */
2586 sg = &cblk->sglist[0];
2587 scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) {
2594 cblk->buflen = (scsi_bufflen(cmnd) > total_len) ?
2597 cblk->buflen = 0;
2598 cblk->sglen = 0;
2742 struct scsi_ctrl_blk *cblk;
2745 cblk = (struct scsi_ctrl_blk *) cblk_mem;
2746 if ((cmnd = cblk->srb) == NULL) {
2749 initio_release_scb(host, cblk); /* Release SCB for current channel */
2756 switch (cblk->hastat) {
2760 cblk->hastat = 0;
2765 cblk->hastat = DID_TIME_OUT;
2772 cblk->hastat = DID_RESET;
2776 cblk->hastat = DID_ABORT;
2786 printk("ini9100u: %x %x\n", cblk->hastat, cblk->tastat);
2787 cblk->hastat = DID_ERROR; /* Couldn't find any better */
2791 cmnd->result = cblk->tastat | (cblk->hastat << 16);
2794 initio_release_scb(host, cblk); /* Release SCB for current channel */