Lines Matching refs:hostdata
232 NCR_700_offset_period_to_sxfer(struct NCR_700_Host_Parameters *hostdata, in NCR_700_offset_period_to_sxfer() argument
237 __u8 min_xferp = (hostdata->chip710 in NCR_700_offset_period_to_sxfer()
239 __u8 max_offset = (hostdata->chip710 in NCR_700_offset_period_to_sxfer()
245 if(period < hostdata->min_period) { in NCR_700_offset_period_to_sxfer()
247 period = hostdata->min_period; in NCR_700_offset_period_to_sxfer()
249 XFERP = (period*4 * hostdata->sync_clock)/1000 - 4; in NCR_700_offset_period_to_sxfer()
264 struct NCR_700_Host_Parameters *hostdata = in NCR_700_get_SXFER() local
265 (struct NCR_700_Host_Parameters *)SDp->host->hostdata[0]; in NCR_700_get_SXFER()
267 return NCR_700_offset_period_to_sxfer(hostdata, in NCR_700_get_SXFER()
274 struct NCR_700_Host_Parameters *hostdata, struct device *dev) in NCR_700_detect() argument
294 hostdata->msgin = memory + MSGIN_OFFSET; in NCR_700_detect()
295 hostdata->msgout = memory + MSGOUT_OFFSET; in NCR_700_detect()
296 hostdata->status = memory + STATUS_OFFSET; in NCR_700_detect()
297 hostdata->slots = (struct NCR_700_command_slot *)(memory + SLOTS_OFFSET); in NCR_700_detect()
298 hostdata->dev = dev; in NCR_700_detect()
322 memset(hostdata->slots, 0, sizeof(struct NCR_700_command_slot) in NCR_700_detect()
325 dma_addr_t offset = (dma_addr_t)((unsigned long)&hostdata->slots[j].SG[0] in NCR_700_detect()
326 - (unsigned long)&hostdata->slots[0].SG[0]); in NCR_700_detect()
327 hostdata->slots[j].pSG = (struct NCR_700_SG_List *)((unsigned long)(pSlots + offset)); in NCR_700_detect()
329 hostdata->free_list = &hostdata->slots[j]; in NCR_700_detect()
331 hostdata->slots[j-1].ITL_forw = &hostdata->slots[j]; in NCR_700_detect()
332 hostdata->slots[j].state = NCR_700_SLOT_FREE; in NCR_700_detect()
342 script_patch_32(hostdata->dev, script, MessageLocation, in NCR_700_detect()
344 script_patch_32(hostdata->dev, script, StatusAddress, in NCR_700_detect()
346 script_patch_32(hostdata->dev, script, ReceiveMsgAddress, in NCR_700_detect()
349 hostdata->script = script; in NCR_700_detect()
350 hostdata->pScript = pScript; in NCR_700_detect()
351 dma_sync_single_for_device(hostdata->dev, pScript, sizeof(SCRIPT), DMA_TO_DEVICE); in NCR_700_detect()
352 hostdata->state = NCR_700_HOST_FREE; in NCR_700_detect()
353 hostdata->cmd = NULL; in NCR_700_detect()
358 host->unique_id = (unsigned long)hostdata->base; in NCR_700_detect()
359 hostdata->eh_complete = NULL; in NCR_700_detect()
360 host->hostdata[0] = (unsigned long)hostdata; in NCR_700_detect()
363 if (hostdata->chip710) in NCR_700_detect()
364 hostdata->rev = (NCR_700_readb(host, CTEST8_REG)>>4) & 0x0f; in NCR_700_detect()
366 hostdata->rev = (NCR_700_readb(host, CTEST7_REG)>>4) & 0x0f; in NCR_700_detect()
367 hostdata->fast = (NCR_700_readb(host, CTEST9_REG) == 0); in NCR_700_detect()
373 hostdata->chip710 ? "53c710" : in NCR_700_detect()
374 (hostdata->fast ? "53c700-66" : "53c700"), in NCR_700_detect()
375 hostdata->rev, hostdata->differential ? in NCR_700_detect()
386 spi_signalling(host) = hostdata->differential ? SPI_SIGNAL_HVD : in NCR_700_detect()
395 struct NCR_700_Host_Parameters *hostdata = in NCR_700_release() local
396 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_release()
398 dma_free_attrs(hostdata->dev, TOTAL_MEM_SIZE, hostdata->script, in NCR_700_release()
399 hostdata->pScript, DMA_ATTR_NON_CONSISTENT); in NCR_700_release()
423 struct NCR_700_Host_Parameters *hostdata = in NCR_700_data_residual() local
424 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_data_residual()
428 if(hostdata->chip710) { in NCR_700_data_residual()
436 if(hostdata->fast) in NCR_700_data_residual()
493 find_empty_slot(struct NCR_700_Host_Parameters *hostdata) in find_empty_slot() argument
495 struct NCR_700_command_slot *slot = hostdata->free_list; in find_empty_slot()
499 if(hostdata->command_slot_count != NCR_700_COMMAND_SLOTS_PER_HOST) in find_empty_slot()
500 …printk(KERN_ERR "SLOTS FULL, but count is %d, should be %d\n", hostdata->command_slot_count, NCR_7… in find_empty_slot()
509 hostdata->free_list = slot->ITL_forw; in find_empty_slot()
519 hostdata->command_slot_count++; in find_empty_slot()
526 struct NCR_700_Host_Parameters *hostdata) in free_slot() argument
538 slot->ITL_forw = hostdata->free_list; in free_slot()
539 hostdata->free_list = slot; in free_slot()
540 hostdata->command_slot_count--; in free_slot()
547 save_for_reselection(struct NCR_700_Host_Parameters *hostdata, in save_for_reselection() argument
557 hostdata->state = NCR_700_HOST_FREE; in save_for_reselection()
558 hostdata->cmd = NULL; in save_for_reselection()
562 NCR_700_unmap(struct NCR_700_Host_Parameters *hostdata, struct scsi_cmnd *SCp, in NCR_700_unmap() argument
571 NCR_700_scsi_done(struct NCR_700_Host_Parameters *hostdata, in NCR_700_scsi_done() argument
574 hostdata->state = NCR_700_HOST_FREE; in NCR_700_scsi_done()
575 hostdata->cmd = NULL; in NCR_700_scsi_done()
581 dma_unmap_single(hostdata->dev, slot->pCmd, in NCR_700_scsi_done()
586 dma_unmap_single(hostdata->dev, slot->dma_handle, in NCR_700_scsi_done()
595 NCR_700_unmap(hostdata, SCp, slot); in NCR_700_scsi_done()
597 free_slot(slot, hostdata); in NCR_700_scsi_done()
628 struct NCR_700_Host_Parameters *hostdata = in NCR_700_chip_setup() local
629 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_chip_setup()
631 __u8 min_xferp = (hostdata->chip710 ? NCR_710_MIN_XFERP : NCR_700_MIN_XFERP); in NCR_700_chip_setup()
633 if(hostdata->chip710) { in NCR_700_chip_setup()
637 switch (hostdata->burst_length) { in NCR_700_chip_setup()
654 hostdata->dcntl_extra |= COMPAT_700_MODE; in NCR_700_chip_setup()
656 NCR_700_writeb(hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
657 NCR_700_writeb(burst_length | hostdata->dmode_extra, in NCR_700_chip_setup()
659 NCR_700_writeb(burst_disable | hostdata->ctest7_extra | in NCR_700_chip_setup()
660 (hostdata->differential ? DIFF : 0), in NCR_700_chip_setup()
666 NCR_700_writeb(BURST_LENGTH_8 | hostdata->dmode_extra, in NCR_700_chip_setup()
668 NCR_700_writeb(hostdata->differential ? in NCR_700_chip_setup()
670 if(hostdata->fast) { in NCR_700_chip_setup()
690 if(hostdata->clock > 75) { in NCR_700_chip_setup()
691 …lock speed %dMHz is too high: 75Mhz is the maximum this chip can be driven at\n", hostdata->clock); in NCR_700_chip_setup()
696 NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
697 hostdata->sync_clock = hostdata->clock/2; in NCR_700_chip_setup()
698 } else if(hostdata->clock > 50 && hostdata->clock <= 75) { in NCR_700_chip_setup()
702 NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
703 hostdata->sync_clock = hostdata->clock*2; in NCR_700_chip_setup()
704 hostdata->sync_clock /= 3; in NCR_700_chip_setup()
706 } else if(hostdata->clock > 37 && hostdata->clock <= 50) { in NCR_700_chip_setup()
710 NCR_700_writeb(ASYNC_DIV_2_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
711 hostdata->sync_clock = hostdata->clock; in NCR_700_chip_setup()
712 } else if(hostdata->clock > 25 && hostdata->clock <=37) { in NCR_700_chip_setup()
716 NCR_700_writeb(ASYNC_DIV_1_5 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
717 hostdata->sync_clock = hostdata->clock; in NCR_700_chip_setup()
721 NCR_700_writeb(ASYNC_DIV_1_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
723 hostdata->sync_clock = hostdata->clock; in NCR_700_chip_setup()
729 min_period = 1000*(4+min_xferp)/(4*hostdata->sync_clock); in NCR_700_chip_setup()
730 hostdata->min_period = NCR_700_MIN_PERIOD; in NCR_700_chip_setup()
732 hostdata->min_period = min_period; in NCR_700_chip_setup()
738 struct NCR_700_Host_Parameters *hostdata = in NCR_700_chip_reset() local
739 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_chip_reset()
740 if(hostdata->chip710) { in NCR_700_chip_reset()
765 struct NCR_700_Host_Parameters *hostdata, in process_extended_message() argument
776 switch(hostdata->msgin[2]) { in process_extended_message()
780 __u8 period = hostdata->msgin[3]; in process_extended_message()
781 __u8 offset = hostdata->msgin[4]; in process_extended_message()
806 hostdata->msgout[0] = A_REJECT_MSG; in process_extended_message()
807 dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); in process_extended_message()
808 script_patch_16(hostdata->dev, hostdata->script, in process_extended_message()
812 resume_offset = hostdata->pScript + Ent_SendMessageWithATN; in process_extended_message()
819 hostdata->msgout[0] = A_REJECT_MSG; in process_extended_message()
820 dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); in process_extended_message()
821 script_patch_16(hostdata->dev, hostdata->script, MessageCount, in process_extended_message()
823 resume_offset = hostdata->pScript + Ent_SendMessageWithATN; in process_extended_message()
831 spi_print_msg(hostdata->msgin); in process_extended_message()
834 hostdata->msgout[0] = A_REJECT_MSG; in process_extended_message()
835 dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); in process_extended_message()
836 script_patch_16(hostdata->dev, hostdata->script, MessageCount, in process_extended_message()
840 resume_offset = hostdata->pScript + Ent_SendMessageWithATN; in process_extended_message()
847 process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata, in process_message() argument
862 spi_print_msg(hostdata->msgin); in process_message()
866 switch(hostdata->msgin[0]) { in process_message()
869 resume_offset = process_extended_message(host, hostdata, SCp, in process_message()
886 hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); in process_message()
907 pun, lun, hostdata->msgin[1], in process_message()
916 spi_print_msg(hostdata->msgin); in process_message()
919 hostdata->msgout[0] = A_REJECT_MSG; in process_message()
920 dma_cache_sync(hostdata->dev, hostdata->msgout, 1, DMA_TO_DEVICE); in process_message()
921 script_patch_16(hostdata->dev, hostdata->script, MessageCount, in process_message()
925 resume_offset = hostdata->pScript + Ent_SendMessageWithATN; in process_message()
931 dma_cache_sync(hostdata->dev, hostdata->msgin, MSG_ARRAY_SIZE, DMA_FROM_DEVICE); in process_message()
938 struct NCR_700_Host_Parameters *hostdata) in process_script_interrupt() argument
950 hostdata->status[0])); in process_script_interrupt()
957 if(status_byte(hostdata->status[0]) == CHECK_CONDITION || in process_script_interrupt()
958 status_byte(hostdata->status[0]) == COMMAND_TERMINATED) { in process_script_interrupt()
966 NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); in process_script_interrupt()
973 SCp, hostdata->status[0]); in process_script_interrupt()
982 NCR_700_unmap(hostdata, SCp, slot); in process_script_interrupt()
983 dma_unmap_single(hostdata->dev, slot->pCmd, in process_script_interrupt()
1000 cmnd[7] = hostdata->status[0]; in process_script_interrupt()
1004 slot->pCmd = dma_map_single(hostdata->dev, cmnd, MAX_COMMAND_SIZE, DMA_TO_DEVICE); in process_script_interrupt()
1005 …slot->dma_handle = dma_map_single(hostdata->dev, SCp->sense_buffer, SCSI_SENSE_BUFFERSIZE, DMA_FRO… in process_script_interrupt()
1010 slot->resume_offset = hostdata->pScript; in process_script_interrupt()
1011 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG[0])*2, DMA_TO_DEVICE); in process_script_interrupt()
1012 dma_cache_sync(hostdata->dev, SCp->sense_buffer, SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE); in process_script_interrupt()
1017 hostdata->state = NCR_700_HOST_FREE; in process_script_interrupt()
1018 hostdata->cmd = NULL; in process_script_interrupt()
1042 NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); in process_script_interrupt()
1062 hostdata->msgin[0], hostdata->msgin[1]); in process_script_interrupt()
1073 save_for_reselection(hostdata, SCp, dsp); in process_script_interrupt()
1078 __u8 reselection_id = hostdata->reselection_id; in process_script_interrupt()
1081 lun = hostdata->msgin[0] & 0x1f; in process_script_interrupt()
1083 hostdata->reselection_id = 0xff; in process_script_interrupt()
1093 if(hostdata->msgin[1] == A_SIMPLE_TAG_MSG) { in process_script_interrupt()
1096 SCp = scsi_host_find_tag(SDp->host, hostdata->msgin[2]); in process_script_interrupt()
1099 host->host_no, reselection_id, lun, hostdata->msgin[2]); in process_script_interrupt()
1106 hostdata->msgin[2], slot, slot->tag); in process_script_interrupt()
1108 struct NCR_700_Device_Parameters *p = SDp->hostdata; in process_script_interrupt()
1122 hostdata->msgin[0], hostdata->msgin[1], in process_script_interrupt()
1123 hostdata->msgin[2]); in process_script_interrupt()
1125 if(hostdata->state != NCR_700_HOST_BUSY) in process_script_interrupt()
1129 hostdata->cmd = slot->cmnd; in process_script_interrupt()
1132 script_patch_32_abs(hostdata->dev, hostdata->script, in process_script_interrupt()
1134 script_patch_16(hostdata->dev, hostdata->script, in process_script_interrupt()
1136 script_patch_32_abs(hostdata->dev, hostdata->script, in process_script_interrupt()
1145 NCR_700_writeb(NCR_700_get_SXFER(hostdata->cmd->device), in process_script_interrupt()
1147 dma_cache_sync(hostdata->dev, hostdata->msgin, in process_script_interrupt()
1149 dma_cache_sync(hostdata->dev, hostdata->msgout, in process_script_interrupt()
1153 dma_cache_sync(hostdata->dev, slot->cmnd->cmnd, in process_script_interrupt()
1177 …host->host_no, reselection_id, lun, dsp, dsp - hostdata->pScript, hostdata->state, hostdata->comma… in process_script_interrupt()
1181 __u32 SG = (__u32)bS_to_cpu(hostdata->script[A_SGScriptStartAddress_used[0]]); in process_script_interrupt()
1185 if(SG >= to32bit(&hostdata->slots[i].pSG[0]) in process_script_interrupt()
1186 && SG <= to32bit(&hostdata->slots[i].pSG[NCR_700_SG_SEGMENTS])) in process_script_interrupt()
1189 …lot %p, cmd %p, slot->resume_offset=%08x\n", SG, &hostdata->slots[i], hostdata->slots[i].cmnd, hos… in process_script_interrupt()
1190 SCp = hostdata->slots[i].cmnd; in process_script_interrupt()
1198 hostdata->cmd = NULL; in process_script_interrupt()
1201 if(hostdata->reselection_id == 0xff) { in process_script_interrupt()
1207 reselection_id = hostdata->reselection_id; in process_script_interrupt()
1214 hostdata->reselection_id = reselection_id; in process_script_interrupt()
1216 hostdata->msgin[1] = 0; in process_script_interrupt()
1217 dma_cache_sync(hostdata->dev, hostdata->msgin, in process_script_interrupt()
1219 if(hostdata->tag_negotiated & (1<<reselection_id)) { in process_script_interrupt()
1220 resume_offset = hostdata->pScript + Ent_GetReselectionWithTag; in process_script_interrupt()
1222 resume_offset = hostdata->pScript + Ent_GetReselectionData; in process_script_interrupt()
1230 resume_offset = process_message(host, hostdata, SCp, in process_script_interrupt()
1236 NCR_700_phase[j], dsp - hostdata->pScript); in process_script_interrupt()
1248 host->host_no, pun, lun, dsps & 0xfff, dsp, dsp - hostdata->pScript); in process_script_interrupt()
1252 host->host_no, pun, lun, dsps, dsp - hostdata->pScript); in process_script_interrupt()
1271 struct NCR_700_Host_Parameters *hostdata = in process_selection() local
1272 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in process_selection()
1273 struct scsi_cmnd *SCp = hostdata->cmd; in process_selection()
1277 id = NCR_700_readb(host, hostdata->chip710 ? in process_selection()
1292 hostdata->reselection_id = id = bitmap_to_number(id); in process_selection()
1296 if(hostdata->state == NCR_700_HOST_BUSY && SCp != NULL) { in process_selection()
1299 …ing cmd %p, slot %p, addr %x [%04x], resume %x!\n", id, hostdata->cmd, slot, dsp, dsp - hostdata->… in process_selection()
1301 switch(dsp - hostdata->pScript) { in process_selection()
1304 save_for_reselection(hostdata, SCp, Ent_Disconnect2 + hostdata->pScript); in process_selection()
1308 save_for_reselection(hostdata, SCp, Ent_Disconnect4 + hostdata->pScript); in process_selection()
1312 save_for_reselection(hostdata, SCp, Ent_Disconnect6 + hostdata->pScript); in process_selection()
1316 save_for_reselection(hostdata, SCp, Ent_Disconnect8 + hostdata->pScript); in process_selection()
1320 process_script_interrupt(A_GOOD_STATUS_AFTER_STATUS, dsp, SCp, host, hostdata); in process_selection()
1328 hostdata->state = NCR_700_HOST_BUSY; in process_selection()
1329 hostdata->cmd = NULL; in process_selection()
1331 hostdata->msgin[1] = 0; in process_selection()
1332 dma_cache_sync(hostdata->dev, hostdata->msgin, MSG_ARRAY_SIZE, in process_selection()
1337 resume_offset = hostdata->pScript + Ent_SelectedAsTarget; in process_selection()
1338 } else if(hostdata->tag_negotiated & (1<<id)) { in process_selection()
1339 resume_offset = hostdata->pScript + Ent_GetReselectionWithTag; in process_selection()
1341 resume_offset = hostdata->pScript + Ent_GetReselectionData; in process_selection()
1348 const struct NCR_700_Host_Parameters *hostdata in NCR_700_clear_fifo() local
1349 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_clear_fifo()
1350 if(hostdata->chip710) { in NCR_700_clear_fifo()
1359 const struct NCR_700_Host_Parameters *hostdata in NCR_700_flush_fifo() local
1360 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_flush_fifo()
1361 if(hostdata->chip710) { in NCR_700_flush_fifo()
1380 struct NCR_700_Host_Parameters *hostdata = in NCR_700_start_command() local
1381 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; in NCR_700_start_command()
1385 if(hostdata->state != NCR_700_HOST_FREE) { in NCR_700_start_command()
1395 hostdata->state = NCR_700_HOST_BUSY; in NCR_700_start_command()
1396 hostdata->cmd = SCp; in NCR_700_start_command()
1401 hostdata->msgout[0] = NCR_700_identify((SCp->cmnd[0] != REQUEST_SENSE && in NCR_700_start_command()
1416 if((hostdata->tag_negotiated & (1<<scmd_id(SCp))) in NCR_700_start_command()
1419 count += spi_populate_tag_msg(&hostdata->msgout[count], SCp); in NCR_700_start_command()
1422 if(hostdata->fast && in NCR_700_start_command()
1424 count += spi_populate_sync_msg(&hostdata->msgout[count], in NCR_700_start_command()
1430 script_patch_16(hostdata->dev, hostdata->script, MessageCount, count); in NCR_700_start_command()
1433 script_patch_ID(hostdata->dev, hostdata->script, in NCR_700_start_command()
1436 script_patch_32_abs(hostdata->dev, hostdata->script, CommandAddress, in NCR_700_start_command()
1438 script_patch_16(hostdata->dev, hostdata->script, CommandCount, in NCR_700_start_command()
1442 script_patch_32_abs(hostdata->dev, hostdata->script, in NCR_700_start_command()
1447 slot->resume_offset = hostdata->pScript; in NCR_700_start_command()
1449 dma_cache_sync(hostdata->dev, hostdata->msgout, count, DMA_TO_DEVICE); in NCR_700_start_command()
1450 dma_cache_sync(hostdata->dev, hostdata->msgin, MSG_ARRAY_SIZE, in NCR_700_start_command()
1452 dma_cache_sync(hostdata->dev, SCp->cmnd, SCp->cmd_len, DMA_TO_DEVICE); in NCR_700_start_command()
1453 dma_cache_sync(hostdata->dev, hostdata->status, 1, DMA_FROM_DEVICE); in NCR_700_start_command()
1468 struct NCR_700_Host_Parameters *hostdata = in NCR_700_intr() local
1469 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_intr()
1487 struct scsi_cmnd *SCp = hostdata->cmd; in NCR_700_intr()
1491 state = hostdata->state; in NCR_700_intr()
1492 SCp = hostdata->cmd; in NCR_700_intr()
1511 (dsp - (__u32)(hostdata->pScript))/4, in NCR_700_intr()
1523 hostdata->state = NCR_700_HOST_BUSY; in NCR_700_intr()
1526 … host->host_no, SCp, SCp == NULL ? NULL : SCp->host_scribble, dsp, dsp - hostdata->pScript); in NCR_700_intr()
1538 &hostdata->slots[i]; in NCR_700_intr()
1546 free_slot(slot, hostdata); in NCR_700_intr()
1561 hostdata->state = NCR_700_HOST_FREE; in NCR_700_intr()
1562 hostdata->cmd = NULL; in NCR_700_intr()
1564 if(hostdata->eh_complete != NULL) in NCR_700_intr()
1565 complete(hostdata->eh_complete); in NCR_700_intr()
1570 NCR_700_scsi_done(hostdata, SCp, DID_NO_CONNECT<<16); in NCR_700_intr()
1575 if(dsp == Ent_SendMessage + 8 + hostdata->pScript) { in NCR_700_intr()
1580 …int count = (hostdata->script[Ent_SendMessage/4] & 0xffffff) - ((NCR_700_readl(host, DBC_REG) & 0x… in NCR_700_intr()
1581 …04x], phase %s\n", host->host_no, pun, lun, count, (void *)temp, temp - hostdata->pScript, sbcl_to… in NCR_700_intr()
1583 resume_offset = hostdata->pScript + Ent_SendMessagePhaseMismatch; in NCR_700_intr()
1629 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); in NCR_700_intr()
1632 resume_offset = hostdata->pScript + Ent_MsgInDuringData; in NCR_700_intr()
1638 host->host_no, pun, lun, dsp - hostdata->pScript, sbcl_to_string(sbcl)); in NCR_700_intr()
1645 NCR_700_scsi_done(hostdata, SCp, DID_ERROR<<16); in NCR_700_intr()
1649 NCR_700_scsi_done(hostdata, SCp, DID_ERROR<<16); in NCR_700_intr()
1653 resume_offset = process_script_interrupt(dsps, dsp, SCp, host, hostdata); in NCR_700_intr()
1658 dsp, dsp - hostdata->pScript); in NCR_700_intr()
1659 NCR_700_scsi_done(hostdata, SCp, DID_ERROR<<16); in NCR_700_intr()
1663 NCR_700_scsi_done(hostdata, SCp, DID_ERROR<<16); in NCR_700_intr()
1695 if(hostdata->state != NCR_700_HOST_BUSY) { in NCR_700_intr()
1697 host->host_no, resume_offset, resume_offset - hostdata->pScript); in NCR_700_intr()
1698 hostdata->state = NCR_700_HOST_BUSY; in NCR_700_intr()
1710 if(hostdata->state == NCR_700_HOST_FREE) { in NCR_700_intr()
1716 int j = (i + hostdata->saved_slot_position) in NCR_700_intr()
1719 if(hostdata->slots[j].state != NCR_700_SLOT_QUEUED) in NCR_700_intr()
1721 if(NCR_700_start_command(hostdata->slots[j].cmnd)) { in NCR_700_intr()
1723 host->host_no, &hostdata->slots[j], in NCR_700_intr()
1724 hostdata->slots[j].cmnd)); in NCR_700_intr()
1725 hostdata->saved_slot_position = j + 1; in NCR_700_intr()
1739 struct NCR_700_Host_Parameters *hostdata = in NCR_700_queuecommand_lck() local
1740 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; in NCR_700_queuecommand_lck()
1745 if(hostdata->command_slot_count >= NCR_700_COMMAND_SLOTS_PER_HOST) { in NCR_700_queuecommand_lck()
1758 && (!(hostdata->tag_negotiated & (1<<scmd_id(SCp))) in NCR_700_queuecommand_lck()
1774 slot = find_empty_slot(hostdata); in NCR_700_queuecommand_lck()
1788 && (hostdata->tag_negotiated &(1<<scmd_id(SCp))) == 0 in NCR_700_queuecommand_lck()
1791 hostdata->tag_negotiated |= (1<<scmd_id(SCp)); in NCR_700_queuecommand_lck()
1802 && (hostdata->tag_negotiated &(1<<scmd_id(SCp)))) { in NCR_700_queuecommand_lck()
1804 hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); in NCR_700_queuecommand_lck()
1807 if ((hostdata->tag_negotiated & (1<<scmd_id(SCp))) && in NCR_700_queuecommand_lck()
1813 struct NCR_700_Device_Parameters *p = SCp->device->hostdata; in NCR_700_queuecommand_lck()
1881 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); in NCR_700_queuecommand_lck()
1887 slot->pCmd = dma_map_single(hostdata->dev, SCp->cmnd, in NCR_700_queuecommand_lck()
1929 struct NCR_700_Host_Parameters *hostdata = in NCR_700_host_reset() local
1930 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; in NCR_700_host_reset()
1940 while (hostdata->eh_complete != NULL) { in NCR_700_host_reset()
1946 hostdata->eh_complete = &complete; in NCR_700_host_reset()
1954 hostdata->eh_complete = NULL; in NCR_700_host_reset()
1956 if(hostdata->fast) in NCR_700_host_reset()
1967 struct NCR_700_Host_Parameters *hostdata = in NCR_700_set_period() local
1968 (struct NCR_700_Host_Parameters *)SHp->hostdata[0]; in NCR_700_set_period()
1970 if(!hostdata->fast) in NCR_700_set_period()
1973 if(period < hostdata->min_period) in NCR_700_set_period()
1974 period = hostdata->min_period; in NCR_700_set_period()
1986 struct NCR_700_Host_Parameters *hostdata = in NCR_700_set_offset() local
1987 (struct NCR_700_Host_Parameters *)SHp->hostdata[0]; in NCR_700_set_offset()
1988 int max_offset = hostdata->chip710 in NCR_700_set_offset()
1991 if(!hostdata->fast) in NCR_700_set_offset()
1998 if(spi_offset(STp) == 0 && (spi_period(STp) < hostdata->min_period || in NCR_700_set_offset()
2000 spi_period(STp) = hostdata->min_period; in NCR_700_set_offset()
2011 SDp->hostdata = kzalloc(sizeof(struct NCR_700_Device_Parameters), in NCR_700_slave_alloc()
2014 if (!SDp->hostdata) in NCR_700_slave_alloc()
2023 struct NCR_700_Host_Parameters *hostdata = in NCR_700_slave_configure() local
2024 (struct NCR_700_Host_Parameters *)SDp->host->hostdata[0]; in NCR_700_slave_configure()
2032 if(hostdata->fast) { in NCR_700_slave_configure()
2046 kfree(SDp->hostdata); in NCR_700_slave_destroy()
2047 SDp->hostdata = NULL; in NCR_700_slave_destroy()