Lines Matching refs:slot

511 	struct NCR_700_command_slot *slot = hostdata->free_list;  in find_empty_slot()  local
513 if(slot == NULL) { in find_empty_slot()
520 if(slot->state != NCR_700_SLOT_FREE) in find_empty_slot()
525 hostdata->free_list = slot->ITL_forw; in find_empty_slot()
526 slot->ITL_forw = NULL; in find_empty_slot()
533 slot->state = NCR_700_SLOT_BUSY; in find_empty_slot()
534 slot->flags = 0; in find_empty_slot()
537 return slot; in find_empty_slot()
541 free_slot(struct NCR_700_command_slot *slot, in free_slot() argument
544 if((slot->state & NCR_700_SLOT_MASK) != NCR_700_SLOT_MAGIC) { in free_slot()
545 printk(KERN_ERR "53c700: SLOT %p is not MAGIC!!!\n", slot); in free_slot()
547 if(slot->state == NCR_700_SLOT_FREE) { in free_slot()
548 printk(KERN_ERR "53c700: SLOT %p is FREE!!!\n", slot); in free_slot()
551 slot->resume_offset = 0; in free_slot()
552 slot->cmnd = NULL; in free_slot()
553 slot->state = NCR_700_SLOT_FREE; in free_slot()
554 slot->ITL_forw = hostdata->free_list; in free_slot()
555 hostdata->free_list = slot; in free_slot()
568 struct NCR_700_command_slot *slot = in save_for_reselection() local
571 slot->resume_offset = dsp; in save_for_reselection()
579 struct NCR_700_command_slot *slot) in NCR_700_unmap() argument
594 struct NCR_700_command_slot *slot = in NCR_700_scsi_done() local
597 dma_unmap_single(hostdata->dev, slot->pCmd, in NCR_700_scsi_done()
599 if (slot->flags == NCR_700_FLAG_AUTOSENSE) { in NCR_700_scsi_done()
602 dma_unmap_single(hostdata->dev, slot->dma_handle, in NCR_700_scsi_done()
611 NCR_700_unmap(hostdata, SCp, slot); in NCR_700_scsi_done()
613 free_slot(slot, hostdata); in NCR_700_scsi_done()
975 struct NCR_700_command_slot *slot = in process_script_interrupt() local
977 if(slot->flags == NCR_700_FLAG_AUTOSENSE) { in process_script_interrupt()
998 NCR_700_unmap(hostdata, SCp, slot); in process_script_interrupt()
999 dma_unmap_single(hostdata->dev, slot->pCmd, in process_script_interrupt()
1020 slot->pCmd = dma_map_single(hostdata->dev, cmnd, MAX_COMMAND_SIZE, DMA_TO_DEVICE); in process_script_interrupt()
1021slot->dma_handle = dma_map_single(hostdata->dev, SCp->sense_buffer, SCSI_SENSE_BUFFERSIZE, DMA_FRO… in process_script_interrupt()
1022 slot->SG[0].ins = bS_to_host(SCRIPT_MOVE_DATA_IN | SCSI_SENSE_BUFFERSIZE); in process_script_interrupt()
1023 slot->SG[0].pAddr = bS_to_host(slot->dma_handle); in process_script_interrupt()
1024 slot->SG[1].ins = bS_to_host(SCRIPT_RETURN); in process_script_interrupt()
1025 slot->SG[1].pAddr = 0; in process_script_interrupt()
1026 slot->resume_offset = hostdata->pScript; in process_script_interrupt()
1027 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG[0])*2, DMA_TO_DEVICE); in process_script_interrupt()
1031 slot->state = NCR_700_SLOT_QUEUED; in process_script_interrupt()
1032 slot->flags = NCR_700_FLAG_AUTOSENSE; in process_script_interrupt()
1093 struct NCR_700_command_slot *slot; in process_script_interrupt() local
1117 slot = (struct NCR_700_command_slot *)SCp->host_scribble; in process_script_interrupt()
1120 hostdata->msgin[2], slot, slot->tag); in process_script_interrupt()
1128 slot = (struct NCR_700_command_slot *)SCp->host_scribble; in process_script_interrupt()
1131 if(slot == NULL) { in process_script_interrupt()
1140 resume_offset = slot->resume_offset; in process_script_interrupt()
1141 hostdata->cmd = slot->cmnd; in process_script_interrupt()
1145 CommandAddress, slot->pCmd); in process_script_interrupt()
1147 CommandCount, slot->cmnd->cmd_len); in process_script_interrupt()
1150 to32bit(&slot->pSG[0].ins)); in process_script_interrupt()
1165 dma_cache_sync(hostdata->dev, slot->cmnd->cmnd, in process_script_interrupt()
1166 slot->cmnd->cmd_len, DMA_TO_DEVICE); in process_script_interrupt()
1181 struct NCR_700_command_slot *slot; in process_script_interrupt() local
1206 slot = (struct NCR_700_command_slot *)SCp->host_scribble; in process_script_interrupt()
1208 slot->state = NCR_700_SLOT_QUEUED; in process_script_interrupt()
1309 struct NCR_700_command_slot *slot = in process_selection() local
1311 …saving cmd %p, slot %p, addr %x [%04x], resume %x!\n", id, hostdata->cmd, slot, dsp, dsp - hostdat… in process_selection()
1336 slot->state = NCR_700_SLOT_QUEUED; in process_selection()
1390 struct NCR_700_command_slot *slot = in NCR_700_start_command() local
1401 slot->state = NCR_700_SLOT_QUEUED; in NCR_700_start_command()
1404 SCp->device->host->host_no, slot->cmnd, slot)); in NCR_700_start_command()
1409 slot->state = NCR_700_SLOT_BUSY; in NCR_700_start_command()
1414 slot->flags != NCR_700_FLAG_AUTOSENSE), in NCR_700_start_command()
1420 slot->flags == NCR_700_FLAG_AUTOSENSE) { in NCR_700_start_command()
1429 && (slot->tag != SCSI_NO_TAG && SCp->cmnd[0] != REQUEST_SENSE && in NCR_700_start_command()
1430 slot->flags != NCR_700_FLAG_AUTOSENSE)) { in NCR_700_start_command()
1449 slot->pCmd); in NCR_700_start_command()
1455 SGScriptStartAddress, to32bit(&slot->pSG[0].ins)); in NCR_700_start_command()
1458 if(slot->resume_offset == 0) in NCR_700_start_command()
1459 slot->resume_offset = hostdata->pScript; in NCR_700_start_command()
1470 NCR_700_writel(slot->temp, SCp->device->host, TEMP_REG); in NCR_700_start_command()
1471 NCR_700_writel(slot->resume_offset, SCp->device->host, DSP_REG); in NCR_700_start_command()
1549 struct NCR_700_command_slot *slot = in NCR_700_intr() local
1552 if(slot->state == NCR_700_SLOT_FREE) in NCR_700_intr()
1555 SCp = slot->cmnd; in NCR_700_intr()
1557 slot, SCp); in NCR_700_intr()
1558 free_slot(slot, hostdata); in NCR_700_intr()
1584 struct NCR_700_command_slot *slot = (SCp == NULL) ? NULL : in NCR_700_intr() local
1596 } else if(dsp >= to32bit(&slot->pSG[0].ins) && in NCR_700_intr()
1597 dsp <= to32bit(&slot->pSG[NCR_700_SG_SEGMENTS].ins)) { in NCR_700_intr()
1599 int SGcount = (dsp - to32bit(&slot->pSG[0].ins))/sizeof(struct NCR_700_SG_List); in NCR_700_intr()
1623 count = (bS_to_cpu(slot->SG[SGcount].ins) & 0x00ffffff); in NCR_700_intr()
1625 slot->SG[SGcount].ins &= bS_to_host(0xff000000); in NCR_700_intr()
1626 slot->SG[SGcount].ins |= bS_to_host(data_transfer); in NCR_700_intr()
1627 pAddr = bS_to_cpu(slot->SG[SGcount].pAddr); in NCR_700_intr()
1634 slot->SG[SGcount].pAddr = bS_to_host(pAddr); in NCR_700_intr()
1638 slot->SG[i].ins = bS_to_host(SCRIPT_NOP); in NCR_700_intr()
1639 slot->SG[i].pAddr = 0; in NCR_700_intr()
1641 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); in NCR_700_intr()
1755 struct NCR_700_command_slot *slot; in NCR_700_queuecommand_lck() local
1786 slot = find_empty_slot(hostdata); in NCR_700_queuecommand_lck()
1788 slot->cmnd = SCp; in NCR_700_queuecommand_lck()
1791 SCp->host_scribble = (unsigned char *)slot; in NCR_700_queuecommand_lck()
1821 slot->tag = SCp->request->tag; in NCR_700_queuecommand_lck()
1823 slot->tag, slot); in NCR_700_queuecommand_lck()
1825 slot->tag = SCSI_NO_TAG; in NCR_700_queuecommand_lck()
1884 slot->SG[i].ins = bS_to_host(move_ins | count); in NCR_700_queuecommand_lck()
1886 i, count, slot->SG[i].ins, (unsigned long)vPtr)); in NCR_700_queuecommand_lck()
1887 slot->SG[i].pAddr = bS_to_host(vPtr); in NCR_700_queuecommand_lck()
1889 slot->SG[i].ins = bS_to_host(SCRIPT_RETURN); in NCR_700_queuecommand_lck()
1890 slot->SG[i].pAddr = 0; in NCR_700_queuecommand_lck()
1891 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); in NCR_700_queuecommand_lck()
1893 (&slot->pSG[i].ins), in NCR_700_queuecommand_lck()
1894 slot->SG[i].ins)); in NCR_700_queuecommand_lck()
1896 slot->resume_offset = 0; in NCR_700_queuecommand_lck()
1897 slot->pCmd = dma_map_single(hostdata->dev, SCp->cmnd, in NCR_700_queuecommand_lck()
1908 struct NCR_700_command_slot *slot; in DEF_SCSI_QCMD() local
1912 slot = (struct NCR_700_command_slot *)SCp->host_scribble; in DEF_SCSI_QCMD()
1914 if(slot == NULL) in DEF_SCSI_QCMD()