Lines Matching refs:cblk
2550 * @cblk: Firmware command block
2558 static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * cblk, struct scsi_cmnd * cmnd)
2567 cblk->post = i91uSCBPost; /* i91u's callback routine */
2568 cblk->srb = cmnd;
2569 cblk->opcode = ExecSCSI;
2570 cblk->flags = SCF_POST; /* After SCSI done, call post routine */
2571 cblk->target = cmnd->device->id;
2572 cblk->lun = cmnd->device->lun;
2573 cblk->ident = cmnd->device->lun | DISC_ALLOW;
2575 cblk->flags |= SCF_SENSE; /* Turn on auto request sense */
2580 cblk->senseptr = (u32)dma_addr;
2581 cblk->senselen = SENSE_SIZE;
2583 cblk->cdblen = cmnd->cmd_len;
2586 cblk->hastat = 0;
2587 cblk->tastat = 0;
2589 memcpy(cblk->cdb, cmnd->cmnd, cmnd->cmd_len);
2593 cblk->tagmsg = SIMPLE_QUEUE_TAG; /* Do simple tag only */
2595 cblk->tagmsg = 0; /* No tag support */
2602 dma_addr = dma_map_single(&host->pci_dev->dev, &cblk->sglist[0],
2605 cblk->bufptr = (u32)dma_addr;
2608 cblk->sglen = nseg;
2610 cblk->flags |= SCF_SG; /* Turn on SG list flag */
2612 sg = &cblk->sglist[0];
2613 scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) {
2620 cblk->buflen = (scsi_bufflen(cmnd) > total_len) ?
2623 cblk->buflen = 0;
2624 cblk->sglen = 0;
2754 struct scsi_ctrl_blk *cblk;
2757 cblk = (struct scsi_ctrl_blk *) cblk_mem;
2758 if ((cmnd = cblk->srb) == NULL) {
2761 initio_release_scb(host, cblk); /* Release SCB for current channel */
2768 switch (cblk->hastat) {
2772 cblk->hastat = 0;
2777 cblk->hastat = DID_TIME_OUT;
2784 cblk->hastat = DID_RESET;
2788 cblk->hastat = DID_ABORT;
2798 printk("ini9100u: %x %x\n", cblk->hastat, cblk->tastat);
2799 cblk->hastat = DID_ERROR; /* Couldn't find any better */
2803 cmnd->result = cblk->tastat | (cblk->hastat << 16);
2806 initio_release_scb(host, cblk); /* Release SCB for current channel */