Lines Matching defs:cmnd

678  *	@cmnd: SCB command block being returned
683 static void initio_release_scb(struct initio_host * host, struct scsi_ctrl_blk * cmnd)
688 printk("Release SCB %p; ", cmnd);
691 cmnd->srb = NULL;
692 cmnd->status = 0;
693 cmnd->next = NULL;
695 host->last_avail->next = cmnd;
696 host->last_avail = cmnd;
698 host->first_avail = cmnd;
699 host->last_avail = cmnd;
2525 * @cmnd: SCSI midlayer command block
2532 static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * cblk, struct scsi_cmnd * cmnd)
2542 cblk->srb = cmnd;
2545 cblk->target = cmnd->device->id;
2546 cblk->lun = cmnd->device->lun;
2547 cblk->ident = cmnd->device->lun | DISC_ALLOW;
2552 dma_addr = dma_map_single(&host->pci_dev->dev, cmnd->sense_buffer,
2556 cmnd->SCp.ptr = (char *)(unsigned long)dma_addr;
2557 cblk->cdblen = cmnd->cmd_len;
2563 memcpy(cblk->cdb, cmnd->cmnd, cmnd->cmd_len);
2566 if (cmnd->device->tagged_supported) { /* Tag Support */
2573 nseg = scsi_dma_map(cmnd);
2580 cmnd->SCp.dma_handle = dma_addr;
2587 scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) {
2594 cblk->buflen = (scsi_bufflen(cmnd) > total_len) ?
2595 total_len : scsi_bufflen(cmnd);
2616 struct scsi_ctrl_blk *cmnd;
2620 cmnd = initio_alloc_scb(host);
2621 if (!cmnd)
2624 initio_build_scb(host, cmnd, cmd);
2625 initio_exec_scb(host, cmnd);
2633 * @cmnd: Command block we want to trigger the reset for
2638 static int i91u_bus_reset(struct scsi_cmnd * cmnd)
2642 host = (struct initio_host *) cmnd->device->host->hostdata;
2644 spin_lock_irq(cmnd->device->host->host_lock);
2646 spin_unlock_irq(cmnd->device->host->host_lock);
2703 * @cmnd: The command itself
2709 static void i91u_unmap_scb(struct pci_dev *pci_dev, struct scsi_cmnd *cmnd)
2712 if (cmnd->SCp.ptr) {
2714 (dma_addr_t)((unsigned long)cmnd->SCp.ptr),
2716 cmnd->SCp.ptr = NULL;
2720 if (scsi_sg_count(cmnd)) {
2721 dma_unmap_single(&pci_dev->dev, cmnd->SCp.dma_handle,
2725 scsi_dma_unmap(cmnd);
2732 * @cmnd: Pointer to SCSI control block.
2740 struct scsi_cmnd *cmnd; /* Pointer to SCSI request block */
2746 if ((cmnd = cblk->srb) == NULL) {
2791 cmnd->result = cblk->tastat | (cblk->hastat << 16);
2792 i91u_unmap_scb(host->pci_dev, cmnd);
2793 cmnd->scsi_done(cmnd); /* Notify system DONE */