Lines Matching refs:cblk

2562 static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * cblk, struct scsi_cm…  in initio_build_scb()  argument
2571 cblk->post = i91uSCBPost; /* i91u's callback routine */ in initio_build_scb()
2572 cblk->srb = cmnd; in initio_build_scb()
2573 cblk->opcode = ExecSCSI; in initio_build_scb()
2574 cblk->flags = SCF_POST; /* After SCSI done, call post routine */ in initio_build_scb()
2575 cblk->target = cmnd->device->id; in initio_build_scb()
2576 cblk->lun = cmnd->device->lun; in initio_build_scb()
2577 cblk->ident = cmnd->device->lun | DISC_ALLOW; in initio_build_scb()
2579 cblk->flags |= SCF_SENSE; /* Turn on auto request sense */ in initio_build_scb()
2584 cblk->senseptr = (u32)dma_addr; in initio_build_scb()
2585 cblk->senselen = SENSE_SIZE; in initio_build_scb()
2587 cblk->cdblen = cmnd->cmd_len; in initio_build_scb()
2590 cblk->hastat = 0; in initio_build_scb()
2591 cblk->tastat = 0; in initio_build_scb()
2593 memcpy(cblk->cdb, cmnd->cmnd, cmnd->cmd_len); in initio_build_scb()
2597 cblk->tagmsg = SIMPLE_QUEUE_TAG; /* Do simple tag only */ in initio_build_scb()
2599 cblk->tagmsg = 0; /* No tag support */ in initio_build_scb()
2606 dma_addr = dma_map_single(&host->pci_dev->dev, &cblk->sglist[0], in initio_build_scb()
2609 cblk->bufptr = (u32)dma_addr; in initio_build_scb()
2612 cblk->sglen = nseg; in initio_build_scb()
2614 cblk->flags |= SCF_SG; /* Turn on SG list flag */ in initio_build_scb()
2616 sg = &cblk->sglist[0]; in initio_build_scb()
2617 scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) { in initio_build_scb()
2624 cblk->buflen = (scsi_bufflen(cmnd) > total_len) ? in initio_build_scb()
2627 cblk->buflen = 0; in initio_build_scb()
2628 cblk->sglen = 0; in initio_build_scb()
2772 struct scsi_ctrl_blk *cblk; in i91uSCBPost() local
2775 cblk = (struct scsi_ctrl_blk *) cblk_mem; in i91uSCBPost()
2776 if ((cmnd = cblk->srb) == NULL) { in i91uSCBPost()
2779 initio_release_scb(host, cblk); /* Release SCB for current channel */ in i91uSCBPost()
2786 switch (cblk->hastat) { in i91uSCBPost()
2790 cblk->hastat = 0; in i91uSCBPost()
2795 cblk->hastat = DID_TIME_OUT; in i91uSCBPost()
2802 cblk->hastat = DID_RESET; in i91uSCBPost()
2806 cblk->hastat = DID_ABORT; in i91uSCBPost()
2816 printk("ini9100u: %x %x\n", cblk->hastat, cblk->tastat); in i91uSCBPost()
2817 cblk->hastat = DID_ERROR; /* Couldn't find any better */ in i91uSCBPost()
2821 cmnd->result = cblk->tastat | (cblk->hastat << 16); in i91uSCBPost()
2824 initio_release_scb(host, cblk); /* Release SCB for current channel */ in i91uSCBPost()