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
334 host = scsi_host_alloc(tpnt, 4); in NCR_700_detect()
335 if (!host) in NCR_700_detect()
369 host->max_id = 8; in NCR_700_detect()
370 host->max_lun = NCR_700_MAX_LUNS; in NCR_700_detect()
372 host->transportt = NCR_700_transport_template; in NCR_700_detect()
373 host->unique_id = (unsigned long)hostdata->base; in NCR_700_detect()
375 host->hostdata[0] = (unsigned long)hostdata; in NCR_700_detect()
377 NCR_700_writeb(0xff, host, CTEST9_REG); in NCR_700_detect()
379 hostdata->rev = (NCR_700_readb(host, CTEST8_REG)>>4) & 0x0f; in NCR_700_detect()
381 hostdata->rev = (NCR_700_readb(host, CTEST7_REG)>>4) & 0x0f; in NCR_700_detect()
382 hostdata->fast = (NCR_700_readb(host, CTEST9_REG) == 0); in NCR_700_detect()
387 printk(KERN_NOTICE "scsi%d: %s rev %d %s\n", host->host_no, in NCR_700_detect()
393 NCR_700_chip_reset(host); in NCR_700_detect()
395 if (scsi_add_host(host, dev)) { in NCR_700_detect()
397 scsi_host_put(host); in NCR_700_detect()
401 spi_signalling(host) = hostdata->differential ? SPI_SIGNAL_HVD : in NCR_700_detect()
404 return host; in NCR_700_detect()
408 NCR_700_release(struct Scsi_Host *host) in NCR_700_release() argument
411 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_release()
437 NCR_700_data_residual (struct Scsi_Host *host) { in NCR_700_data_residual() argument
439 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_data_residual()
444 count = ((NCR_700_readb(host, DFIFO_REG) & 0x7f) - in NCR_700_data_residual()
445 (NCR_700_readl(host, DBC_REG) & 0x7f)) & 0x7f; in NCR_700_data_residual()
447 count = ((NCR_700_readb(host, DFIFO_REG) & 0x3f) - in NCR_700_data_residual()
448 (NCR_700_readl(host, DBC_REG) & 0x3f)) & 0x3f; in NCR_700_data_residual()
452 synchronous = NCR_700_readb(host, SXFER_REG) & 0x0f; in NCR_700_data_residual()
455 ddir = NCR_700_readb(host, CTEST0_REG) & 0x01; in NCR_700_data_residual()
460 count += (NCR_700_readb(host, SSTAT2_REG) & 0xf0) >> 4; in NCR_700_data_residual()
462 if (NCR_700_readb(host, SSTAT1_REG) & SIDL_REG_FULL) in NCR_700_data_residual()
466 __u8 sstat = NCR_700_readb(host, SSTAT1_REG); in NCR_700_data_residual()
631 NCR_700_internal_bus_reset(struct Scsi_Host *host) in NCR_700_internal_bus_reset() argument
634 NCR_700_writeb(ASSERT_RST, host, SCNTL1_REG); in NCR_700_internal_bus_reset()
636 NCR_700_writeb(0, host, SCNTL1_REG); in NCR_700_internal_bus_reset()
641 NCR_700_chip_setup(struct Scsi_Host *host) in NCR_700_chip_setup() argument
644 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_chip_setup()
671 NCR_700_writeb(hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
673 host, DMODE_710_REG); in NCR_700_chip_setup()
676 host, CTEST7_REG); in NCR_700_chip_setup()
677 NCR_700_writeb(BTB_TIMER_DISABLE, host, CTEST0_REG); in NCR_700_chip_setup()
679 | AUTO_ATN, host, SCNTL0_REG); in NCR_700_chip_setup()
682 host, DMODE_700_REG); in NCR_700_chip_setup()
684 DIFF : 0, host, CTEST7_REG); in NCR_700_chip_setup()
688 | GENERATE_RECEIVE_PARITY, host, in NCR_700_chip_setup()
692 | PARITY | AUTO_ATN, host, SCNTL0_REG); in NCR_700_chip_setup()
696 NCR_700_writeb(1 << host->this_id, host, SCID_REG); in NCR_700_chip_setup()
697 NCR_700_writeb(0, host, SBCL_REG); in NCR_700_chip_setup()
698 NCR_700_writeb(ASYNC_OPERATION, host, SXFER_REG); in NCR_700_chip_setup()
701 | RST_INT | PAR_ERR_INT | SELECT_INT, host, SIEN_REG); in NCR_700_chip_setup()
703 NCR_700_writeb(ABORT_INT | INT_INST_INT | ILGL_INST_INT, host, DIEN_REG); in NCR_700_chip_setup()
704 NCR_700_writeb(ENABLE_SELECT, host, SCNTL1_REG); in NCR_700_chip_setup()
710 NCR_700_writeb(SYNC_DIV_2_0, host, SBCL_REG); in NCR_700_chip_setup()
711 NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
716 NCR_700_writeb(SYNC_DIV_1_5, host, SBCL_REG); in NCR_700_chip_setup()
717 NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
724 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG); in NCR_700_chip_setup()
725 NCR_700_writeb(ASYNC_DIV_2_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
730 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG); in NCR_700_chip_setup()
731 NCR_700_writeb(ASYNC_DIV_1_5 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
735 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG); in NCR_700_chip_setup()
736 NCR_700_writeb(ASYNC_DIV_1_0 | hostdata->dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
751 NCR_700_chip_reset(struct Scsi_Host *host) in NCR_700_chip_reset() argument
754 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_chip_reset()
756 NCR_700_writeb(SOFTWARE_RESET_710, host, ISTAT_REG); in NCR_700_chip_reset()
759 NCR_700_writeb(0, host, ISTAT_REG); in NCR_700_chip_reset()
761 NCR_700_writeb(SOFTWARE_RESET, host, DCNTL_REG); in NCR_700_chip_reset()
764 NCR_700_writeb(0, host, DCNTL_REG); in NCR_700_chip_reset()
769 NCR_700_chip_setup(host); in NCR_700_chip_reset()
779 process_extended_message(struct Scsi_Host *host, in process_extended_message() argument
815 host, SXFER_REG); in process_extended_message()
819 shost_printk(KERN_WARNING, host, in process_extended_message()
833 host->host_no, pun, lun); in process_extended_message()
844 host->host_no, pun, lun, in process_extended_message()
857 NCR_700_writel(temp, host, TEMP_REG); in process_extended_message()
862 process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata, in process_message() argument
875 printk("scsi%d (%d:%d): message %s: ", host->host_no, pun, lun, in process_message()
884 resume_offset = process_extended_message(host, hostdata, SCp, in process_message()
905 scsi_change_queue_depth(SCp->device, host->cmd_per_lun); in process_message()
907 shost_printk(KERN_WARNING, host, in process_message()
916 printk(KERN_ERR "scsi%d (%d:%d) Parity Error!\n", host->host_no, in process_message()
918 NCR_700_internal_bus_reset(host); in process_message()
921 printk(KERN_INFO "scsi%d (%d:%d) SIMPLE TAG %d %s\n", host->host_no, in process_message()
928 host->host_no, pun, lun, in process_message()
944 NCR_700_writel(temp, host, TEMP_REG); in process_message()
952 struct Scsi_Host *host, in process_script_interrupt() argument
1064 sbcl_to_string(NCR_700_readb(host, SBCL_REG))); in process_script_interrupt()
1069 NCR_700_internal_bus_reset(host); in process_script_interrupt()
1074 host->host_no, pun, lun, NCR_700_fatal_messages[i]); in process_script_interrupt()
1079 NCR_700_internal_bus_reset(host); in process_script_interrupt()
1085 host->host_no, pun, lun, in process_script_interrupt()
1100 host->host_no, reselection_id, lun)); in process_script_interrupt()
1102 SDp = __scsi_device_lookup(host, 0, reselection_id, lun); in process_script_interrupt()
1105 host->host_no, reselection_id, lun); in process_script_interrupt()
1111 SCp = scsi_host_find_tag(SDp->host, hostdata->msgin[2]); in process_script_interrupt()
1114 host->host_no, reselection_id, lun, hostdata->msgin[2]); in process_script_interrupt()
1125 SCp = scsi_host_find_tag(SDp->host, SCSI_NO_TAG); in process_script_interrupt()
1136 host->host_no, reselection_id, lun, in process_script_interrupt()
1142 host->host_no); in process_script_interrupt()
1161 host, SXFER_REG); in process_script_interrupt()
1183 __u8 reselection_id = NCR_700_readb(host, SFBR_REG); in process_script_interrupt()
1187 reselection_id &= ~(1<<host->this_id); in process_script_interrupt()
1192host->host_no, reselection_id, lun, dsp, dsp - hostdata->pScript, hostdata->state, hostdata->comma… in process_script_interrupt()
1217 printk(KERN_ERR "scsi%d: Invalid reselection during selection!!\n", host->host_no); in process_script_interrupt()
1221 host->host_no); in process_script_interrupt()
1245 resume_offset = process_message(host, hostdata, SCp, in process_script_interrupt()
1250 host->host_no, pun, lun, NCR_700_condition[i], in process_script_interrupt()
1260 NCR_700_internal_bus_reset(host); in process_script_interrupt()
1263 host->host_no, pun, lun, dsps & 0xfff, dsp, dsp - hostdata->pScript); in process_script_interrupt()
1267 host->host_no, pun, lun, dsps, dsp - hostdata->pScript); in process_script_interrupt()
1268 NCR_700_internal_bus_reset(host); in process_script_interrupt()
1281 process_selection(struct Scsi_Host *host, __u32 dsp) in process_selection() argument
1287 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in process_selection()
1292 id = NCR_700_readb(host, hostdata->chip710 ? in process_selection()
1296 id &= ~(1<<host->this_id); in process_selection()
1301 sbcl = NCR_700_readb(host, SBCL_REG); in process_selection()
1309 host->host_no, id)); in process_selection()
1335 process_script_interrupt(A_GOOD_STATUS_AFTER_STATUS, dsp, SCp, host, hostdata); in process_selection()
1362 NCR_700_clear_fifo(struct Scsi_Host *host) { in NCR_700_clear_fifo() argument
1364 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_clear_fifo()
1366 NCR_700_writeb(CLR_FIFO_710, host, CTEST8_REG); in NCR_700_clear_fifo()
1368 NCR_700_writeb(CLR_FIFO, host, DFIFO_REG); in NCR_700_clear_fifo()
1373 NCR_700_flush_fifo(struct Scsi_Host *host) { in NCR_700_flush_fifo() argument
1375 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_flush_fifo()
1377 NCR_700_writeb(FLUSH_DMA_FIFO_710, host, CTEST8_REG); in NCR_700_flush_fifo()
1379 NCR_700_writeb(0, host, CTEST8_REG); in NCR_700_flush_fifo()
1381 NCR_700_writeb(FLUSH_DMA_FIFO, host, DFIFO_REG); in NCR_700_flush_fifo()
1383 NCR_700_writeb(0, host, DFIFO_REG); in NCR_700_flush_fifo()
1396 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; in NCR_700_start_command()
1407 SCp->device->host->host_no, slot->cmnd, slot)); in NCR_700_start_command()
1459 NCR_700_clear_fifo(SCp->device->host); in NCR_700_start_command()
1472 SCp->device->host, SXFER_REG); 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()
1482 struct Scsi_Host *host = (struct Scsi_Host *)dev_id; in NCR_700_intr() local
1484 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_intr()
1496 spin_lock_irqsave(host->host_lock, flags); in NCR_700_intr()
1497 if((istat = NCR_700_readb(host, ISTAT_REG)) in NCR_700_intr()
1512 sstat0 = NCR_700_readb(host, SSTAT0_REG); in NCR_700_intr()
1518 dstat = NCR_700_readb(host, DSTAT_REG); in NCR_700_intr()
1521 dsps = NCR_700_readl(host, DSPS_REG); in NCR_700_intr()
1522 dsp = NCR_700_readl(host, DSP_REG); in NCR_700_intr()
1525 host->host_no, istat, sstat0, dstat, in NCR_700_intr()
1541host->host_no, SCp, SCp == NULL ? NULL : SCp->host_scribble, dsp, dsp - hostdata->pScript); in NCR_700_intr()
1543 scsi_report_bus_reset(host, 0); in NCR_700_intr()
1546 __shost_for_each_device(SDp, host) in NCR_700_intr()
1574 NCR_700_chip_setup(host); in NCR_700_intr()
1584 host->host_no, pun, lun)); in NCR_700_intr()
1594 __u32 temp = NCR_700_readl(host, TEMP_REG); in NCR_700_intr()
1595 …Ent_SendMessage/4] & 0xffffff) - ((NCR_700_readl(host, DBC_REG) & 0xffffff) + NCR_700_data_residua… in NCR_700_intr()
1596 … %p[%04x], phase %s\n", host->host_no, pun, lun, count, (void *)temp, temp - hostdata->pScript, sb… in NCR_700_intr()
1601 int data_transfer = NCR_700_readl(host, DBC_REG) & 0xffffff; in NCR_700_intr()
1603 int residual = NCR_700_data_residual(host); in NCR_700_intr()
1606 __u32 naddr = NCR_700_readl(host, DNAD_REG); in NCR_700_intr()
1609 host->host_no, pun, lun, in NCR_700_intr()
1614 host->host_no, pun, lun, in NCR_700_intr()
1634 …transfer mismatch pAddr=%lx, naddr=%lx, data_transfer=%d, residual=%d\n", host->host_no, pun, lun,… in NCR_700_intr()
1649 NCR_700_flush_fifo(host); in NCR_700_intr()
1651 __u8 sbcl = NCR_700_readb(host, SBCL_REG); in NCR_700_intr()
1653 host->host_no, pun, lun, dsp - hostdata->pScript, sbcl_to_string(sbcl)); in NCR_700_intr()
1654 NCR_700_internal_bus_reset(host); in NCR_700_intr()
1659 host->host_no, pun, lun); in NCR_700_intr()
1663 host->host_no, pun, lun); in NCR_700_intr()
1667 host->host_no, pun, lun)); in NCR_700_intr()
1668 resume_offset = process_script_interrupt(dsps, dsp, SCp, host, hostdata); in NCR_700_intr()
1672 host->host_no, pun, lun, in NCR_700_intr()
1677 host->host_no, pun, lun, dstat); in NCR_700_intr()
1703 resume_offset = process_selection(host, dsp); in NCR_700_intr()
1712 host->host_no, resume_offset, resume_offset - hostdata->pScript); in NCR_700_intr()
1717 NCR_700_clear_fifo(host); in NCR_700_intr()
1718 NCR_700_writel(resume_offset, host, DSP_REG); in NCR_700_intr()
1738 host->host_no, &hostdata->slots[j], in NCR_700_intr()
1747 spin_unlock_irqrestore(host->host_lock, flags); in NCR_700_intr()
1755 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; in NCR_700_queuecommand_lck()
1763 …printk(KERN_WARNING "scsi%d: Command depth has gone over queue depth\n", SCp->device->host->host_n… in NCR_700_queuecommand_lck()
1799 printk("53c700: scsi%d, command ", SCp->device->host->host_no); in NCR_700_queuecommand_lck()
1931 NCR_700_internal_bus_reset(SCp->device->host); in DEF_SCSI_QCMD()
1943 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; in NCR_700_bus_reset()
1952 spin_lock_irq(SCp->device->host->host_lock); in NCR_700_bus_reset()
1954 spin_unlock_irq(SCp->device->host->host_lock); in NCR_700_bus_reset()
1956 spin_lock_irq(SCp->device->host->host_lock); in NCR_700_bus_reset()
1960 NCR_700_internal_bus_reset(SCp->device->host); in NCR_700_bus_reset()
1962 spin_unlock_irq(SCp->device->host->host_lock); in NCR_700_bus_reset()
1964 spin_lock_irq(SCp->device->host->host_lock); in NCR_700_bus_reset()
1971 spin_unlock_irq(SCp->device->host->host_lock); in NCR_700_bus_reset()
1981 spin_lock_irq(SCp->device->host->host_lock); in NCR_700_host_reset()
1983 NCR_700_internal_bus_reset(SCp->device->host); in NCR_700_host_reset()
1984 NCR_700_chip_reset(SCp->device->host); in NCR_700_host_reset()
1986 spin_unlock_irq(SCp->device->host->host_lock); in NCR_700_host_reset()
2052 (struct NCR_700_Host_Parameters *)SDp->host->hostdata[0]; in NCR_700_slave_configure()