Lines Matching refs:host

172 STATIC void NCR_700_chip_setup(struct Scsi_Host *host);
173 STATIC void NCR_700_chip_reset(struct Scsi_Host *host);
245 struct Scsi_Host *host; in NCR_700_detect() local
295 if((host = scsi_register(tpnt, 4)) == NULL) in NCR_700_detect()
332 host->max_id = 7; in NCR_700_detect()
333 host->max_lun = NCR_700_MAX_LUNS; in NCR_700_detect()
334 host->unique_id = hostdata->base; in NCR_700_detect()
335 host->base = hostdata->base; in NCR_700_detect()
336 host->hostdata[0] = (unsigned long)hostdata; in NCR_700_detect()
338 NCR_700_writeb(0xff, host, CTEST9_REG); in NCR_700_detect()
340 hostdata->rev = (NCR_700_readb(host, CTEST8_REG)>>4) & 0x0f; in NCR_700_detect()
342 hostdata->rev = (NCR_700_readb(host, CTEST7_REG)>>4) & 0x0f; in NCR_700_detect()
343 hostdata->fast = (NCR_700_readb(host, CTEST9_REG) == 0); in NCR_700_detect()
348 printk(KERN_NOTICE "scsi%d: %s rev %d %s\n", host->host_no, in NCR_700_detect()
354 NCR_700_chip_reset(host); in NCR_700_detect()
356 return host; in NCR_700_detect()
360 NCR_700_release(struct Scsi_Host *host) in NCR_700_release() argument
363 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_release()
399 NCR_700_data_residual (struct Scsi_Host *host) { in NCR_700_data_residual() argument
401 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_data_residual()
406 count = ((NCR_700_readb(host, DFIFO_REG) & 0x7f) - in NCR_700_data_residual()
407 (NCR_700_readl(host, DBC_REG) & 0x7f)) & 0x7f; in NCR_700_data_residual()
409 count = ((NCR_700_readb(host, DFIFO_REG) & 0x3f) - in NCR_700_data_residual()
410 (NCR_700_readl(host, DBC_REG) & 0x3f)) & 0x3f; in NCR_700_data_residual()
414 synchronous = NCR_700_readb(host, SXFER_REG) & 0x0f; in NCR_700_data_residual()
417 ddir = NCR_700_readb(host, CTEST0_REG) & 0x01; in NCR_700_data_residual()
422 count += (NCR_700_readb(host, SSTAT2_REG) & 0xf0) >> 4; in NCR_700_data_residual()
424 if (NCR_700_readb(host, SSTAT1_REG) & SIDL_REG_FULL) in NCR_700_data_residual()
428 __u8 sstat = NCR_700_readb(host, SSTAT1_REG); in NCR_700_data_residual()
722 NCR_700_internal_bus_reset(struct Scsi_Host *host) in NCR_700_internal_bus_reset() argument
725 NCR_700_writeb(ASSERT_RST, host, SCNTL1_REG); in NCR_700_internal_bus_reset()
727 NCR_700_writeb(0, host, SCNTL1_REG); in NCR_700_internal_bus_reset()
732 NCR_700_chip_setup(struct Scsi_Host *host) in NCR_700_chip_setup() argument
735 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_chip_setup()
745 NCR_700_writeb(dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
747 host, DMODE_710_REG); in NCR_700_chip_setup()
749 DIFF : 0), host, CTEST7_REG); in NCR_700_chip_setup()
750 NCR_700_writeb(BTB_TIMER_DISABLE, host, CTEST0_REG); in NCR_700_chip_setup()
752 | AUTO_ATN, host, SCNTL0_REG); in NCR_700_chip_setup()
755 host, DMODE_700_REG); in NCR_700_chip_setup()
757 DIFF : 0, host, CTEST7_REG); in NCR_700_chip_setup()
761 | GENERATE_RECEIVE_PARITY, host, in NCR_700_chip_setup()
765 | PARITY | AUTO_ATN, host, SCNTL0_REG); in NCR_700_chip_setup()
769 NCR_700_writeb(1 << host->this_id, host, SCID_REG); in NCR_700_chip_setup()
770 NCR_700_writeb(0, host, SBCL_REG); in NCR_700_chip_setup()
771 NCR_700_writeb(ASYNC_OPERATION, host, SXFER_REG); in NCR_700_chip_setup()
774 | RST_INT | PAR_ERR_INT | SELECT_INT, host, SIEN_REG); in NCR_700_chip_setup()
776 NCR_700_writeb(ABORT_INT | INT_INST_INT | ILGL_INST_INT, host, DIEN_REG); in NCR_700_chip_setup()
777 NCR_700_writeb(ENABLE_SELECT, host, SCNTL1_REG); in NCR_700_chip_setup()
783 NCR_700_writeb(SYNC_DIV_2_0, host, SBCL_REG); in NCR_700_chip_setup()
784 NCR_700_writeb(ASYNC_DIV_3_0 | dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
789 NCR_700_writeb(SYNC_DIV_1_5, host, SBCL_REG); in NCR_700_chip_setup()
790 NCR_700_writeb(ASYNC_DIV_3_0 | dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
797 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG); in NCR_700_chip_setup()
798 NCR_700_writeb(ASYNC_DIV_2_0 | dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
803 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG); in NCR_700_chip_setup()
804 NCR_700_writeb(ASYNC_DIV_1_5 | dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
808 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG); in NCR_700_chip_setup()
809 NCR_700_writeb(ASYNC_DIV_1_0 | dcntl_extra, host, DCNTL_REG); in NCR_700_chip_setup()
826 NCR_700_chip_reset(struct Scsi_Host *host) in NCR_700_chip_reset() argument
829 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_chip_reset()
831 NCR_700_writeb(SOFTWARE_RESET_710, host, ISTAT_REG); in NCR_700_chip_reset()
834 NCR_700_writeb(0, host, ISTAT_REG); in NCR_700_chip_reset()
836 NCR_700_writeb(SOFTWARE_RESET, host, DCNTL_REG); in NCR_700_chip_reset()
839 NCR_700_writeb(0, host, DCNTL_REG); in NCR_700_chip_reset()
844 NCR_700_chip_setup(host); in NCR_700_chip_reset()
854 process_extended_message(struct Scsi_Host *host, in process_extended_message() argument
880 host->host_no, pun, lun, in process_extended_message()
891 host, SXFER_REG); in process_extended_message()
896 host->host_no); in process_extended_message()
908 host->host_no, pun, lun); in process_extended_message()
918 host->host_no, pun, lun, in process_extended_message()
930 NCR_700_writel(temp, host, TEMP_REG); in process_extended_message()
935 process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata, in process_message() argument
948 printk("scsi%d (%d:%d): message %s: ", host->host_no, pun, lun, in process_message()
957 resume_offset = process_extended_message(host, hostdata, SCp, in process_message()
969 …%d (%d:%d) Rejected first tag queue attempt, turning off tag queueing\n", host->host_no, pun, lun); in process_message()
976 host->host_no, pun, lun, in process_message()
983 printk(KERN_ERR "scsi%d (%d:%d) Parity Error!\n", host->host_no, in process_message()
985 NCR_700_internal_bus_reset(host); in process_message()
988 printk(KERN_INFO "scsi%d (%d:%d) SIMPLE TAG %d %s\n", host->host_no, in process_message()
995 host->host_no, pun, lun, in process_message()
1010 NCR_700_writel(temp, host, TEMP_REG); in process_message()
1018 struct Scsi_Host *host, in process_script_interrupt() argument
1042 …d (%d:%d) broken device is looping in contingent allegiance: ignoring\n", host->host_no, pun, lun); in process_script_interrupt()
1122 host->host_no, pun, lun, in process_script_interrupt()
1124 sbcl_to_string(NCR_700_readb(host, SBCL_REG))); in process_script_interrupt()
1128 NCR_700_internal_bus_reset(host); in process_script_interrupt()
1133 host->host_no, pun, lun, NCR_700_fatal_messages[i]); in process_script_interrupt()
1138 NCR_700_internal_bus_reset(host); in process_script_interrupt()
1144 host->host_no, pun, lun, in process_script_interrupt()
1158 host->host_no, reselection_id, lun)); in process_script_interrupt()
1170 host->host_no, reselection_id, lun, in process_script_interrupt()
1191 host->host_no); in process_script_interrupt()
1209 host, SXFER_REG); in process_script_interrupt()
1231 __u8 reselection_id = NCR_700_readb(host, SFBR_REG); in process_script_interrupt()
1235 reselection_id &= ~(1<<host->this_id); in process_script_interrupt()
1240host->host_no, reselection_id, lun, dsp, dsp - hostdata->pScript, hostdata->state, hostdata->comma… in process_script_interrupt()
1265 printk(KERN_ERR "scsi%d: Invalid reselection during selection!!\n", host->host_no); in process_script_interrupt()
1269 host->host_no); in process_script_interrupt()
1293 resume_offset = process_message(host, hostdata, SCp, in process_script_interrupt()
1298 host->host_no, pun, lun, NCR_700_condition[i], in process_script_interrupt()
1309 NCR_700_internal_bus_reset(host); in process_script_interrupt()
1312 host->host_no, pun, lun, dsps & 0xfff, dsp, dsp - hostdata->pScript); in process_script_interrupt()
1316 host->host_no, pun, lun, dsps, dsp - hostdata->pScript); in process_script_interrupt()
1317 NCR_700_internal_bus_reset(host); in process_script_interrupt()
1330 process_selection(struct Scsi_Host *host, __u32 dsp) in process_selection() argument
1336 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in process_selection()
1341 id = NCR_700_readb(host, hostdata->chip710 ? in process_selection()
1345 id &= ~(1<<host->this_id); in process_selection()
1350 sbcl = NCR_700_readb(host, SBCL_REG); in process_selection()
1358 host->host_no, id)); in process_selection()
1384 process_script_interrupt(A_GOOD_STATUS_AFTER_STATUS, dsp, SCp, host, hostdata); in process_selection()
1410 NCR_700_clear_fifo(struct Scsi_Host *host) { in NCR_700_clear_fifo() argument
1412 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_clear_fifo()
1414 NCR_700_writeb(CLR_FIFO_710, host, CTEST8_REG); in NCR_700_clear_fifo()
1416 NCR_700_writeb(CLR_FIFO, host, DFIFO_REG); in NCR_700_clear_fifo()
1421 NCR_700_flush_fifo(struct Scsi_Host *host) { in NCR_700_flush_fifo() argument
1423 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_flush_fifo()
1425 NCR_700_writeb(FLUSH_DMA_FIFO_710, host, CTEST8_REG); in NCR_700_flush_fifo()
1427 NCR_700_writeb(0, host, CTEST8_REG); in NCR_700_flush_fifo()
1429 NCR_700_writeb(FLUSH_DMA_FIFO, host, DFIFO_REG); in NCR_700_flush_fifo()
1431 NCR_700_writeb(0, host, DFIFO_REG); in NCR_700_flush_fifo()
1442 (struct NCR_700_Host_Parameters *)SCp->host->hostdata[0]; in NCR_700_start_command()
1456 SCp->host->host_no, slot->cmnd, slot)); in NCR_700_start_command()
1505 NCR_700_clear_fifo(SCp->host); in NCR_700_start_command()
1517 SCp->host, SXFER_REG); in NCR_700_start_command()
1518 NCR_700_writel(slot->temp, SCp->host, TEMP_REG); in NCR_700_start_command()
1519 NCR_700_writel(slot->resume_offset, SCp->host, DSP_REG); in NCR_700_start_command()
1533 struct Scsi_Host *host = (struct Scsi_Host *)dev_id; in NCR_700_intr() local
1535 (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_intr()
1553 if((istat = NCR_700_readb(host, ISTAT_REG)) in NCR_700_intr()
1567 sstat0 = NCR_700_readb(host, SSTAT0_REG); in NCR_700_intr()
1573 dstat = NCR_700_readb(host, DSTAT_REG); in NCR_700_intr()
1576 dsps = NCR_700_readl(host, DSPS_REG); in NCR_700_intr()
1577 dsp = NCR_700_readl(host, DSP_REG); in NCR_700_intr()
1580 host->host_no, istat, sstat0, dstat, in NCR_700_intr()
1596host->host_no, SCp, SCp == NULL ? NULL : SCp->host_scribble, dsp, dsp - hostdata->pScript); in NCR_700_intr()
1599 for(SDp = host->host_queue; SDp != NULL; SDp = SDp->next) in NCR_700_intr()
1627 NCR_700_chip_setup(host); in NCR_700_intr()
1634 host->host_no, pun, lun)); in NCR_700_intr()
1644 __u32 temp = NCR_700_readl(host, TEMP_REG); in NCR_700_intr()
1645 …Ent_SendMessage/4] & 0xffffff) - ((NCR_700_readl(host, DBC_REG) & 0xffffff) + NCR_700_data_residua… in NCR_700_intr()
1646 … %p[%04x], phase %s\n", host->host_no, pun, lun, count, (void *)temp, temp - hostdata->pScript, sb… in NCR_700_intr()
1651 int data_transfer = NCR_700_readl(host, DBC_REG) & 0xffffff; in NCR_700_intr()
1653 int residual = NCR_700_data_residual(host); in NCR_700_intr()
1656 __u32 naddr = NCR_700_readl(host, DNAD_REG); in NCR_700_intr()
1659 host->host_no, pun, lun, in NCR_700_intr()
1664 host->host_no, pun, lun, in NCR_700_intr()
1684 …transfer mismatch pAddr=%lx, naddr=%lx, data_transfer=%d, residual=%d\n", host->host_no, pun, lun,… in NCR_700_intr()
1699 NCR_700_flush_fifo(host); in NCR_700_intr()
1701 __u8 sbcl = NCR_700_readb(host, SBCL_REG); in NCR_700_intr()
1703 host->host_no, pun, lun, dsp - hostdata->pScript, sbcl_to_string(sbcl)); in NCR_700_intr()
1704 NCR_700_internal_bus_reset(host); in NCR_700_intr()
1709 host->host_no, pun, lun); in NCR_700_intr()
1713 host->host_no, pun, lun); in NCR_700_intr()
1717 host->host_no, pun, lun)); in NCR_700_intr()
1718 resume_offset = process_script_interrupt(dsps, dsp, SCp, host, hostdata); in NCR_700_intr()
1722 host->host_no, pun, lun, in NCR_700_intr()
1727 host->host_no, pun, lun, dstat); in NCR_700_intr()
1753 resume_offset = process_selection(host, dsp); in NCR_700_intr()
1762 host->host_no, resume_offset, resume_offset - hostdata->pScript); in NCR_700_intr()
1767 NCR_700_clear_fifo(host); in NCR_700_intr()
1768 NCR_700_writel(resume_offset, host, DSP_REG); in NCR_700_intr()
1788 host->host_no, &hostdata->slots[j], in NCR_700_intr()
1809 struct Scsi_Host *host = scsi_hostlist; in NCR_700_proc_directory_info() local
1813 while(host != NULL && host->host_no != host_no) in NCR_700_proc_directory_info()
1814 host = host->next; in NCR_700_proc_directory_info()
1816 if(host == NULL) in NCR_700_proc_directory_info()
1823 hostdata = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_proc_directory_info()
1828 for(SDp = host->host_queue; SDp != NULL; SDp = SDp->next) { in NCR_700_proc_directory_info()
1843 (struct NCR_700_Host_Parameters *)SCp->host->hostdata[0]; in NCR_700_queuecommand()
1852 printk(KERN_WARNING "scsi%d: Command depth has gone over queue depth\n", SCp->host->host_no); in NCR_700_queuecommand()
1857 SCp->host->host_no, SCp->target, SCp->lun, in NCR_700_queuecommand()
1863 SCp->host->host_no, SCp->target, SCp->lun, in NCR_700_queuecommand()
1882 printk("53c700: scsi%d, command ", SCp->host->host_no); in NCR_700_queuecommand()
1894 …printk(KERN_INFO "scsi%d: (%d:%d) Enabling Tag Command Queuing\n", SCp->device->host->host_no, SCp… in NCR_700_queuecommand()
1913 …printk(KERN_WARNING "scsi%d (%d:%d) Target is suffering from tag starvation.\n", SCp->host->host_n… in NCR_700_queuecommand()
1945 …printk(KERN_ERR "scsi%d (%d:%d) ITLQ_back is not NULL!!!!\n", SCp->host->host_no, SCp->target, SCp… in NCR_700_queuecommand()
1963 SCp->host->host_no, SCp->target, SCp->lun); in NCR_700_queuecommand()
2066 (struct NCR_700_Host_Parameters *)SCp->host->hostdata[0]; in NCR_700_abort()
2069 SCp->host->host_no, SCp->target, SCp->lun); in NCR_700_abort()
2090 NCR_700_internal_bus_reset(SCp->host); in NCR_700_abort()
2101 SCp->host->host_no, SCp->target, SCp->lun, SCp); in NCR_700_bus_reset()
2103 NCR_700_internal_bus_reset(SCp->host); in NCR_700_bus_reset()
2111 SCp->host->host_no, SCp->target, SCp->lun); in NCR_700_dev_reset()
2121 SCp->host->host_no, SCp->target, SCp->lun); in NCR_700_host_reset()
2124 NCR_700_internal_bus_reset(SCp->host); in NCR_700_host_reset()
2125 NCR_700_chip_reset(SCp->host); in NCR_700_host_reset()