Lines Matching refs:cblk
2546 static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * cblk, struct scsi_cm… in initio_build_scb() argument
2555 cblk->post = i91uSCBPost; /* i91u's callback routine */ in initio_build_scb()
2556 cblk->srb = cmnd; in initio_build_scb()
2557 cblk->opcode = ExecSCSI; in initio_build_scb()
2558 cblk->flags = SCF_POST; /* After SCSI done, call post routine */ in initio_build_scb()
2559 cblk->target = cmnd->device->id; in initio_build_scb()
2560 cblk->lun = cmnd->device->lun; in initio_build_scb()
2561 cblk->ident = cmnd->device->lun | DISC_ALLOW; in initio_build_scb()
2563 cblk->flags |= SCF_SENSE; /* Turn on auto request sense */ in initio_build_scb()
2568 cblk->senseptr = (u32)dma_addr; in initio_build_scb()
2569 cblk->senselen = SENSE_SIZE; in initio_build_scb()
2571 cblk->cdblen = cmnd->cmd_len; in initio_build_scb()
2574 cblk->hastat = 0; in initio_build_scb()
2575 cblk->tastat = 0; in initio_build_scb()
2577 memcpy(cblk->cdb, cmnd->cmnd, cmnd->cmd_len); in initio_build_scb()
2581 cblk->tagmsg = SIMPLE_QUEUE_TAG; /* Do simple tag only */ in initio_build_scb()
2583 cblk->tagmsg = 0; /* No tag support */ in initio_build_scb()
2590 dma_addr = dma_map_single(&host->pci_dev->dev, &cblk->sglist[0], in initio_build_scb()
2593 cblk->bufptr = (u32)dma_addr; in initio_build_scb()
2596 cblk->sglen = nseg; in initio_build_scb()
2598 cblk->flags |= SCF_SG; /* Turn on SG list flag */ in initio_build_scb()
2600 sg = &cblk->sglist[0]; in initio_build_scb()
2601 scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) { in initio_build_scb()
2608 cblk->buflen = (scsi_bufflen(cmnd) > total_len) ? in initio_build_scb()
2611 cblk->buflen = 0; in initio_build_scb()
2612 cblk->sglen = 0; in initio_build_scb()
2756 struct scsi_ctrl_blk *cblk; in i91uSCBPost() local
2759 cblk = (struct scsi_ctrl_blk *) cblk_mem; in i91uSCBPost()
2760 if ((cmnd = cblk->srb) == NULL) { in i91uSCBPost()
2763 initio_release_scb(host, cblk); /* Release SCB for current channel */ in i91uSCBPost()
2770 switch (cblk->hastat) { in i91uSCBPost()
2774 cblk->hastat = 0; in i91uSCBPost()
2779 cblk->hastat = DID_TIME_OUT; in i91uSCBPost()
2786 cblk->hastat = DID_RESET; in i91uSCBPost()
2790 cblk->hastat = DID_ABORT; in i91uSCBPost()
2800 printk("ini9100u: %x %x\n", cblk->hastat, cblk->tastat); in i91uSCBPost()
2801 cblk->hastat = DID_ERROR; /* Couldn't find any better */ in i91uSCBPost()
2805 cmnd->result = cblk->tastat | (cblk->hastat << 16); in i91uSCBPost()
2808 initio_release_scb(host, cblk); /* Release SCB for current channel */ in i91uSCBPost()