Lines Matching refs:hostdata

245 NCR_700_offset_period_to_sxfer(struct NCR_700_Host_Parameters *hostdata,  in NCR_700_offset_period_to_sxfer()  argument
250 __u8 min_xferp = (hostdata->chip710 in NCR_700_offset_period_to_sxfer()
252 __u8 max_offset = (hostdata->chip710 in NCR_700_offset_period_to_sxfer()
258 if(period < hostdata->min_period) { in NCR_700_offset_period_to_sxfer()
260 period = hostdata->min_period; in NCR_700_offset_period_to_sxfer()
262 XFERP = (period*4 * hostdata->sync_clock)/1000 - 4; in NCR_700_offset_period_to_sxfer()
277 struct NCR_700_Host_Parameters *hostdata = in NCR_700_get_SXFER() local
278 (struct NCR_700_Host_Parameters *)SDp->host->hostdata[0]; in NCR_700_get_SXFER()
280 return NCR_700_offset_period_to_sxfer(hostdata, in NCR_700_get_SXFER()
287 struct NCR_700_Host_Parameters *hostdata, struct device *dev) in NCR_700_detect() argument
299 memory = dma_alloc_noncoherent(hostdata->dev, TOTAL_MEM_SIZE, in NCR_700_detect()
307 hostdata->msgin = memory + MSGIN_OFFSET; in NCR_700_detect()
308 hostdata->msgout = memory + MSGOUT_OFFSET; in NCR_700_detect()
309 hostdata->status = memory + STATUS_OFFSET; in NCR_700_detect()
310 hostdata->slots = (struct NCR_700_command_slot *)(memory + SLOTS_OFFSET); in NCR_700_detect()
311 hostdata->dev = dev; in NCR_700_detect()
338 memset(hostdata->slots, 0, sizeof(struct NCR_700_command_slot) in NCR_700_detect()
341 dma_addr_t offset = (dma_addr_t)((unsigned long)&hostdata->slots[j].SG[0] in NCR_700_detect()
342 - (unsigned long)&hostdata->slots[0].SG[0]); in NCR_700_detect()
343 hostdata->slots[j].pSG = (struct NCR_700_SG_List *)((unsigned long)(pSlots + offset)); in NCR_700_detect()
345 hostdata->free_list = &hostdata->slots[j]; in NCR_700_detect()
347 hostdata->slots[j-1].ITL_forw = &hostdata->slots[j]; in NCR_700_detect()
348 hostdata->slots[j].state = NCR_700_SLOT_FREE; in NCR_700_detect()
358 script_patch_32(hostdata->dev, script, MessageLocation, in NCR_700_detect()
360 script_patch_32(hostdata->dev, script, StatusAddress, in NCR_700_detect()
362 script_patch_32(hostdata->dev, script, ReceiveMsgAddress, in NCR_700_detect()
365 hostdata->script = script; in NCR_700_detect()
366 hostdata->pScript = pScript; in NCR_700_detect()
367 dma_sync_single_for_device(hostdata->dev, pScript, sizeof(SCRIPT), DMA_TO_DEVICE); in NCR_700_detect()
368 hostdata->state = NCR_700_HOST_FREE; in NCR_700_detect()
369 hostdata->cmd = NULL; in NCR_700_detect()
374 host->unique_id = (unsigned long)hostdata->base; in NCR_700_detect()
375 hostdata->eh_complete = NULL; in NCR_700_detect()
376 host->hostdata[0] = (unsigned long)hostdata; in NCR_700_detect()
379 if (hostdata->chip710) in NCR_700_detect()
380 hostdata->rev = (NCR_700_readb(host, CTEST8_REG)>>4) & 0x0f; in NCR_700_detect()
382 hostdata->rev = (NCR_700_readb(host, CTEST7_REG)>>4) & 0x0f; in NCR_700_detect()
383 hostdata->fast = (NCR_700_readb(host, CTEST9_REG) == 0); in NCR_700_detect()
389 hostdata->chip710 ? "53c710" : in NCR_700_detect()
390 (hostdata->fast ? "53c700-66" : "53c700"), in NCR_700_detect()
391 hostdata->rev, hostdata->differential ? in NCR_700_detect()
402 spi_signalling(host) = hostdata->differential ? SPI_SIGNAL_HVD : in NCR_700_detect()
411 struct NCR_700_Host_Parameters *hostdata = in NCR_700_release() local
412 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_release()
414 dma_free_noncoherent(hostdata->dev, TOTAL_MEM_SIZE, in NCR_700_release()
415 hostdata->script, hostdata->pScript); in NCR_700_release()
439 struct NCR_700_Host_Parameters *hostdata = in NCR_700_data_residual() local
440 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_data_residual()
444 if(hostdata->chip710) { in NCR_700_data_residual()
452 if(hostdata->fast) in NCR_700_data_residual()
509 find_empty_slot(struct NCR_700_Host_Parameters *hostdata) in find_empty_slot() argument
511 struct NCR_700_command_slot *slot = hostdata->free_list; in find_empty_slot()
515 if(hostdata->command_slot_count != NCR_700_COMMAND_SLOTS_PER_HOST) in find_empty_slot()
516 …printk(KERN_ERR "SLOTS FULL, but count is %d, should be %d\n", hostdata->command_slot_count, NCR_7… in find_empty_slot()
525 hostdata->free_list = slot->ITL_forw; in find_empty_slot()
535 hostdata->command_slot_count++; in find_empty_slot()
542 struct NCR_700_Host_Parameters *hostdata) in free_slot() argument
554 slot->ITL_forw = hostdata->free_list; in free_slot()
555 hostdata->free_list = slot; in free_slot()
556 hostdata->command_slot_count--; in free_slot()
563 save_for_reselection(struct NCR_700_Host_Parameters *hostdata, in save_for_reselection() argument
573 hostdata->state = NCR_700_HOST_FREE; in save_for_reselection()
574 hostdata->cmd = NULL; in save_for_reselection()
578 NCR_700_unmap(struct NCR_700_Host_Parameters *hostdata, struct scsi_cmnd *SCp, in NCR_700_unmap() argument
587 NCR_700_scsi_done(struct NCR_700_Host_Parameters *hostdata, in NCR_700_scsi_done() argument
590 hostdata->state = NCR_700_HOST_FREE; in NCR_700_scsi_done()
591 hostdata->cmd = NULL; in NCR_700_scsi_done()
597 dma_unmap_single(hostdata->dev, slot->pCmd, 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()
644 struct NCR_700_Host_Parameters *hostdata = in NCR_700_chip_setup() local
645 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_chip_setup()
647 __u8 min_xferp = (hostdata->chip710 ? NCR_710_MIN_XFERP : NCR_700_MIN_XFERP); in NCR_700_chip_setup()
649 if(hostdata->chip710) { in NCR_700_chip_setup()
653 switch (hostdata->burst_length) { in NCR_700_chip_setup()
670 hostdata->dcntl_extra |= COMPAT_700_MODE; in NCR_700_chip_setup()
672 NCR_700_writeb(hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
673 NCR_700_writeb(burst_length | hostdata->dmode_extra, in NCR_700_chip_setup()
675 NCR_700_writeb(burst_disable | hostdata->ctest7_extra | in NCR_700_chip_setup()
676 (hostdata->differential ? DIFF : 0), in NCR_700_chip_setup()
682 NCR_700_writeb(BURST_LENGTH_8 | hostdata->dmode_extra, in NCR_700_chip_setup()
684 NCR_700_writeb(hostdata->differential ? in NCR_700_chip_setup()
686 if(hostdata->fast) { in NCR_700_chip_setup()
706 if(hostdata->clock > 75) { in NCR_700_chip_setup()
707 …lock speed %dMHz is too high: 75Mhz is the maximum this chip can be driven at\n", hostdata->clock); in NCR_700_chip_setup()
712 NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
713 hostdata->sync_clock = hostdata->clock/2; in NCR_700_chip_setup()
714 } else if(hostdata->clock > 50 && hostdata->clock <= 75) { in NCR_700_chip_setup()
718 NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
719 hostdata->sync_clock = hostdata->clock*2; in NCR_700_chip_setup()
720 hostdata->sync_clock /= 3; in NCR_700_chip_setup()
722 } else if(hostdata->clock > 37 && hostdata->clock <= 50) { in NCR_700_chip_setup()
726 NCR_700_writeb(ASYNC_DIV_2_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
727 hostdata->sync_clock = hostdata->clock; in NCR_700_chip_setup()
728 } else if(hostdata->clock > 25 && hostdata->clock <=37) { in NCR_700_chip_setup()
732 NCR_700_writeb(ASYNC_DIV_1_5 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
733 hostdata->sync_clock = hostdata->clock; in NCR_700_chip_setup()
737 NCR_700_writeb(ASYNC_DIV_1_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
739 hostdata->sync_clock = hostdata->clock; in NCR_700_chip_setup()
745 min_period = 1000*(4+min_xferp)/(4*hostdata->sync_clock); in NCR_700_chip_setup()
746 hostdata->min_period = NCR_700_MIN_PERIOD; in NCR_700_chip_setup()
748 hostdata->min_period = min_period; in NCR_700_chip_setup()
754 struct NCR_700_Host_Parameters *hostdata = in NCR_700_chip_reset() local
755 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_chip_reset()
756 if(hostdata->chip710) { in NCR_700_chip_reset()
781 struct NCR_700_Host_Parameters *hostdata, in process_extended_message() argument
792 switch(hostdata->msgin[2]) { in process_extended_message()
796 __u8 period = hostdata->msgin[3]; in process_extended_message()
797 __u8 offset = hostdata->msgin[4]; in process_extended_message()
822 hostdata->msgout[0] = A_REJECT_MSG; in process_extended_message()
823 dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); in process_extended_message()
824 script_patch_16(hostdata->dev, hostdata->script, in process_extended_message()
828 resume_offset = hostdata->pScript + Ent_SendMessageWithATN; in process_extended_message()
835 hostdata->msgout[0] = A_REJECT_MSG; in process_extended_message()
836 dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); in process_extended_message()
837 script_patch_16(hostdata->dev, hostdata->script, MessageCount, in process_extended_message()
839 resume_offset = hostdata->pScript + Ent_SendMessageWithATN; in process_extended_message()
847 spi_print_msg(hostdata->msgin); in process_extended_message()
850 hostdata->msgout[0] = A_REJECT_MSG; in process_extended_message()
851 dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); in process_extended_message()
852 script_patch_16(hostdata->dev, hostdata->script, MessageCount, in process_extended_message()
856 resume_offset = hostdata->pScript + Ent_SendMessageWithATN; in process_extended_message()
863 process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata, in process_message() argument
878 spi_print_msg(hostdata->msgin); in process_message()
882 switch(hostdata->msgin[0]) { in process_message()
885 resume_offset = process_extended_message(host, hostdata, SCp, in process_message()
902 hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); in process_message()
923 pun, lun, hostdata->msgin[1], in process_message()
932 spi_print_msg(hostdata->msgin); in process_message()
935 hostdata->msgout[0] = A_REJECT_MSG; in process_message()
936 dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); in process_message()
937 script_patch_16(hostdata->dev, hostdata->script, MessageCount, in process_message()
941 resume_offset = hostdata->pScript + Ent_SendMessageWithATN; in process_message()
947 dma_cache_sync(hostdata->dev, hostdata->msgin, MSG_ARRAY_SIZE, DMA_FROM_DEVICE); in process_message()
954 struct NCR_700_Host_Parameters *hostdata) in process_script_interrupt() argument
966 hostdata->status[0])); in process_script_interrupt()
973 if(status_byte(hostdata->status[0]) == CHECK_CONDITION || in process_script_interrupt()
974 status_byte(hostdata->status[0]) == COMMAND_TERMINATED) { in process_script_interrupt()
982 NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); in process_script_interrupt()
989 SCp, hostdata->status[0]); 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()
1016 cmnd[7] = hostdata->status[0]; in process_script_interrupt()
1020 slot->pCmd = dma_map_single(hostdata->dev, cmnd, MAX_COMMAND_SIZE, DMA_TO_DEVICE); in process_script_interrupt()
1021 …slot->dma_handle = dma_map_single(hostdata->dev, SCp->sense_buffer, SCSI_SENSE_BUFFERSIZE, DMA_FRO… 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()
1028 dma_cache_sync(hostdata->dev, SCp->sense_buffer, SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE); in process_script_interrupt()
1033 hostdata->state = NCR_700_HOST_FREE; in process_script_interrupt()
1034 hostdata->cmd = NULL; in process_script_interrupt()
1058 NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); in process_script_interrupt()
1078 hostdata->msgin[0], hostdata->msgin[1]); in process_script_interrupt()
1089 save_for_reselection(hostdata, SCp, dsp); in process_script_interrupt()
1094 __u8 reselection_id = hostdata->reselection_id; in process_script_interrupt()
1097 lun = hostdata->msgin[0] & 0x1f; in process_script_interrupt()
1099 hostdata->reselection_id = 0xff; in process_script_interrupt()
1109 if(hostdata->msgin[1] == A_SIMPLE_TAG_MSG) { in process_script_interrupt()
1110 struct scsi_cmnd *SCp = scsi_find_tag(SDp, hostdata->msgin[2]); in process_script_interrupt()
1113 host->host_no, reselection_id, lun, hostdata->msgin[2]); in process_script_interrupt()
1120 hostdata->msgin[2], slot, slot->tag); in process_script_interrupt()
1134 hostdata->msgin[0], hostdata->msgin[1], in process_script_interrupt()
1135 hostdata->msgin[2]); in process_script_interrupt()
1137 if(hostdata->state != NCR_700_HOST_BUSY) in process_script_interrupt()
1141 hostdata->cmd = slot->cmnd; in process_script_interrupt()
1144 script_patch_32_abs(hostdata->dev, hostdata->script, in process_script_interrupt()
1146 script_patch_16(hostdata->dev, hostdata->script, in process_script_interrupt()
1148 script_patch_32_abs(hostdata->dev, hostdata->script, in process_script_interrupt()
1157 NCR_700_writeb(NCR_700_get_SXFER(hostdata->cmd->device), in process_script_interrupt()
1159 dma_cache_sync(hostdata->dev, hostdata->msgin, in process_script_interrupt()
1161 dma_cache_sync(hostdata->dev, hostdata->msgout, in process_script_interrupt()
1165 dma_cache_sync(hostdata->dev, slot->cmnd->cmnd, in process_script_interrupt()
1189 …host->host_no, reselection_id, lun, dsp, dsp - hostdata->pScript, hostdata->state, hostdata->comma… in process_script_interrupt()
1193 __u32 SG = (__u32)bS_to_cpu(hostdata->script[A_SGScriptStartAddress_used[0]]); in process_script_interrupt()
1197 if(SG >= to32bit(&hostdata->slots[i].pSG[0]) in process_script_interrupt()
1198 && SG <= to32bit(&hostdata->slots[i].pSG[NCR_700_SG_SEGMENTS])) in process_script_interrupt()
1201 …lot %p, cmd %p, slot->resume_offset=%08x\n", SG, &hostdata->slots[i], hostdata->slots[i].cmnd, hos… in process_script_interrupt()
1202 SCp = hostdata->slots[i].cmnd; in process_script_interrupt()
1210 hostdata->cmd = NULL; in process_script_interrupt()
1213 if(hostdata->reselection_id == 0xff) { in process_script_interrupt()
1219 reselection_id = hostdata->reselection_id; in process_script_interrupt()
1226 hostdata->reselection_id = reselection_id; in process_script_interrupt()
1228 hostdata->msgin[1] = 0; in process_script_interrupt()
1229 dma_cache_sync(hostdata->dev, hostdata->msgin, in process_script_interrupt()
1231 if(hostdata->tag_negotiated & (1<<reselection_id)) { in process_script_interrupt()
1232 resume_offset = hostdata->pScript + Ent_GetReselectionWithTag; in process_script_interrupt()
1234 resume_offset = hostdata->pScript + Ent_GetReselectionData; in process_script_interrupt()
1242 resume_offset = process_message(host, hostdata, SCp, in process_script_interrupt()
1248 NCR_700_phase[j], dsp - hostdata->pScript); in process_script_interrupt()
1260 host->host_no, pun, lun, dsps & 0xfff, dsp, dsp - hostdata->pScript); in process_script_interrupt()
1264 host->host_no, pun, lun, dsps, dsp - hostdata->pScript); in process_script_interrupt()
1283 struct NCR_700_Host_Parameters *hostdata = in process_selection() local
1284 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in process_selection()
1285 struct scsi_cmnd *SCp = hostdata->cmd; in process_selection()
1289 id = NCR_700_readb(host, hostdata->chip710 ? in process_selection()
1304 hostdata->reselection_id = id = bitmap_to_number(id); in process_selection()
1308 if(hostdata->state == NCR_700_HOST_BUSY && SCp != NULL) { in process_selection()
1311 …ing cmd %p, slot %p, addr %x [%04x], resume %x!\n", id, hostdata->cmd, slot, dsp, dsp - hostdata->… in process_selection()
1313 switch(dsp - hostdata->pScript) { in process_selection()
1316 save_for_reselection(hostdata, SCp, Ent_Disconnect2 + hostdata->pScript); in process_selection()
1320 save_for_reselection(hostdata, SCp, Ent_Disconnect4 + hostdata->pScript); in process_selection()
1324 save_for_reselection(hostdata, SCp, Ent_Disconnect6 + hostdata->pScript); in process_selection()
1328 save_for_reselection(hostdata, SCp, Ent_Disconnect8 + hostdata->pScript); in process_selection()
1332 process_script_interrupt(A_GOOD_STATUS_AFTER_STATUS, dsp, SCp, host, hostdata); in process_selection()
1340 hostdata->state = NCR_700_HOST_BUSY; in process_selection()
1341 hostdata->cmd = NULL; in process_selection()
1343 hostdata->msgin[1] = 0; in process_selection()
1344 dma_cache_sync(hostdata->dev, hostdata->msgin, MSG_ARRAY_SIZE, in process_selection()
1349 resume_offset = hostdata->pScript + Ent_SelectedAsTarget; in process_selection()
1350 } else if(hostdata->tag_negotiated & (1<<id)) { in process_selection()
1351 resume_offset = hostdata->pScript + Ent_GetReselectionWithTag; in process_selection()
1353 resume_offset = hostdata->pScript + Ent_GetReselectionData; in process_selection()
1360 const struct NCR_700_Host_Parameters *hostdata in NCR_700_clear_fifo() local
1361 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_clear_fifo()
1362 if(hostdata->chip710) { in NCR_700_clear_fifo()
1371 const struct NCR_700_Host_Parameters *hostdata in NCR_700_flush_fifo() local
1372 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_flush_fifo()
1373 if(hostdata->chip710) { in NCR_700_flush_fifo()
1392 struct NCR_700_Host_Parameters *hostdata = in NCR_700_start_command() local
1393 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; in NCR_700_start_command()
1397 if(hostdata->state != NCR_700_HOST_FREE) { in NCR_700_start_command()
1407 hostdata->state = NCR_700_HOST_BUSY; in NCR_700_start_command()
1408 hostdata->cmd = SCp; in NCR_700_start_command()
1413 hostdata->msgout[0] = NCR_700_identify((SCp->cmnd[0] != REQUEST_SENSE && in NCR_700_start_command()
1428 if((hostdata->tag_negotiated & (1<<scmd_id(SCp))) in NCR_700_start_command()
1431 count += spi_populate_tag_msg(&hostdata->msgout[count], SCp); in NCR_700_start_command()
1434 if(hostdata->fast && in NCR_700_start_command()
1436 count += spi_populate_sync_msg(&hostdata->msgout[count], in NCR_700_start_command()
1442 script_patch_16(hostdata->dev, hostdata->script, MessageCount, count); in NCR_700_start_command()
1445 script_patch_ID(hostdata->dev, hostdata->script, in NCR_700_start_command()
1448 script_patch_32_abs(hostdata->dev, hostdata->script, CommandAddress, in NCR_700_start_command()
1450 script_patch_16(hostdata->dev, hostdata->script, CommandCount, in NCR_700_start_command()
1454 script_patch_32_abs(hostdata->dev, hostdata->script, in NCR_700_start_command()
1459 slot->resume_offset = hostdata->pScript; in NCR_700_start_command()
1461 dma_cache_sync(hostdata->dev, hostdata->msgout, count, DMA_TO_DEVICE); in NCR_700_start_command()
1462 dma_cache_sync(hostdata->dev, hostdata->msgin, MSG_ARRAY_SIZE, in NCR_700_start_command()
1464 dma_cache_sync(hostdata->dev, SCp->cmnd, SCp->cmd_len, DMA_TO_DEVICE); in NCR_700_start_command()
1465 dma_cache_sync(hostdata->dev, hostdata->status, 1, DMA_FROM_DEVICE); in NCR_700_start_command()
1480 struct NCR_700_Host_Parameters *hostdata = in NCR_700_intr() local
1481 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_intr()
1499 struct scsi_cmnd *SCp = hostdata->cmd; in NCR_700_intr()
1503 state = hostdata->state; in NCR_700_intr()
1504 SCp = hostdata->cmd; in NCR_700_intr()
1523 (dsp - (__u32)(hostdata->pScript))/4, in NCR_700_intr()
1535 hostdata->state = NCR_700_HOST_BUSY; in NCR_700_intr()
1538 … host->host_no, SCp, SCp == NULL ? NULL : SCp->host_scribble, dsp, dsp - hostdata->pScript); in NCR_700_intr()
1550 &hostdata->slots[i]; in NCR_700_intr()
1558 free_slot(slot, hostdata); in NCR_700_intr()
1573 hostdata->state = NCR_700_HOST_FREE; in NCR_700_intr()
1574 hostdata->cmd = NULL; in NCR_700_intr()
1576 if(hostdata->eh_complete != NULL) in NCR_700_intr()
1577 complete(hostdata->eh_complete); in NCR_700_intr()
1582 NCR_700_scsi_done(hostdata, SCp, DID_NO_CONNECT<<16); in NCR_700_intr()
1587 if(dsp == Ent_SendMessage + 8 + hostdata->pScript) { in NCR_700_intr()
1592 …int count = (hostdata->script[Ent_SendMessage/4] & 0xffffff) - ((NCR_700_readl(host, DBC_REG) & 0x… in NCR_700_intr()
1593 …04x], phase %s\n", host->host_no, pun, lun, count, (void *)temp, temp - hostdata->pScript, sbcl_to… in NCR_700_intr()
1595 resume_offset = hostdata->pScript + Ent_SendMessagePhaseMismatch; in NCR_700_intr()
1641 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); in NCR_700_intr()
1644 resume_offset = hostdata->pScript + Ent_MsgInDuringData; in NCR_700_intr()
1650 host->host_no, pun, lun, dsp - hostdata->pScript, sbcl_to_string(sbcl)); in NCR_700_intr()
1657 NCR_700_scsi_done(hostdata, SCp, DID_ERROR<<16); in NCR_700_intr()
1661 NCR_700_scsi_done(hostdata, SCp, DID_ERROR<<16); in NCR_700_intr()
1665 resume_offset = process_script_interrupt(dsps, dsp, SCp, host, hostdata); in NCR_700_intr()
1670 dsp, dsp - hostdata->pScript); in NCR_700_intr()
1671 NCR_700_scsi_done(hostdata, SCp, DID_ERROR<<16); in NCR_700_intr()
1675 NCR_700_scsi_done(hostdata, SCp, DID_ERROR<<16); in NCR_700_intr()
1707 if(hostdata->state != NCR_700_HOST_BUSY) { in NCR_700_intr()
1709 host->host_no, resume_offset, resume_offset - hostdata->pScript); in NCR_700_intr()
1710 hostdata->state = NCR_700_HOST_BUSY; in NCR_700_intr()
1722 if(hostdata->state == NCR_700_HOST_FREE) { in NCR_700_intr()
1728 int j = (i + hostdata->saved_slot_position) in NCR_700_intr()
1731 if(hostdata->slots[j].state != NCR_700_SLOT_QUEUED) in NCR_700_intr()
1733 if(NCR_700_start_command(hostdata->slots[j].cmnd)) { in NCR_700_intr()
1735 host->host_no, &hostdata->slots[j], in NCR_700_intr()
1736 hostdata->slots[j].cmnd)); in NCR_700_intr()
1737 hostdata->saved_slot_position = j + 1; in NCR_700_intr()
1751 struct NCR_700_Host_Parameters *hostdata = in NCR_700_queuecommand_lck() local
1752 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; in NCR_700_queuecommand_lck()
1757 if(hostdata->command_slot_count >= NCR_700_COMMAND_SLOTS_PER_HOST) { in NCR_700_queuecommand_lck()
1770 && (!(hostdata->tag_negotiated & (1<<scmd_id(SCp))) in NCR_700_queuecommand_lck()
1786 slot = find_empty_slot(hostdata); in NCR_700_queuecommand_lck()
1800 && (hostdata->tag_negotiated &(1<<scmd_id(SCp))) == 0 in NCR_700_queuecommand_lck()
1803 hostdata->tag_negotiated |= (1<<scmd_id(SCp)); in NCR_700_queuecommand_lck()
1814 && (hostdata->tag_negotiated &(1<<scmd_id(SCp)))) { in NCR_700_queuecommand_lck()
1816 hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); in NCR_700_queuecommand_lck()
1819 if ((hostdata->tag_negotiated & (1<<scmd_id(SCp))) && in NCR_700_queuecommand_lck()
1891 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); in NCR_700_queuecommand_lck()
1897 slot->pCmd = dma_map_single(hostdata->dev, SCp->cmnd, in NCR_700_queuecommand_lck()
1939 struct NCR_700_Host_Parameters *hostdata = in NCR_700_bus_reset() local
1940 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; in NCR_700_bus_reset()
1950 while (hostdata->eh_complete != NULL) { in NCR_700_bus_reset()
1956 hostdata->eh_complete = &complete; in NCR_700_bus_reset()
1963 hostdata->eh_complete = NULL; in NCR_700_bus_reset()
1965 if(hostdata->fast) in NCR_700_bus_reset()
1992 struct NCR_700_Host_Parameters *hostdata = in NCR_700_set_period() local
1993 (struct NCR_700_Host_Parameters *)SHp->hostdata[0]; in NCR_700_set_period()
1995 if(!hostdata->fast) in NCR_700_set_period()
1998 if(period < hostdata->min_period) in NCR_700_set_period()
1999 period = hostdata->min_period; in NCR_700_set_period()
2011 struct NCR_700_Host_Parameters *hostdata = in NCR_700_set_offset() local
2012 (struct NCR_700_Host_Parameters *)SHp->hostdata[0]; in NCR_700_set_offset()
2013 int max_offset = hostdata->chip710 in NCR_700_set_offset()
2016 if(!hostdata->fast) in NCR_700_set_offset()
2023 if(spi_offset(STp) == 0 && (spi_period(STp) < hostdata->min_period || in NCR_700_set_offset()
2025 spi_period(STp) = hostdata->min_period; in NCR_700_set_offset()
2036 SDp->hostdata = kzalloc(sizeof(struct NCR_700_Device_Parameters), in NCR_700_slave_alloc()
2039 if (!SDp->hostdata) in NCR_700_slave_alloc()
2048 struct NCR_700_Host_Parameters *hostdata = in NCR_700_slave_configure() local
2049 (struct NCR_700_Host_Parameters *)SDp->host->hostdata[0]; in NCR_700_slave_configure()
2057 if(hostdata->fast) { in NCR_700_slave_configure()
2071 kfree(SDp->hostdata); in NCR_700_slave_destroy()
2072 SDp->hostdata = NULL; in NCR_700_slave_destroy()