Lines Matching refs:host
248 static void dump_events (struct Scsi_Host *host, int count);
249 static Scsi_Cmnd * return_outstanding_commands (struct Scsi_Host *host,
251 static void hard_reset (struct Scsi_Host *host);
252 static void ncr_scsi_reset (struct Scsi_Host *host);
253 static void print_lots (struct Scsi_Host *host);
254 static void set_synchronous (struct Scsi_Host *host, int target, int sxfer,
256 static int datapath_residual (struct Scsi_Host *host);
259 static void print_queues (struct Scsi_Host *host);
261 static int shutdown (struct Scsi_Host *host);
263 static int disable (struct Scsi_Host *host);
264 static int NCR53c8xx_run_tests (struct Scsi_Host *host);
269 static int ncr_halt (struct Scsi_Host *host);
270 static void intr_phase_mismatch (struct Scsi_Host *host, struct NCR53c7x0_cmd
272 static void intr_dma (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd);
273 static void print_dsa (struct Scsi_Host *host, u32 *dsa,
275 static int print_insn (struct Scsi_Host *host, const u32 *insn,
279 static void NCR53c8x0_init_fixup (struct Scsi_Host *host);
280 static int NCR53c8x0_dstat_sir_intr (struct Scsi_Host *host, struct
282 static void NCR53c8x0_soft_reset (struct Scsi_Host *host);
522 issue_to_cmd (struct Scsi_Host *host, struct NCR53c7x0_hostdata *hostdata, in issue_to_cmd() argument
658 find_host (int host) { in find_host() argument
660 for (h = first_host; h && h->host_no != host; h = h->next); in find_host()
662 printk (KERN_ALERT "scsi%d not found\n", host); in find_host()
665 printk (KERN_ALERT "scsi%d is not a NCR board\n", host); in find_host()
686 request_synchronous (int host, int target) { in request_synchronous() argument
694 if (!(h = find_host (host))) in request_synchronous()
732 request_disconnect (int host, int on_or_off) { in request_disconnect() argument
735 if (!(h = find_host (host))) in request_disconnect()
756 NCR53c7x0_driver_init (struct Scsi_Host *host) { in NCR53c7x0_driver_init() argument
758 host->hostdata; in NCR53c7x0_driver_init()
765 set_synchronous (host, i, /* sxfer */ 0, hostdata->saved_scntl3, 0); in NCR53c7x0_driver_init()
771 i < host->can_queue; ++i, curr += 2) { in NCR53c7x0_driver_init()
856 NCR53c7x0_init (struct Scsi_Host *host) { in NCR53c7x0_init() argument
860 host->hostdata; in NCR53c7x0_init()
878 NCR53c7x0_local_setup(host); in NCR53c7x0_init()
884 host->max_id = 15; in NCR53c7x0_init()
901 host->host_no, hostdata->chip); in NCR53c7x0_init()
902 scsi_unregister (host); in NCR53c7x0_init()
916 printk ("scsi%d : using %s mapped access\n", host->host_no, in NCR53c7x0_init()
927 ncr_halt(host); in NCR53c7x0_init()
939 for (host->this_id = 0; tmp != 1; tmp >>=1, ++host->this_id); in NCR53c7x0_init()
941 host->this_id = NCR53c7x0_read8(SCID_REG) & 15; in NCR53c7x0_init()
942 if (host->this_id == 0) in NCR53c7x0_init()
943 host->this_id = 7; /* sanitize hostid---0 doesn't make sense */ in NCR53c7x0_init()
944 hostdata->this_id_mask = 1 << host->this_id; in NCR53c7x0_init()
952 if (!host->this_id) { in NCR53c7x0_init()
954 host->host_no, host->this_id); in NCR53c7x0_init()
955 host->this_id = 7; in NCR53c7x0_init()
960 if (expected_id == -1 || host->this_id != expected_id) in NCR53c7x0_init()
961 printk("scsi%d : using initiator ID %d\n", host->host_no, in NCR53c7x0_init()
962 host->this_id); in NCR53c7x0_init()
1011 printk ("scsi%d : burst mode disabled\n", host->host_no); in NCR53c7x0_init()
1020 printk ("scsi%d : burst length %d\n", host->host_no, i); in NCR53c7x0_init()
1037 host->host_no, expected_ccf, ccf); in NCR53c7x0_init()
1055 host->host_no, ccf); in NCR53c7x0_init()
1061 printk ("scsi%d : using %dMHz SCSI clock\n", host->host_no, in NCR53c7x0_init()
1068 hostdata->init_save_regs (host); in NCR53c7x0_init()
1070 hostdata->init_fixup (host); in NCR53c7x0_init()
1073 the_template = host->hostt; in NCR53c7x0_init()
1074 first_host = host; in NCR53c7x0_init()
1087 hostdata->soft_reset (host); in NCR53c7x0_init()
1099 NCR53c7x0_driver_init (host); in NCR53c7x0_init()
1107 search->irq == host->irq && search != host); search=search->next); in NCR53c7x0_init()
1111 if (request_irq(host->irq, do_NCR53c7x0_intr, SA_SHIRQ, "53c7,8xx", NULL)) in NCR53c7x0_init()
1113 if (request_irq(host->irq, do_NCR53c7x0_intr, SA_INTERRUPT, "53c7,8xx", NULL)) in NCR53c7x0_init()
1123 host->host_no, host->irq); in NCR53c7x0_init()
1124 scsi_unregister (host); in NCR53c7x0_init()
1129 host->host_no, search->host_no); in NCR53c7x0_init()
1133 if ((hostdata->run_tests && hostdata->run_tests(host) == -1) || in NCR53c7x0_init()
1136 scsi_unregister (host); in NCR53c7x0_init()
1139 if (host->io_port) { in NCR53c7x0_init()
1140 host->n_io_port = 128; in NCR53c7x0_init()
1141 request_region (host->io_port, host->n_io_port, "ncr53c7,8xx"); in NCR53c7x0_init()
1146 printk ("scsi%d : bus wedge, doing SCSI reset\n", host->host_no); in NCR53c7x0_init()
1147 hard_reset (host); in NCR53c7x0_init()
1596 NCR53c8x0_init_fixup (struct Scsi_Host *host) { in NCR53c8x0_init_fixup() argument
1599 host->hostdata; in NCR53c8x0_init_fixup()
1606 NCR53c7x0_local_setup(host); in NCR53c8x0_init_fixup()
1663 base = (u32) host->io_port; in NCR53c8x0_init_fixup()
1667 base = virt_to_bus((void *)host->base); in NCR53c8x0_init_fixup()
1792 host->host_no, A_dsa_fields_start, Ent_dsa_code_template_end - in NCR53c8x0_init_fixup()
1803 printk("scsi%d : NCR code relocated to 0x%lx (virt 0x%p)\n", host->host_no, in NCR53c8x0_init_fixup()
1823 NCR53c8xx_run_tests (struct Scsi_Host *host) { in NCR53c8xx_run_tests() argument
1826 host->hostdata; in NCR53c8xx_run_tests()
1831 NCR53c7x0_local_setup(host); in NCR53c8xx_run_tests()
1838 printk ("scsi%d : chip not idle, aborting tests\n", host->host_no); in NCR53c8xx_run_tests()
1857 printk ("scsi%d : test 1", host->host_no); in NCR53c8xx_run_tests()
1877 printk ("scsi%d : driver test 1 timed out%s\n",host->host_no , in NCR53c8xx_run_tests()
1889 host->host_no, hostdata->test_completed); in NCR53c8xx_run_tests()
1897 host->host_no, hostdata->test_dest); in NCR53c8xx_run_tests()
1902 host->host_no, bus_to_virt(NCR53c7x0_read32(DSP_REG)), in NCR53c8xx_run_tests()
1904 printk ("scsi%d : DSPS = 0x%x\n", host->host_no, in NCR53c8xx_run_tests()
1939 printk ("scsi%d : chip not idle, aborting tests\n", host->host_no); in NCR53c8xx_run_tests()
1965 host->host_no, i, data + 8); in NCR53c8xx_run_tests()
1966 printk ("scsi%d : status ", host->host_no); in NCR53c8xx_run_tests()
1968 printk ("\nscsi%d : message ", host->host_no); in NCR53c8xx_run_tests()
1973 host->host_no, i); in NCR53c8xx_run_tests()
1975 printk("scsi%d : not idle\n", host->host_no); in NCR53c8xx_run_tests()
1980 printk ("scsi%d : test 2 timed out\n", host->host_no); in NCR53c8xx_run_tests()
2005 struct Scsi_Host *host = c->host; in NCR53c8xx_dsa_fixup() local
2007 host->hostdata; in NCR53c8xx_dsa_fixup()
2122 struct Scsi_Host *host = c->host; in abnormal_finished() local
2124 host->hostdata; in abnormal_finished()
2132 printk ("scsi%d: abnormal finished\n", host->host_no); in abnormal_finished()
2145 for (found = 0, left = host->can_queue, curr = hostdata->schedule; in abnormal_finished()
2148 if (issue_to_cmd (host, hostdata, (u32 *) curr) == cmd) in abnormal_finished()
2165 for (left = host->can_queue, in abnormal_finished()
2176 host->host_no); in abnormal_finished()
2180 host->host_no, c->pid); in abnormal_finished()
2196 for (left = host->can_queue, linux_search = hostdata->running_list, in abnormal_finished()
2204 host->host_no, c->pid); in abnormal_finished()
2236 intr_break (struct Scsi_Host *host, struct in intr_break() argument
2245 host->hostdata; in intr_break()
2247 NCR53c7x0_local_setup(host); in intr_break()
2261 host->host_no, dsp); in intr_break()
2318 set_synchronous (struct Scsi_Host *host, int target, int sxfer, int scntl3, in set_synchronous() argument
2322 host->hostdata; in set_synchronous()
2324 NCR53c7x0_local_setup(host); in set_synchronous()
2374 host->host_no, target, sxfer, scntl3); in set_synchronous()
2396 asynchronous (struct Scsi_Host *host, int target) { in asynchronous() argument
2399 host->hostdata; in asynchronous()
2400 NCR53c7x0_local_setup(host); in asynchronous()
2401 set_synchronous (host, target, /* no offset */ 0, hostdata->saved_scntl3, in asynchronous()
2404 host->host_no, target); in asynchronous()
2447 synchronous (struct Scsi_Host *host, int target, char *msg) { in synchronous() argument
2449 host->hostdata; in synchronous()
2466 host->host_no, divisor / 10, divisor % 10); in synchronous()
2473 host->host_no, syncs[i].div / 10, syncs[i].div % 10); in synchronous()
2478 printk("scsi%d : selected synchronous period of %dns\n", host->host_no, in synchronous()
2486 host->host_no, (int) sxfer, (int) scntl3); in synchronous()
2487 set_synchronous (host, target, sxfer, scntl3, 1); in synchronous()
2488 sprintf (buf, "scsi%d : setting target %d to ", host->host_no, target); in synchronous()
2506 NCR53c8x0_dstat_sir_intr (struct Scsi_Host *host, struct in NCR53c8x0_dstat_sir_intr() argument
2512 host->hostdata; in NCR53c8x0_dstat_sir_intr()
2514 NCR53c7x0_local_setup(host); in NCR53c8x0_dstat_sir_intr()
2519 printk ("scsi%d : DSPS = 0x%x\n", host->host_no, dsps); in NCR53c8x0_dstat_sir_intr()
2534 printk ("scsi%d : target %d rejected SDTR\n", host->host_no, in NCR53c8x0_dstat_sir_intr()
2537 asynchronous (host, c->target); in NCR53c8x0_dstat_sir_intr()
2543 host->host_no); in NCR53c8x0_dstat_sir_intr()
2551 host->host_no); in NCR53c8x0_dstat_sir_intr()
2557 printk ("scsi%d : received message", host->host_no); in NCR53c8x0_dstat_sir_intr()
2579 sprintf (buf, "scsi%d : target %d %s ", host->host_no, c->target, in NCR53c8x0_dstat_sir_intr()
2594 synchronous (host, c->target, (unsigned char *) in NCR53c8x0_dstat_sir_intr()
2597 asynchronous (host, c->target); in NCR53c8x0_dstat_sir_intr()
2605 synchronous (host, c->target, (unsigned char *) in NCR53c8x0_dstat_sir_intr()
2609 asynchronous (host, c->target); in NCR53c8x0_dstat_sir_intr()
2629 printk ("scsi%d : unexpected phase\n", host->host_no); in NCR53c8x0_dstat_sir_intr()
2632 printk ("scsi%d : selected by target %d\n", host->host_no, in NCR53c8x0_dstat_sir_intr()
2640 host->host_no, (int) NCR53c7x0_read8(SDID_REG_800) & 7, in NCR53c8x0_dstat_sir_intr()
2659 printk ("scsi%d : CHECK CONDITION\n", host->host_no); in NCR53c8x0_dstat_sir_intr()
2662 host->host_no); in NCR53c8x0_dstat_sir_intr()
2740 printk("scsi%d : test%d complete\n", host->host_no, in NCR53c8x0_dstat_sir_intr()
2756 host->host_no, NCR53c7x0_read32(DSA_REG), dsa); in NCR53c8x0_dstat_sir_intr()
2758 host->host_no, cmd->saved_data_pointer, in NCR53c8x0_dstat_sir_intr()
2760 print_insn (host, hostdata->script + Ent_reselected_ok / in NCR53c8x0_dstat_sir_intr()
2763 host->host_no, NCR53c7x0_read8(SXFER_REG), in NCR53c8x0_dstat_sir_intr()
2766 print_insn (host, (u32 *) in NCR53c8x0_dstat_sir_intr()
2768 print_insn (host, (u32 *) in NCR53c8x0_dstat_sir_intr()
2788 host->host_no, virt_to_bus(dsa), dsa); in NCR53c8x0_dstat_sir_intr()
2791 host->host_no, cmd->saved_data_pointer, in NCR53c8x0_dstat_sir_intr()
2794 printk("scsi%d : template code :\n", host->host_no); in NCR53c8x0_dstat_sir_intr()
2797 code += print_insn (host, code, "", 1)); in NCR53c8x0_dstat_sir_intr()
2800 print_insn (host, hostdata->script + Ent_reselected_ok / in NCR53c8x0_dstat_sir_intr()
2816 host->host_no, virt_to_bus(dsa), dsa); in NCR53c8x0_dstat_sir_intr()
2820 host->host_no, cmd->saved_data_pointer, in NCR53c8x0_dstat_sir_intr()
2831 host->host_no, NCR53c7x0_read32(DSA_REG), in NCR53c8x0_dstat_sir_intr()
2839 printk("scsi%d : idle\n", host->host_no); in NCR53c8x0_dstat_sir_intr()
2853 printk("scsi%d : DSA loaded with 0x%x (virt 0x%p)\n", host->host_no, in NCR53c8x0_dstat_sir_intr()
2864 host->host_no, (int) NCR53c7x0_read8(SDID_REG_800) & ~0x80, in NCR53c8x0_dstat_sir_intr()
2866 print_queues(host); in NCR53c8x0_dstat_sir_intr()
2875 host->host_no, c->target, c->lun); in NCR53c8x0_dstat_sir_intr()
2878 host->host_no); in NCR53c8x0_dstat_sir_intr()
2887 host->host_no); in NCR53c8x0_dstat_sir_intr()
2888 print_queues(host); in NCR53c8x0_dstat_sir_intr()
2891 host->host_no, NCR53c7x0_read8(SXFER_REG), in NCR53c8x0_dstat_sir_intr()
2895 print_insn (host, (u32 *) in NCR53c8x0_dstat_sir_intr()
2897 print_insn (host, (u32 *) in NCR53c8x0_dstat_sir_intr()
2905 printk("scsi%d : int_debug_panic received\n", host->host_no); in NCR53c8x0_dstat_sir_intr()
2906 print_lots (host); in NCR53c8x0_dstat_sir_intr()
2914 host->host_no, cmd->saved_data_pointer, in NCR53c8x0_dstat_sir_intr()
2927 host->host_no, cmd->saved_data_pointer, bus_to_virt ( in NCR53c8x0_dstat_sir_intr()
2929 size = print_insn (host, (u32 *) in NCR53c8x0_dstat_sir_intr()
2931 size = print_insn (host, (u32 *) in NCR53c8x0_dstat_sir_intr()
2937 host->host_no, datapath_residual (host)) ; in NCR53c8x0_dstat_sir_intr()
2952 host->host_no, sxfer, scntl3); in NCR53c8x0_dstat_sir_intr()
2958 host->host_no, (int) sxfer, (int) scntl3); in NCR53c8x0_dstat_sir_intr()
2969 host->host_no, sbcl_to_phase (NCR53c7x0_read8 (SBCL_REG)), in NCR53c8x0_dstat_sir_intr()
2972 datapath_residual (host)) ; in NCR53c8x0_dstat_sir_intr()
2973 print_insn (host, dsp, "", 1); in NCR53c8x0_dstat_sir_intr()
2974 size = print_insn (host, (u32 *) bus_to_virt(le32_to_cpu(dsp[1])), "", 1); in NCR53c8x0_dstat_sir_intr()
2975 print_insn (host, (u32 *) bus_to_virt(le32_to_cpu(dsp[1])) + size, "", 1); in NCR53c8x0_dstat_sir_intr()
2993 host->host_no, sdid, c->target, where); in NCR53c8x0_dstat_sir_intr()
2994 print_lots(host); in NCR53c8x0_dstat_sir_intr()
2995 dump_events (host, 20); in NCR53c8x0_dstat_sir_intr()
3004 host->host_no, dsps); in NCR53c8x0_dstat_sir_intr()
3041 host->host_no, (unsigned) dsps); in NCR53c8x0_dstat_sir_intr()
3101 static int debugger_fn_bc (struct Scsi_Host *host, struct debugger_token *token, in debugger_fn_bc() argument
3134 debugger_fn_bl (struct Scsi_Host *host, struct debugger_token *token, in debugger_fn_bl() argument
3137 host->hostdata; in debugger_fn_bl()
3149 host->host_no); in debugger_fn_bl()
3150 debugger_kernel_write (host, buf, strlen(buf)); in debugger_fn_bl()
3154 for (bp = (struct NCR53c7x0_break *) host->breakpoints; in debugger_fn_bl()
3166 debugger_kernel_write (host, buf, len); in debugger_fn_bl()
3173 debugger_fn_bs (struct Scsi_Host *host, struct debugger_token *token, in debugger_fn_bs() argument
3176 host->hostdata; in debugger_fn_bs()
3185 sprintf (buf, "scsi%d : bs : failure : NCR not halted\n", host->host_no); in debugger_fn_bs()
3186 debugger_kernel_write (host, buf, strlen(buf)); in debugger_fn_bs()
3193 host->host_no, sizeof(struct NCR53c7x0_break)); in debugger_fn_bs()
3226 for (dev = MINOR(inode->rdev), host = first_host; in inode_to_host()
3227 (host->hostt == the_template); --dev, host = host->next) in inode_to_host()
3228 if (!dev) return host; in inode_to_host()
3236 struct Scsi_Host *host; /* This SCSI host */ in debugger_user_write() local
3243 if (!(host = inode_to_host(inode))) in debugger_user_write()
3246 hostdata = (struct NCR53c7x0_hostdata *) host->hostdata; in debugger_user_write()
3294 debugger_kernel_write (struct Scsi_Host *host, char *buf, size_t in debugger_kernel_write() argument
3297 host->hostdata; in debugger_kernel_write()
3332 NCR53c8x0_soft_reset (struct Scsi_Host *host) { in NCR53c8x0_soft_reset() argument
3335 host->hostdata; in NCR53c8x0_soft_reset()
3336 NCR53c7x0_local_setup(host); in NCR53c8x0_soft_reset()
3363 NCR53c7x0_write8(SCID_REG, (host->this_id & 7)|SCID_800_RRE|SCID_800_SRE); in NCR53c8x0_soft_reset()
3365 NCR53c7x0_write8(SCID_REG, (host->this_id & 7)|SCID_800_RRE); in NCR53c8x0_soft_reset()
3439 struct Scsi_Host *host = cmd->host; in allocate_cmd() local
3441 (struct NCR53c7x0_hostdata *) host->hostdata; in allocate_cmd()
3450 host->host_no, hostdata->num_cmds, host->can_queue, in allocate_cmd()
3463 if ((hostdata->extra_allocate + hostdata->num_cmds) < host->can_queue) in allocate_cmd()
3464 hostdata->extra_allocate += host->cmd_per_lun; in allocate_cmd()
3478 host->host_no, size); in allocate_cmd()
3500 host->host_no, cmd->target, cmd->lun); in allocate_cmd()
3521 struct Scsi_Host *host = cmd->host; in create_cmd() local
3523 host->hostdata; in create_cmd()
3536 NCR53c7x0_local_setup(cmd->host); in create_cmd()
3563 printk("scsi%d : command is ", host->host_no); in create_cmd()
3567 printk ("scsi%d : %d scatter/gather segments\n", host->host_no, in create_cmd()
3678 host->host_no, hostdata->sync[cmd->target].select_indirect); in create_cmd()
3679 FATAL(host); in create_cmd()
3808 print_insn (host, cmd_datain, "dynamic ", 1); in create_cmd()
3809 print_insn (host, cmd_datain + 2, "dynamic ", 1); in create_cmd()
3823 print_insn (host, cmd_dataout, "dynamic ", 1); in create_cmd()
3824 print_insn (host, cmd_dataout + 2, "dynamic ", 1); in create_cmd()
3841 print_insn (host, cmd_datain, "dynamic jump ", 1); in create_cmd()
3858 print_insn (host, cmd_dataout, "dynamic jump ", 1); in create_cmd()
3888 struct Scsi_Host *host = cmd->host; in NCR53c7xx_queue_command() local
3890 (struct NCR53c7x0_hostdata *) host->hostdata; in NCR53c7xx_queue_command()
3904 || cmd->target > host->max_id in NCR53c7xx_queue_command()
3905 || cmd->target == host->this_id in NCR53c7xx_queue_command()
3907 printk("scsi%d : disabled or bad target %d lun %d\n", host->host_no, in NCR53c7xx_queue_command()
3912 printk("scsi%d : maximum commands exceeded\n", host->host_no); in NCR53c7xx_queue_command()
3919 host->host_no); in NCR53c7xx_queue_command()
3971 to_schedule_list (struct Scsi_Host *host, struct NCR53c7x0_hostdata *hostdata, in to_schedule_list() argument
3980 NCR53c7x0_local_setup(host); in to_schedule_list()
3982 printk("scsi%d : new dsa is 0x%lx (virt 0x%p)\n", host->host_no, in to_schedule_list()
3995 printk("scsi%d : driver disabled\n", host->host_no); in to_schedule_list()
4004 for (i = host->can_queue, curr = hostdata->schedule; in to_schedule_list()
4024 printk ("scsi%d: no free slot\n", host->host_no); in to_schedule_list()
4025 disable(host); in to_schedule_list()
4061 busyp (struct Scsi_Host *host, struct NCR53c7x0_hostdata *hostdata, in busyp() argument
4089 struct Scsi_Host *host; in process_issue_queue() local
4107 for (host = first_host; host && host->hostt == the_template; in process_issue_queue()
4108 host = host->next) { in process_issue_queue()
4109 hostdata = (struct NCR53c7x0_hostdata *) host->hostdata; in process_issue_queue()
4130 !busyp (host, hostdata, tmp)) { in process_issue_queue()
4140 host->host_no, tmp->target, tmp->lun); in process_issue_queue()
4143 to_schedule_list (host, hostdata, in process_issue_queue()
4151 host->host_no); in process_issue_queue()
4153 disable (host); in process_issue_queue()
4179 intr_scsi (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) { in intr_scsi() argument
4182 (struct NCR53c7x0_hostdata *) host->hostdata; in intr_scsi()
4188 NCR53c7x0_local_setup(host); in intr_scsi()
4203 printk ("scsi%d : SIST0 0x%0x, SIST1 0x%0x\n", host->host_no, in intr_scsi()
4211 printk ("scsi%d : Selection Timeout\n", host->host_no); in intr_scsi()
4214 host->host_no, cmd->cmd->target, cmd->cmd->lun); in intr_scsi()
4216 printk("scsi%d : dsp = 0x%x (virt 0x%p)\n", host->host_no, in intr_scsi()
4220 printk("scsi%d : no command\n", host->host_no); in intr_scsi()
4252 host->host_no, cmd->cmd->target, cmd->cmd->lun); in intr_scsi()
4253 print_lots (host); in intr_scsi()
4257 host->host_no); in intr_scsi()
4268 host->host_no, cmd->cmd->target, cmd->cmd->lun); in intr_scsi()
4271 printk("scsi%d : parity error\n", host->host_no); in intr_scsi()
4283 printk("scsi%d : gross error\n", host->host_no); in intr_scsi()
4314 printk ("scsi%d : SSTAT0_MA\n", host->host_no); in intr_scsi()
4315 intr_phase_mismatch (host, cmd); in intr_scsi()
4320 printk ("scsi%d : Oh no Mr. Bill!\n", host->host_no); in intr_scsi()
4336 printk ("scsi%d : DMA FIFO not empty\n", host->host_no); in intr_scsi()
4339 host->host_no); in intr_scsi()
4382 struct Scsi_Host *host; /* Host we are looking at */ in NCR53c7x0_intr() local
4403 for (host = first_host; host; host = host->next) in NCR53c7x0_intr()
4404 if (host->hostt == the_template && host->irq == irq) { in NCR53c7x0_intr()
4405 NCR53c7x0_local_setup(host); in NCR53c7x0_intr()
4407 hostdata = (struct NCR53c7x0_hostdata *) host->hostdata; in NCR53c7x0_intr()
4445 printk ("scsi%d : INTFLY\n", host->host_no); in NCR53c7x0_intr()
4466 printk("scsi%d : very weird.\n", host->host_no); in NCR53c7x0_intr()
4472 host->host_no); in NCR53c7x0_intr()
4477 host->host_no, cmd->cmd->result); in NCR53c7x0_intr()
4504 host->host_no, tmp->pid, tmp->target, tmp->lun, tmp->result); in NCR53c7x0_intr()
4526 host->host_no); in NCR53c7x0_intr()
4541 host->host_no); in NCR53c7x0_intr()
4566 host->host_no, cmd->cmd->pid, (int) cmd->cmd->target, in NCR53c7x0_intr()
4570 printk("scsi%d : no active command\n", host->host_no); in NCR53c7x0_intr()
4575 printk ("scsi%d : ISTAT_SIP\n", host->host_no); in NCR53c7x0_intr()
4576 intr_scsi (host, cmd); in NCR53c7x0_intr()
4581 printk ("scsi%d : ISTAT_DIP\n", host->host_no); in NCR53c7x0_intr()
4582 intr_dma (host, cmd); in NCR53c7x0_intr()
4592 printk ("scsi%d : DMA FIFO not empty\n", host->host_no); in NCR53c7x0_intr()
4595 host->host_no); in NCR53c7x0_intr()
4615 printk("scsi%d : too many interrupts, halting", host->host_no); in NCR53c7x0_intr()
4616 disable(host); in NCR53c7x0_intr()
4628 host->host_no, virt_to_bus(hostdata->dsp), hostdata->dsp); in NCR53c7x0_intr()
4652 abort_connected (struct Scsi_Host *host) { in abort_connected() argument
4657 host->hostdata; in abort_connected()
4664 NCR53c7x0_local_setup(host); in abort_connected()
4668 disable(host); in abort_connected()
4673 host->host_no); in abort_connected()
4724 datapath_residual (struct Scsi_Host *host) {
4727 host->hostdata;
4729 NCR53c7x0_local_setup(host);
4830 intr_phase_mismatch (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {
4835 host->hostdata;
4840 NCR53c7x0_local_setup(host);
4895 residual = datapath_residual (host);
4898 host->host_no, residual);
4958 host->host_no, cmd->cmd->target);
5002 host->host_no);
5017 host->host_no, where ? where : "unknown location",
5019 print_lots (host);
5022 abort_connected (host);
5030 printk("scsi%d: new dsp 0x%p\n", host->host_no, hostdata->dsp);
5031 print_insn (host, hostdata->dsp, "", 1);
5048 intr_bf (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {
5051 host->hostdata;
5064 NCR53c7x0_local_setup(host);
5104 host->host_no, tmp);
5114 host->host_no, reason ? reason : "unknown");
5115 print_lots (host);
5133 FATAL (host);
5149 intr_dma (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {
5152 host->hostdata;
5160 NCR53c7x0_local_setup(host);
5170 printk("scsi%d : DSTAT=0x%x\n", host->host_no, (int) dstat);
5198 " ", host->host_no);
5199 print_insn (host, dsp, KERN_ALERT "s ", 1);
5200 FATAL (host);
5212 print_insn (host, dsp, "s ", 0);
5222 " ", host->host_no);
5223 print_insn (host, dsp, KERN_ALERT "", 1);
5225 FATAL (host);
5257 host->host_no);
5289 host->host_no);
5293 printk(KERN_ALERT "scsi%d : illegal instruction\n", host->host_no);
5294 print_lots (host);
5297 FATAL (host);
5306 intr_bf (host, cmd);
5320 printk ("scsi%d : DSTAT_SIR\n", host->host_no);
5321 switch ((tmp = hostdata->dstat_sir_intr (host, cmd))) {
5326 abort_connected(host);
5329 printk(KERN_ALERT "scsi%d : failure at ", host->host_no);
5330 print_insn (host, dsp, KERN_ALERT "", 1);
5332 FATAL (host);
5335 intr_break (host, cmd);
5338 printk(KERN_ALERT "scsi%d : failure at ", host->host_no);
5339 print_insn (host, dsp, KERN_ALERT "", 1);
5342 FATAL (host);
5348 host->host_no);
5349 FATAL (host);
5377 print_insn (struct Scsi_Host *host, const u32 *insn,
5428 debugger_kernel_write(host, buf, len);
5473 struct Scsi_Host *host = cmd->host;
5474 struct NCR53c7x0_hostdata *hostdata = host ? (struct NCR53c7x0_hostdata *)
5475 host->hostdata : NULL;
5485 if (!host) {
5490 printk ("Bogus SCSI host %d; no hostdata\n", host->host_no);
5493 NCR53c7x0_local_setup(host);
5511 printk ("scsi%d : dropped interrupt for command %ld\n", host->host_no,
5513 NCR53c7x0_intr (host->irq, NULL, NULL);
5521 panic ("scsi%d : bloody fetus %d\n", host->host_no, cmd->pid);
5552 host->host_no, me->pid);
5578 host->host_no, cmd->pid);
5583 cmd->host->host_no);
5604 printk ("scsi%d : did this command ever run?\n", host->host_no);
5608 host->host_no);
5659 struct Scsi_Host *host = cmd->host;
5661 (struct NCR53c7x0_hostdata *) host->hostdata;
5663 NCR53c7x0_local_setup(host);
5666 ncr_halt (host);
5667 print_lots (host);
5668 dump_events (host, 30);
5669 ncr_scsi_reset (host);
5670 for (tmp = nuke_list = return_outstanding_commands (host, 1 /* free */,
5688 printk ("scsi%d: lost command %ld\n", host->host_no, cmd->pid);
5693 NCR53c7x0_driver_init (host);
5694 hostdata->soft_reset (host);
5696 disable(host);
5730 (struct NCR53c7x0_hostdata *) cmd->host->hostdata;
5760 cmd->host->host_no, saved, segment->address);
5798 NCR53c7x0_local_setup (cmd->host);
5816 cmd->host->host_no, where, offset);
5820 cmd->host->host_no, where);
5822 size = print_insn (cmd->host,
5824 print_insn (cmd->host,
5834 print_dsa (struct Scsi_Host *host, u32 *dsa, const char *prefix) {
5836 host->hostdata;
5843 printk("scsi%d : bad dsa virt 0x%p\n", host->host_no, dsa);
5849 host->host_no, virt_to_bus (dsa), dsa, hostdata->dsa_msgout,
5889 host->host_no, cmd->target,
5908 print_queues (struct Scsi_Host *host) {
5910 host->hostdata;
5917 printk ("scsi%d : issue queue\n", host->host_no);
5919 for (left = host->can_queue, cmd = (Scsi_Cmnd *) hostdata->issue_queue;
5929 host->host_no, cmd->pid);
5932 …print_dsa (host, bus_to_virt(le32_to_cpu(((struct NCR53c7x0_cmd *) cmd->host_scribble)-> dsa)), ""…
5935 host->host_no, cmd->pid, cmd->target, cmd->lun);
5941 host->host_no);
5952 printk ("scsi%d : schedule dsa array :\n", host->host_no);
5953 for (left = host->can_queue, curr = hostdata->schedule;
5957 print_dsa (host, bus_to_virt (le32_to_cpu(curr[1]) -
5960 printk ("scsi%d : end schedule dsa array\n", host->host_no);
5962 printk ("scsi%d : reconnect_dsa_head :\n", host->host_no);
5964 for (left = host->can_queue,
5971 printk ("scsi%d: bad DSA pointer 0x%p", host->host_no,
5978 print_dsa (host, dsa, "");
5982 printk ("scsi%d : end reconnect_dsa_head\n", host->host_no);
5985 host->host_no);
5989 print_lots (struct Scsi_Host *host) {
5992 (struct NCR53c7x0_hostdata *) host->hostdata;
5996 NCR53c7x0_local_setup(host);
6012 host->host_no, dbc_dcmd, NCR53c7x0_read32(DNAD_REG),
6028 printk ("scsi%d : DSP 0x%lx (virt 0x%p) ->\n", host->host_no,
6031 size = print_insn (host, dsp, "", 1);
6034 host->host_no, NCR53c7x0_read8 (SDID_REG_800),
6036 print_dsa (host, dsa, "");
6040 print_queues (host);
6054 shutdown (struct Scsi_Host *host) {
6058 host->hostdata;
6059 NCR53c7x0_local_setup(host);
6063 ncr_halt (host);
6064 ncr_scsi_reset (host);
6065 hostdata->soft_reset(host);
6067 disable (host);
6079 ncr_scsi_reset (struct Scsi_Host *host) {
6082 host->hostdata;
6085 NCR53c7x0_local_setup(host);
6107 hard_reset (struct Scsi_Host *host) {
6109 host->hostdata;
6113 ncr_scsi_reset(host);
6114 NCR53c7x0_driver_init (host);
6116 hostdata->soft_reset (host);
6142 return_outstanding_commands (struct Scsi_Host *host, int free, int issue) {
6144 host->hostdata;
6152 printk ("scsi%d : loop detected in running list!\n", host->host_no);
6169 i < host->can_queue; ++i, curr += 2) {
6180 host->host_no);
6208 disable (struct Scsi_Host *host) {
6210 host->hostdata;
6216 ncr_halt (host);
6217 nuke_list = return_outstanding_commands (host, 1 /* free */, 1 /* issue */);
6218 hard_reset (host);
6221 printk ("scsi%d : nuking commands\n", host->host_no);
6227 printk ("scsi%d : done. \n", host->host_no);
6229 host->host_no);
6244 ncr_halt (struct Scsi_Host *host) {
6249 host->hostdata;
6251 NCR53c7x0_local_setup(host);
6282 host->host_no);
6283 disable (host);
6297 print_lots (host);
6332 dump_events (struct Scsi_Host *host, int count) {
6334 host->hostdata;
6360 host->host_no, event_name (event.event), count,
6395 NCR53c7x0_release(struct Scsi_Host *host) {
6397 (struct NCR53c7x0_hostdata *) host->hostdata;
6399 shutdown (host);
6400 if (host->irq != SCSI_IRQ_NONE)
6405 if (tmp->hostt == the_template && tmp->irq == host->irq)
6408 free_irq(host->irq, NULL);
6410 if (host->dma_channel != DMA_NONE)
6411 free_dma(host->dma_channel);
6412 if (host->io_port)
6413 release_region(host->io_port, host->n_io_port);
6428 host->host_no, hostdata->num_cmds);