Lines Matching refs:slot

510 	struct NCR_700_command_slot *slot = hostdata->free_list;  in find_empty_slot()  local
512 if(slot == NULL) { in find_empty_slot()
519 if(slot->state != NCR_700_SLOT_FREE) in find_empty_slot()
524 hostdata->free_list = slot->ITL_forw; in find_empty_slot()
525 slot->ITL_forw = NULL; in find_empty_slot()
532 slot->state = NCR_700_SLOT_BUSY; in find_empty_slot()
533 slot->flags = 0; in find_empty_slot()
536 return slot; in find_empty_slot()
540 free_slot(struct NCR_700_command_slot *slot, in free_slot() argument
543 if((slot->state & NCR_700_SLOT_MASK) != NCR_700_SLOT_MAGIC) { in free_slot()
544 printk(KERN_ERR "53c700: SLOT %p is not MAGIC!!!\n", slot); in free_slot()
546 if(slot->state == NCR_700_SLOT_FREE) { in free_slot()
547 printk(KERN_ERR "53c700: SLOT %p is FREE!!!\n", slot); in free_slot()
550 slot->resume_offset = 0; in free_slot()
551 slot->cmnd = NULL; in free_slot()
552 slot->state = NCR_700_SLOT_FREE; in free_slot()
553 slot->ITL_forw = hostdata->free_list; in free_slot()
554 hostdata->free_list = slot; in free_slot()
567 struct NCR_700_command_slot *slot = in save_for_reselection() local
570 slot->resume_offset = dsp; in save_for_reselection()
578 struct NCR_700_command_slot *slot) in NCR_700_unmap() argument
593 struct NCR_700_command_slot *slot = in NCR_700_scsi_done() local
596 dma_unmap_single(hostdata->dev, slot->pCmd, in NCR_700_scsi_done()
598 if (slot->flags == NCR_700_FLAG_AUTOSENSE) { in NCR_700_scsi_done()
601 dma_unmap_single(hostdata->dev, slot->dma_handle, in NCR_700_scsi_done()
610 NCR_700_unmap(hostdata, SCp, slot); in NCR_700_scsi_done()
612 free_slot(slot, hostdata); in NCR_700_scsi_done()
974 struct NCR_700_command_slot *slot = in process_script_interrupt() local
976 if(slot->flags == NCR_700_FLAG_AUTOSENSE) { in process_script_interrupt()
997 NCR_700_unmap(hostdata, SCp, slot); in process_script_interrupt()
998 dma_unmap_single(hostdata->dev, slot->pCmd, in process_script_interrupt()
1019 slot->pCmd = dma_map_single(hostdata->dev, cmnd, MAX_COMMAND_SIZE, DMA_TO_DEVICE); in process_script_interrupt()
1020slot->dma_handle = dma_map_single(hostdata->dev, SCp->sense_buffer, SCSI_SENSE_BUFFERSIZE, DMA_FRO… in process_script_interrupt()
1021 slot->SG[0].ins = bS_to_host(SCRIPT_MOVE_DATA_IN | SCSI_SENSE_BUFFERSIZE); in process_script_interrupt()
1022 slot->SG[0].pAddr = bS_to_host(slot->dma_handle); in process_script_interrupt()
1023 slot->SG[1].ins = bS_to_host(SCRIPT_RETURN); in process_script_interrupt()
1024 slot->SG[1].pAddr = 0; in process_script_interrupt()
1025 slot->resume_offset = hostdata->pScript; in process_script_interrupt()
1026 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG[0])*2, DMA_TO_DEVICE); in process_script_interrupt()
1030 slot->state = NCR_700_SLOT_QUEUED; in process_script_interrupt()
1031 slot->flags = NCR_700_FLAG_AUTOSENSE; in process_script_interrupt()
1092 struct NCR_700_command_slot *slot; in process_script_interrupt() local
1118 slot = (struct NCR_700_command_slot *)SCp->host_scribble; in process_script_interrupt()
1121 hostdata->msgin[2], slot, slot->tag); in process_script_interrupt()
1131 slot = (struct NCR_700_command_slot *)SCp->host_scribble; in process_script_interrupt()
1134 if(slot == NULL) { in process_script_interrupt()
1143 resume_offset = slot->resume_offset; in process_script_interrupt()
1144 hostdata->cmd = slot->cmnd; in process_script_interrupt()
1148 CommandAddress, slot->pCmd); in process_script_interrupt()
1150 CommandCount, slot->cmnd->cmd_len); in process_script_interrupt()
1153 to32bit(&slot->pSG[0].ins)); in process_script_interrupt()
1168 dma_cache_sync(hostdata->dev, slot->cmnd->cmnd, in process_script_interrupt()
1169 slot->cmnd->cmd_len, DMA_TO_DEVICE); in process_script_interrupt()
1184 struct NCR_700_command_slot *slot; in process_script_interrupt() local
1209 slot = (struct NCR_700_command_slot *)SCp->host_scribble; in process_script_interrupt()
1211 slot->state = NCR_700_SLOT_QUEUED; in process_script_interrupt()
1312 struct NCR_700_command_slot *slot = in process_selection() local
1314 …saving cmd %p, slot %p, addr %x [%04x], resume %x!\n", id, hostdata->cmd, slot, dsp, dsp - hostdat… in process_selection()
1339 slot->state = NCR_700_SLOT_QUEUED; in process_selection()
1393 struct NCR_700_command_slot *slot = in NCR_700_start_command() local
1404 slot->state = NCR_700_SLOT_QUEUED; in NCR_700_start_command()
1407 SCp->device->host->host_no, slot->cmnd, slot)); in NCR_700_start_command()
1412 slot->state = NCR_700_SLOT_BUSY; in NCR_700_start_command()
1417 slot->flags != NCR_700_FLAG_AUTOSENSE), in NCR_700_start_command()
1423 slot->flags == NCR_700_FLAG_AUTOSENSE) { in NCR_700_start_command()
1432 && (slot->tag != SCSI_NO_TAG && SCp->cmnd[0] != REQUEST_SENSE && in NCR_700_start_command()
1433 slot->flags != NCR_700_FLAG_AUTOSENSE)) { in NCR_700_start_command()
1452 slot->pCmd); in NCR_700_start_command()
1458 SGScriptStartAddress, to32bit(&slot->pSG[0].ins)); in NCR_700_start_command()
1461 if(slot->resume_offset == 0) in NCR_700_start_command()
1462 slot->resume_offset = hostdata->pScript; in NCR_700_start_command()
1473 NCR_700_writel(slot->temp, SCp->device->host, TEMP_REG); in NCR_700_start_command()
1474 NCR_700_writel(slot->resume_offset, SCp->device->host, DSP_REG); in NCR_700_start_command()
1552 struct NCR_700_command_slot *slot = in NCR_700_intr() local
1555 if(slot->state == NCR_700_SLOT_FREE) in NCR_700_intr()
1558 SCp = slot->cmnd; in NCR_700_intr()
1560 slot, SCp); in NCR_700_intr()
1561 free_slot(slot, hostdata); in NCR_700_intr()
1587 struct NCR_700_command_slot *slot = (SCp == NULL) ? NULL : in NCR_700_intr() local
1599 } else if(dsp >= to32bit(&slot->pSG[0].ins) && in NCR_700_intr()
1600 dsp <= to32bit(&slot->pSG[NCR_700_SG_SEGMENTS].ins)) { in NCR_700_intr()
1602 int SGcount = (dsp - to32bit(&slot->pSG[0].ins))/sizeof(struct NCR_700_SG_List); in NCR_700_intr()
1626 count = (bS_to_cpu(slot->SG[SGcount].ins) & 0x00ffffff); in NCR_700_intr()
1628 slot->SG[SGcount].ins &= bS_to_host(0xff000000); in NCR_700_intr()
1629 slot->SG[SGcount].ins |= bS_to_host(data_transfer); in NCR_700_intr()
1630 pAddr = bS_to_cpu(slot->SG[SGcount].pAddr); in NCR_700_intr()
1637 slot->SG[SGcount].pAddr = bS_to_host(pAddr); in NCR_700_intr()
1641 slot->SG[i].ins = bS_to_host(SCRIPT_NOP); in NCR_700_intr()
1642 slot->SG[i].pAddr = 0; in NCR_700_intr()
1644 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); in NCR_700_intr()
1758 struct NCR_700_command_slot *slot; in NCR_700_queuecommand_lck() local
1789 slot = find_empty_slot(hostdata); in NCR_700_queuecommand_lck()
1791 slot->cmnd = SCp; in NCR_700_queuecommand_lck()
1794 SCp->host_scribble = (unsigned char *)slot; in NCR_700_queuecommand_lck()
1824 slot->tag = SCp->request->tag; in NCR_700_queuecommand_lck()
1826 slot->tag, slot); in NCR_700_queuecommand_lck()
1828 slot->tag = SCSI_NO_TAG; in NCR_700_queuecommand_lck()
1887 slot->SG[i].ins = bS_to_host(move_ins | count); in NCR_700_queuecommand_lck()
1889 i, count, slot->SG[i].ins, (unsigned long)vPtr)); in NCR_700_queuecommand_lck()
1890 slot->SG[i].pAddr = bS_to_host(vPtr); in NCR_700_queuecommand_lck()
1892 slot->SG[i].ins = bS_to_host(SCRIPT_RETURN); in NCR_700_queuecommand_lck()
1893 slot->SG[i].pAddr = 0; in NCR_700_queuecommand_lck()
1894 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); in NCR_700_queuecommand_lck()
1896 (&slot->pSG[i].ins), in NCR_700_queuecommand_lck()
1897 slot->SG[i].ins)); in NCR_700_queuecommand_lck()
1899 slot->resume_offset = 0; in NCR_700_queuecommand_lck()
1900 slot->pCmd = dma_map_single(hostdata->dev, SCp->cmnd, in NCR_700_queuecommand_lck()
1911 struct NCR_700_command_slot *slot; in DEF_SCSI_QCMD() local
1915 slot = (struct NCR_700_command_slot *)SCp->host_scribble; in DEF_SCSI_QCMD()
1917 if(slot == NULL) in DEF_SCSI_QCMD()