Lines Matching refs:host

173 STATIC void NCR_700_chip_setup(struct Scsi_Host *host);
174 STATIC void NCR_700_chip_reset(struct Scsi_Host *host);
278 (struct NCR_700_Host_Parameters *)SDp->host->hostdata[0]; in NCR_700_get_SXFER()
292 struct Scsi_Host *host; in NCR_700_detect() local
335 host = scsi_host_alloc(tpnt, 4); in NCR_700_detect()
336 if (!host) in NCR_700_detect()
370 host->max_id = 8; in NCR_700_detect()
371 host->max_lun = NCR_700_MAX_LUNS; in NCR_700_detect()
373 host->transportt = NCR_700_transport_template; in NCR_700_detect()
374 host->unique_id = (unsigned long)hostdata->base; in NCR_700_detect()
376 host->hostdata[0] = (unsigned long)hostdata; in NCR_700_detect()
378 NCR_700_writeb(0xff, host, CTEST9_REG); 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()
388 printk(KERN_NOTICE "scsi%d: %s rev %d %s\n", host->host_no, in NCR_700_detect()
394 NCR_700_chip_reset(host); in NCR_700_detect()
396 if (scsi_add_host(host, dev)) { in NCR_700_detect()
398 scsi_host_put(host); in NCR_700_detect()
402 spi_signalling(host) = hostdata->differential ? SPI_SIGNAL_HVD : in NCR_700_detect()
405 return host; in NCR_700_detect()
409 NCR_700_release(struct Scsi_Host *host) in NCR_700_release() argument
412 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_release()
438 NCR_700_data_residual (struct Scsi_Host *host) { in NCR_700_data_residual() argument
440 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_data_residual()
445 count = ((NCR_700_readb(host, DFIFO_REG) & 0x7f) - in NCR_700_data_residual()
446 (NCR_700_readl(host, DBC_REG) & 0x7f)) & 0x7f; in NCR_700_data_residual()
448 count = ((NCR_700_readb(host, DFIFO_REG) & 0x3f) - in NCR_700_data_residual()
449 (NCR_700_readl(host, DBC_REG) & 0x3f)) & 0x3f; in NCR_700_data_residual()
453 synchronous = NCR_700_readb(host, SXFER_REG) & 0x0f; in NCR_700_data_residual()
456 ddir = NCR_700_readb(host, CTEST0_REG) & 0x01; in NCR_700_data_residual()
461 count += (NCR_700_readb(host, SSTAT2_REG) & 0xf0) >> 4; in NCR_700_data_residual()
463 if (NCR_700_readb(host, SSTAT1_REG) & SIDL_REG_FULL) in NCR_700_data_residual()
467 __u8 sstat = NCR_700_readb(host, SSTAT1_REG); in NCR_700_data_residual()
632 NCR_700_internal_bus_reset(struct Scsi_Host *host) in NCR_700_internal_bus_reset() argument
635 NCR_700_writeb(ASSERT_RST, host, SCNTL1_REG); in NCR_700_internal_bus_reset()
637 NCR_700_writeb(0, host, SCNTL1_REG); in NCR_700_internal_bus_reset()
642 NCR_700_chip_setup(struct Scsi_Host *host) in NCR_700_chip_setup() argument
645 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_chip_setup()
672 NCR_700_writeb(hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
674 host, DMODE_710_REG); in NCR_700_chip_setup()
677 host, CTEST7_REG); in NCR_700_chip_setup()
678 NCR_700_writeb(BTB_TIMER_DISABLE, host, CTEST0_REG); in NCR_700_chip_setup()
680 | AUTO_ATN, host, SCNTL0_REG); in NCR_700_chip_setup()
683 host, DMODE_700_REG); in NCR_700_chip_setup()
685 DIFF : 0, host, CTEST7_REG); in NCR_700_chip_setup()
689 | GENERATE_RECEIVE_PARITY, host, in NCR_700_chip_setup()
693 | PARITY | AUTO_ATN, host, SCNTL0_REG); in NCR_700_chip_setup()
697 NCR_700_writeb(1 << host->this_id, host, SCID_REG); in NCR_700_chip_setup()
698 NCR_700_writeb(0, host, SBCL_REG); in NCR_700_chip_setup()
699 NCR_700_writeb(ASYNC_OPERATION, host, SXFER_REG); in NCR_700_chip_setup()
702 | RST_INT | PAR_ERR_INT | SELECT_INT, host, SIEN_REG); in NCR_700_chip_setup()
704 NCR_700_writeb(ABORT_INT | INT_INST_INT | ILGL_INST_INT, host, DIEN_REG); in NCR_700_chip_setup()
705 NCR_700_writeb(ENABLE_SELECT, host, SCNTL1_REG); in NCR_700_chip_setup()
711 NCR_700_writeb(SYNC_DIV_2_0, host, SBCL_REG); in NCR_700_chip_setup()
712 NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
717 NCR_700_writeb(SYNC_DIV_1_5, host, SBCL_REG); in NCR_700_chip_setup()
718 NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
725 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG); in NCR_700_chip_setup()
726 NCR_700_writeb(ASYNC_DIV_2_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
731 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG); in NCR_700_chip_setup()
732 NCR_700_writeb(ASYNC_DIV_1_5 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
736 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG); in NCR_700_chip_setup()
737 NCR_700_writeb(ASYNC_DIV_1_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
752 NCR_700_chip_reset(struct Scsi_Host *host) in NCR_700_chip_reset() argument
755 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_chip_reset()
757 NCR_700_writeb(SOFTWARE_RESET_710, host, ISTAT_REG); in NCR_700_chip_reset()
760 NCR_700_writeb(0, host, ISTAT_REG); in NCR_700_chip_reset()
762 NCR_700_writeb(SOFTWARE_RESET, host, DCNTL_REG); in NCR_700_chip_reset()
765 NCR_700_writeb(0, host, DCNTL_REG); in NCR_700_chip_reset()
770 NCR_700_chip_setup(host); in NCR_700_chip_reset()
780 process_extended_message(struct Scsi_Host *host, in process_extended_message() argument
816 host, SXFER_REG); in process_extended_message()
820 shost_printk(KERN_WARNING, host, in process_extended_message()
834 host->host_no, pun, lun); in process_extended_message()
845 host->host_no, pun, lun, in process_extended_message()
858 NCR_700_writel(temp, host, TEMP_REG); in process_extended_message()
863 process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata, in process_message() argument
876 printk("scsi%d (%d:%d): message %s: ", host->host_no, pun, lun, in process_message()
885 resume_offset = process_extended_message(host, hostdata, SCp, in process_message()
906 scsi_change_queue_depth(SCp->device, host->cmd_per_lun); in process_message()
908 shost_printk(KERN_WARNING, host, in process_message()
917 printk(KERN_ERR "scsi%d (%d:%d) Parity Error!\n", host->host_no, in process_message()
919 NCR_700_internal_bus_reset(host); in process_message()
922 printk(KERN_INFO "scsi%d (%d:%d) SIMPLE TAG %d %s\n", host->host_no, in process_message()
929 host->host_no, pun, lun, in process_message()
945 NCR_700_writel(temp, host, TEMP_REG); in process_message()
953 struct Scsi_Host *host, in process_script_interrupt() argument
1065 sbcl_to_string(NCR_700_readb(host, SBCL_REG))); in process_script_interrupt()
1070 NCR_700_internal_bus_reset(host); in process_script_interrupt()
1075 host->host_no, pun, lun, NCR_700_fatal_messages[i]); in process_script_interrupt()
1080 NCR_700_internal_bus_reset(host); in process_script_interrupt()
1086 host->host_no, pun, lun, in process_script_interrupt()
1101 host->host_no, reselection_id, lun)); in process_script_interrupt()
1103 SDp = __scsi_device_lookup(host, 0, reselection_id, lun); in process_script_interrupt()
1106 host->host_no, reselection_id, lun); in process_script_interrupt()
1113 host->host_no, reselection_id, lun, hostdata->msgin[2]); in process_script_interrupt()
1133 host->host_no, reselection_id, lun, in process_script_interrupt()
1139 host->host_no); in process_script_interrupt()
1158 host, SXFER_REG); in process_script_interrupt()
1180 __u8 reselection_id = NCR_700_readb(host, SFBR_REG); in process_script_interrupt()
1184 reselection_id &= ~(1<<host->this_id); in process_script_interrupt()
1189host->host_no, reselection_id, lun, dsp, dsp - hostdata->pScript, hostdata->state, hostdata->comma… in process_script_interrupt()
1214 printk(KERN_ERR "scsi%d: Invalid reselection during selection!!\n", host->host_no); in process_script_interrupt()
1218 host->host_no); in process_script_interrupt()
1242 resume_offset = process_message(host, hostdata, SCp, in process_script_interrupt()
1247 host->host_no, pun, lun, NCR_700_condition[i], in process_script_interrupt()
1257 NCR_700_internal_bus_reset(host); 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()
1265 NCR_700_internal_bus_reset(host); in process_script_interrupt()
1278 process_selection(struct Scsi_Host *host, __u32 dsp) in process_selection() argument
1284 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in process_selection()
1289 id = NCR_700_readb(host, hostdata->chip710 ? in process_selection()
1293 id &= ~(1<<host->this_id); in process_selection()
1298 sbcl = NCR_700_readb(host, SBCL_REG); in process_selection()
1306 host->host_no, id)); in process_selection()
1332 process_script_interrupt(A_GOOD_STATUS_AFTER_STATUS, dsp, SCp, host, hostdata); in process_selection()
1359 NCR_700_clear_fifo(struct Scsi_Host *host) { in NCR_700_clear_fifo() argument
1361 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_clear_fifo()
1363 NCR_700_writeb(CLR_FIFO_710, host, CTEST8_REG); in NCR_700_clear_fifo()
1365 NCR_700_writeb(CLR_FIFO, host, DFIFO_REG); in NCR_700_clear_fifo()
1370 NCR_700_flush_fifo(struct Scsi_Host *host) { in NCR_700_flush_fifo() argument
1372 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_flush_fifo()
1374 NCR_700_writeb(FLUSH_DMA_FIFO_710, host, CTEST8_REG); in NCR_700_flush_fifo()
1376 NCR_700_writeb(0, host, CTEST8_REG); in NCR_700_flush_fifo()
1378 NCR_700_writeb(FLUSH_DMA_FIFO, host, DFIFO_REG); in NCR_700_flush_fifo()
1380 NCR_700_writeb(0, host, DFIFO_REG); in NCR_700_flush_fifo()
1393 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; in NCR_700_start_command()
1404 SCp->device->host->host_no, slot->cmnd, slot)); in NCR_700_start_command()
1456 NCR_700_clear_fifo(SCp->device->host); in NCR_700_start_command()
1469 SCp->device->host, SXFER_REG); 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()
1479 struct Scsi_Host *host = (struct Scsi_Host *)dev_id; in NCR_700_intr() local
1481 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_intr()
1493 spin_lock_irqsave(host->host_lock, flags); in NCR_700_intr()
1494 if((istat = NCR_700_readb(host, ISTAT_REG)) in NCR_700_intr()
1509 sstat0 = NCR_700_readb(host, SSTAT0_REG); in NCR_700_intr()
1515 dstat = NCR_700_readb(host, DSTAT_REG); in NCR_700_intr()
1518 dsps = NCR_700_readl(host, DSPS_REG); in NCR_700_intr()
1519 dsp = NCR_700_readl(host, DSP_REG); in NCR_700_intr()
1522 host->host_no, istat, sstat0, dstat, in NCR_700_intr()
1538host->host_no, SCp, SCp == NULL ? NULL : SCp->host_scribble, dsp, dsp - hostdata->pScript); in NCR_700_intr()
1540 scsi_report_bus_reset(host, 0); in NCR_700_intr()
1543 __shost_for_each_device(SDp, host) in NCR_700_intr()
1571 NCR_700_chip_setup(host); in NCR_700_intr()
1581 host->host_no, pun, lun)); in NCR_700_intr()
1591 __u32 temp = NCR_700_readl(host, TEMP_REG); in NCR_700_intr()
1592 …Ent_SendMessage/4] & 0xffffff) - ((NCR_700_readl(host, DBC_REG) & 0xffffff) + NCR_700_data_residua… in NCR_700_intr()
1593 … %p[%04x], phase %s\n", host->host_no, pun, lun, count, (void *)temp, temp - hostdata->pScript, sb… in NCR_700_intr()
1598 int data_transfer = NCR_700_readl(host, DBC_REG) & 0xffffff; in NCR_700_intr()
1600 int residual = NCR_700_data_residual(host); in NCR_700_intr()
1603 __u32 naddr = NCR_700_readl(host, DNAD_REG); in NCR_700_intr()
1606 host->host_no, pun, lun, in NCR_700_intr()
1611 host->host_no, pun, lun, in NCR_700_intr()
1631 …transfer mismatch pAddr=%lx, naddr=%lx, data_transfer=%d, residual=%d\n", host->host_no, pun, lun,… in NCR_700_intr()
1646 NCR_700_flush_fifo(host); in NCR_700_intr()
1648 __u8 sbcl = NCR_700_readb(host, SBCL_REG); in NCR_700_intr()
1650 host->host_no, pun, lun, dsp - hostdata->pScript, sbcl_to_string(sbcl)); in NCR_700_intr()
1651 NCR_700_internal_bus_reset(host); in NCR_700_intr()
1656 host->host_no, pun, lun); in NCR_700_intr()
1660 host->host_no, pun, lun); in NCR_700_intr()
1664 host->host_no, pun, lun)); in NCR_700_intr()
1665 resume_offset = process_script_interrupt(dsps, dsp, SCp, host, hostdata); in NCR_700_intr()
1669 host->host_no, pun, lun, in NCR_700_intr()
1674 host->host_no, pun, lun, dstat); in NCR_700_intr()
1700 resume_offset = process_selection(host, dsp); in NCR_700_intr()
1709 host->host_no, resume_offset, resume_offset - hostdata->pScript); in NCR_700_intr()
1714 NCR_700_clear_fifo(host); in NCR_700_intr()
1715 NCR_700_writel(resume_offset, host, DSP_REG); in NCR_700_intr()
1735 host->host_no, &hostdata->slots[j], in NCR_700_intr()
1744 spin_unlock_irqrestore(host->host_lock, flags); in NCR_700_intr()
1752 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; in NCR_700_queuecommand_lck()
1760 …printk(KERN_WARNING "scsi%d: Command depth has gone over queue depth\n", SCp->device->host->host_n… in NCR_700_queuecommand_lck()
1796 printk("53c700: scsi%d, command ", SCp->device->host->host_no); in NCR_700_queuecommand_lck()
1928 NCR_700_internal_bus_reset(SCp->device->host); in DEF_SCSI_QCMD()
1940 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; in NCR_700_bus_reset()
1949 spin_lock_irq(SCp->device->host->host_lock); in NCR_700_bus_reset()
1951 spin_unlock_irq(SCp->device->host->host_lock); in NCR_700_bus_reset()
1953 spin_lock_irq(SCp->device->host->host_lock); in NCR_700_bus_reset()
1957 NCR_700_internal_bus_reset(SCp->device->host); in NCR_700_bus_reset()
1959 spin_unlock_irq(SCp->device->host->host_lock); in NCR_700_bus_reset()
1961 spin_lock_irq(SCp->device->host->host_lock); in NCR_700_bus_reset()
1968 spin_unlock_irq(SCp->device->host->host_lock); in NCR_700_bus_reset()
1978 spin_lock_irq(SCp->device->host->host_lock); in NCR_700_host_reset()
1980 NCR_700_internal_bus_reset(SCp->device->host); in NCR_700_host_reset()
1981 NCR_700_chip_reset(SCp->device->host); in NCR_700_host_reset()
1983 spin_unlock_irq(SCp->device->host->host_lock); in NCR_700_host_reset()
2049 (struct NCR_700_Host_Parameters *)SDp->host->hostdata[0]; in NCR_700_slave_configure()