• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asus-wl-520gu-7.0.1.45/src/linux/linux/drivers/scsi/

Lines Matching refs:host

92  *	default setting on a given host adapter, call
153 * through the file system, buffer cache, driver stacks, SCSI host, and
155 * have a sufficiently fast host adapter.
160 * including drive and bus mastering host overhead is as high as 4.5ms)
176 * in the host code.
309 static void dump_events (struct Scsi_Host *host, int count);
310 static Scsi_Cmnd * return_outstanding_commands (struct Scsi_Host *host,
312 static void hard_reset (struct Scsi_Host *host);
313 static void ncr_scsi_reset (struct Scsi_Host *host);
314 static void print_lots (struct Scsi_Host *host);
315 static void set_synchronous (struct Scsi_Host *host, int target, int sxfer,
317 static int datapath_residual (struct Scsi_Host *host);
320 static void print_queues (struct Scsi_Host *host);
322 static int shutdown (struct Scsi_Host *host);
324 static int disable (struct Scsi_Host *host);
325 static int NCR53c7xx_run_tests (struct Scsi_Host *host);
327 static void NCR53c7x0_intfly (struct Scsi_Host *host);
328 static int ncr_halt (struct Scsi_Host *host);
329 static void intr_phase_mismatch (struct Scsi_Host *host, struct NCR53c7x0_cmd
331 static void intr_dma (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd);
332 static void print_dsa (struct Scsi_Host *host, u32 *dsa,
334 static int print_insn (struct Scsi_Host *host, const u32 *insn,
338 static void NCR53c7x0_init_fixup (struct Scsi_Host *host);
339 static int NCR53c7x0_dstat_sir_intr (struct Scsi_Host *host, struct
341 static void NCR53c7x0_soft_reset (struct Scsi_Host *host);
343 /* Size of event list (per host adapter) */
470 * To allow further pipelining of the NCR and host CPU operation, we want
604 issue_to_cmd (struct Scsi_Host *host, struct NCR53c7x0_hostdata *hostdata,
618 * and host structures were going to be.
653 * Function : static void NCR53c7x0_driver_init (struct Scsi_Host *host)
658 * Inputs : host - pointer to this host adapter's structure
662 NCR53c7x0_driver_init (struct Scsi_Host *host) {
664 host->hostdata[0];
672 set_synchronous (host, i, /* sxfer */ 0, hostdata->saved_scntl3, 0);
678 i < host->can_queue; ++i, ncrcurrent += 2) {
725 * Function : static int NCR53c7x0_init (struct Scsi_Host *host)
727 * Purpose : initialize the internal structures for a given SCSI host
729 * Inputs : host - pointer to this host adapter's structure
738 NCR53c7x0_init (struct Scsi_Host *host) {
743 host->hostdata[0];
796 NCR53c7x0_local_setup(host);
811 host->host_no, hostdata->chip);
812 scsi_unregister (host);
825 printk ("scsi%d : using %s mapped access\n", host->host_no,
842 ncr_halt(host);
845 host->this_id = 7;
852 if (!host->this_id) {
854 host->host_no, host->this_id);
855 host->this_id = 7;
860 if (expected_id == -1 || host->this_id != expected_id)
861 printk("scsi%d : using initiator ID %d\n", host->host_no,
862 host->this_id);
883 printk("scsi%d: Revision 0x%x\n",host->host_no,revision);
888 host->host_no);
921 hostdata->init_save_regs (host);
923 hostdata->init_fixup (host);
926 the_template = host->hostt;
927 first_host = host;
940 hostdata->soft_reset (host);
948 NCR53c7x0_driver_init (host);
950 if (request_irq(host->irq, NCR53c7x0_intr, SA_SHIRQ, "53c7xx", host))
953 host->host_no, host->irq);
957 if ((hostdata->run_tests && hostdata->run_tests(host) == -1) ||
961 if (host->io_port) {
962 host->n_io_port = 128;
963 if (!request_region (host->io_port, host->n_io_port, "ncr53c7xx"))
969 printk ("scsi%d : bus wedge, doing SCSI reset\n", host->host_no);
970 hard_reset (host);
975 free_irq(host->irq, NCR53c7x0_intr);
977 scsi_unregister(host);
1186 * using a 'C' call on the host processor.
1211 * Function : static void NCR53c7x0_init_fixup (struct Scsi_Host *host)
1215 * Inputs : host - pointer to this host adapter's structure
1220 NCR53c7x0_init_fixup (struct Scsi_Host *host) {
1223 host->hostdata[0];
1227 NCR53c7x0_local_setup(host);
1289 base = (u32) host->io_port;
1293 base = virt_to_bus((void *)host->base);
1304 * both the NCR chip and the host processor. For these variables,
1420 host->host_no, A_dsa_fields_start, Ent_dsa_code_template_end -
1423 printk("scsi%d : NCR code relocated to 0x%lx (virt 0x%p)\n", host->host_no,
1428 * Function : static int NCR53c7xx_run_tests (struct Scsi_Host *host)
1434 * Inputs : host - a properly initialized Scsi_Host structure
1443 NCR53c7xx_run_tests (struct Scsi_Host *host) {
1446 host->hostdata[0];
1451 NCR53c7x0_local_setup(host);
1458 printk ("scsi%d : chip not idle, aborting tests\n", host->host_no);
1477 printk ("scsi%d : test 1", host->host_no);
1498 printk ("scsi%d : driver test 1 timed out%s\n",host->host_no ,
1505 host->host_no, hostdata->test_completed);
1513 host->host_no, hostdata->test_dest);
1518 host->host_no, bus_to_virt(NCR53c7x0_read32(DSP_REG)),
1520 printk ("scsi%d : DSPS = 0x%x\n", host->host_no,
1559 printk ("scsi%d : chip not idle, aborting tests\n", host->host_no);
1587 host->host_no, i, data + 8);
1588 printk ("scsi%d : status ", host->host_no);
1590 printk ("\nscsi%d : message ", host->host_no);
1595 host->host_no, i);
1597 printk("scsi%d : not idle\n", host->host_no);
1602 printk ("scsi%d : test 2 timed out\n", host->host_no);
1627 struct Scsi_Host *host = c->host;
1629 host->hostdata[0];
1709 * Purpose : mark SCSI command as finished, OR'ing the host portion
1723 struct Scsi_Host *host = c->host;
1725 host->hostdata[0];
1743 for (found = 0, left = host->can_queue, ncrcurrent = hostdata->schedule;
1746 if (issue_to_cmd (host, hostdata, (u32 *) ncrcurrent) == cmd)
1763 for (left = host->can_queue,
1774 host->host_no);
1778 host->host_no, c->pid);
1789 * Traverse the host running list until we find this command or discover
1794 for (left = host->can_queue, linux_search = hostdata->running_list,
1801 printk ("scsi%d: loop detected in host running list for scsi pid %ld\n",
1802 host->host_no, c->pid);
1822 * Function : static void intr_break (struct Scsi_Host *host,
1827 * Inputs : host - pointer to this host adapter's structure,
1834 intr_break (struct Scsi_Host *host, struct
1840 host->hostdata[0];
1842 NCR53c7x0_local_setup(host);
1856 host->host_no, dsp);
1900 * Function : static void set_synchronous (struct Scsi_Host *host,
1907 * Inputs : host - NCR53c7,8xx SCSI host, target - number SCSI target id,
1916 set_synchronous (struct Scsi_Host *host, int target, int sxfer, int scntl3,
1920 host->hostdata[0];
1922 NCR53c7x0_local_setup(host);
1970 host->host_no, target, sxfer, scntl3);
1980 * Function : static int asynchronous (struct Scsi_Host *host, int target)
1985 * Inputs : host - SCSI host structure, target - numeric target ID.
1991 asynchronous (struct Scsi_Host *host, int target) {
1994 host->hostdata[0];
1995 NCR53c7x0_local_setup(host);
1996 set_synchronous (host, target, /* no offset */ 0, hostdata->saved_scntl3,
1999 host->host_no, target);
2030 * Function : static void synchronous (struct Scsi_Host *host, int target,
2039 * Inputs : host - NCR53c7,8xx SCSI host, target - number SCSI target id,
2045 synchronous (struct Scsi_Host *host, int target, char *msg) {
2047 host->hostdata[0];
2064 host->host_no, divisor / 10, divisor % 10);
2071 host->host_no, syncs[i].div / 10, syncs[i].div % 10);
2076 printk("scsi%d : selected synchronous period of %dns\n", host->host_no,
2083 host->host_no, (int) sxfer, (int) scntl3);
2084 set_synchronous (host, target, sxfer, scntl3, 1);
2085 sprintf (buf, "scsi%d : setting target %d to ", host->host_no, target);
2090 * Function : static int NCR53c7x0_dstat_sir_intr (struct Scsi_Host *host,
2096 * Inputs : host - pointer to this host adapter's structure,
2103 NCR53c7x0_dstat_sir_intr (struct Scsi_Host *host, struct
2109 host->hostdata[0];
2112 NCR53c7x0_local_setup(host);
2120 printk ("scsi%d : DSPS = 0x%x\n", host->host_no, dsps);
2135 printk ("scsi%d : target %d rejected SDTR\n", host->host_no,
2138 asynchronous (host, c->target);
2144 host->host_no);
2152 host->host_no);
2158 printk ("scsi%d : received message", host->host_no);
2180 sprintf (buf, "scsi%d : target %d %s ", host->host_no, c->target,
2195 synchronous (host, c->target, (unsigned char *)
2198 asynchronous (host, c->target);
2206 synchronous (host, c->target, (unsigned char *)
2210 asynchronous (host, c->target);
2230 printk ("scsi%d : unexpected phase\n", host->host_no);
2234 printk ("scsi%d : selected by target %d\n", host->host_no,
2237 printk ("scsi%d : selected by target LCRC=0x%02x\n", host->host_no,
2246 host->host_no, (int) NCR53c7x0_read8(SDID_REG_800) & 7,
2249 printk ("scsi%d : unexpected reselect LCRC=0x%02x\n", host->host_no,
2265 printk ("scsi%d : CHECK CONDITION\n", host->host_no);
2268 host->host_no);
2339 NCR53c7x0_intfly(host);
2346 printk("scsi%d : test%d complete\n", host->host_no,
2362 host->host_no, NCR53c7x0_read32(DSA_REG), dsa);
2364 host->host_no, cmd->saved_data_pointer,
2366 print_insn (host, hostdata->script + Ent_reselected_ok /
2370 host->host_no, NCR53c7x0_read8(SXFER_REG),
2374 host->host_no, NCR53c7x0_read8(SXFER_REG));
2376 print_insn (host, (u32 *)
2378 print_insn (host, (u32 *)
2395 host->host_no, virt_to_bus(dsa), dsa);
2398 host->host_no, cmd->saved_data_pointer,
2401 print_insn (host, hostdata->script + Ent_reselected_ok /
2417 host->host_no, virt_to_bus(dsa), dsa);
2421 host->host_no, cmd->saved_data_pointer,
2432 host->host_no, NCR53c7x0_read32(DSA_REG),
2440 printk("scsi%d : idle\n", host->host_no);
2454 printk("scsi%d : DSA loaded with 0x%x (virt 0x%p)\n", host->host_no,
2466 host->host_no, (int) NCR53c7x0_read8(SDID_REG_800) & ~0x80,
2470 host->host_no, (int) NCR53c7x0_read8(LCRC_REG_10),
2472 print_queues(host);
2481 host->host_no, c->target, c->lun);
2484 host->host_no);
2493 host->host_no);
2494 print_queues(host);
2496 print_insn (host, (u32 *)
2498 print_insn (host, (u32 *)
2506 printk("scsi%d : int_debug_panic received\n", host->host_no);
2507 print_lots (host);
2515 host->host_no, cmd->saved_data_pointer,
2528 host->host_no, cmd->saved_data_pointer, bus_to_virt (
2530 size = print_insn (host, (u32 *)
2532 size = print_insn (host, (u32 *)
2550 host->host_no, sxfer, scntl3);
2556 host->host_no, (int) sxfer, (int) scntl3);
2561 host->host_no, sxfer);
2568 host->host_no, (int) sxfer);
2581 host->host_no, sbcl_to_phase (NCR53c7x0_read8 (SBCL_REG)),
2584 datapath_residual (host)) ;
2588 host->host_no, sbcl_to_phase (NCR53c7x0_read8 (SBCL_REG)),
2590 datapath_residual (host)) ;
2591 print_insn (host, dsp, "", 1);
2592 size = print_insn (host, (u32 *) bus_to_virt(dsp[1]), "", 1);
2593 print_insn (host, (u32 *) bus_to_virt(dsp[1]) + size, "", 1);
2622 host->host_no, sdid, c->target, where);
2623 print_lots(host);
2624 dump_events (host, 20);
2633 host->host_no, dsps);
2684 host->host_no, (unsigned) dsps);
2695 * Function : static void NCR537xx_soft_reset (struct Scsi_Host *host)
2699 * Inputs : host - pointer to this host adapter's structure
2702 * host.
2707 NCR53c7x0_soft_reset (struct Scsi_Host *host) {
2711 host->hostdata[0];
2712 NCR53c7x0_local_setup(host);
2776 NCR53c7x0_write8(SCID_REG, 1 << host->this_id);
2842 struct Scsi_Host *host = cmd->host;
2844 (struct NCR53c7x0_hostdata *) host->hostdata[0];
2853 host->host_no, hostdata->num_cmds, host->can_queue,
2865 if ((hostdata->extra_allocate + hostdata->num_cmds) < host->can_queue)
2866 hostdata->extra_allocate += host->cmd_per_lun;
2920 host->host_no, cmd->target, cmd->lun);
2940 struct Scsi_Host *host = cmd->host;
2942 host->hostdata[0];
2956 NCR53c7x0_local_setup(cmd->host);
3010 printk("scsi%d : datain+dataout for command ", host->host_no);
3103 host->host_no, hostdata->sync[cmd->target].select_indirect);
3104 FATAL(host);
3296 * twiddling done to the host specific fields of cmd. If the
3306 struct Scsi_Host *host = cmd->host;
3308 (struct NCR53c7x0_hostdata *) host->hostdata[0];
3320 printk("scsi%d : ignoring target %d lun %d\n", host->host_no,
3336 || cmd->target > host->max_id
3338 || cmd->target == host->this_id
3340 printk("scsi%d : disabled or bad target %d lun %d\n", host->host_no,
3350 printk("scsi%d : maximum commands exceeded\n", host->host_no);
3362 host->host_no);
3398 * Function : void to_schedule_list (struct Scsi_Host *host,
3406 * host - SCSI host adapter; hostdata - hostdata structure for
3412 * twiddling done to the host specific fields of cmd.
3417 to_schedule_list (struct Scsi_Host *host, struct NCR53c7x0_hostdata *hostdata,
3426 NCR53c7x0_local_setup(host);
3437 printk("scsi%d : driver disabled\n", host->host_no);
3446 for (i = host->can_queue, ncrcurrent = hostdata->schedule;
3466 printk ("scsi%d: no free slot\n", host->host_no);
3467 disable(host);
3497 * Function : busyp (struct Scsi_Host *host, struct NCR53c7x0_hostdata
3507 busyp (struct Scsi_Host *host, struct NCR53c7x0_hostdata *hostdata,
3532 struct Scsi_Host *host;
3538 * the host adapters have anything that can be done, at which point
3550 for (host = first_host; host && host->hostt == the_template;
3551 host = host->next) {
3552 hostdata = (struct NCR53c7x0_hostdata *) host->hostdata[0];
3573 !busyp (host, hostdata, tmp)) {
3583 host->host_no, tmp->target, tmp->lun);
3586 to_schedule_list (host, hostdata,
3593 host->host_no);
3595 disable (host);
3604 } /* for host */
3610 * Function : static void intr_scsi (struct Scsi_Host *host,
3616 * Inputs : host, cmd - host and NCR command causing the interrupt, cmd
3621 intr_scsi (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {
3624 (struct NCR53c7x0_hostdata *) host->hostdata[0];
3629 NCR53c7x0_local_setup(host);
3637 printk ("scsi%d : SIST0 0x%0x, SIST1 0x%0x\n", host->host_no,
3644 printk ("scsi%d : Selection Timeout\n", host->host_no);
3647 host->host_no, cmd->cmd->target, cmd->cmd->lun);
3649 printk("scsi%d : dsp = 0x%x (virt 0x%p)\n", host->host_no,
3653 printk("scsi%d : no command\n", host->host_no);
3674 host->host_no, cmd->cmd->target, cmd->cmd->lun);
3675 print_lots (host);
3679 host->host_no);
3690 host->host_no, cmd->cmd->target, cmd->cmd->lun);
3693 printk("scsi%d : parity error\n", host->host_no);
3704 printk("scsi%d : gross error, saved2_dsa = 0x%x\n", host->host_no,
3706 print_lots (host);
3732 printk ("scsi%d : SSTAT0_MA\n", host->host_no);
3733 intr_phase_mismatch (host, cmd);
3749 printk ("scsi%d : DMA FIFO not empty\n", host->host_no);
3795 struct Scsi_Host *host = first_host;
3798 printk ("%08x (+%6x): ", insn_log[i], (insn_log[i] - (u32)&(((struct NCR53c7x0_hostdata *)host->hostdata[0])->script))/4);
3819 * Function : static void NCR53c7x0_intfly (struct Scsi_Host *host)
3821 * Purpose : Scan command queue for specified host, looking for completed
3831 NCR53c7x0_intfly (struct Scsi_Host *host)
3834 struct NCR53c7x0_hostdata *hostdata; /* host->hostdata[0] */
3840 hostdata = (struct NCR53c7x0_hostdata *) host->hostdata[0];
3841 NCR53c7x0_local_setup(host);
3844 printk ("scsi%d : INTFLY\n", host->host_no);
3864 printk("scsi%d : very weird.\n", host->host_no);
3870 host->host_no);
3901 host->host_no, tmp->pid, tmp->target, tmp->lun, tmp->result);
3912 host->host_no);
3936 struct Scsi_Host *host; /* Host we are looking at */
3938 struct NCR53c7x0_hostdata *hostdata; /* host->hostdata[0] */
3947 host = (struct Scsi_Host *)dev_id;
3948 hostdata = (struct NCR53c7x0_hostdata *) host->hostdata[0];
3949 NCR53c7x0_local_setup(host);
3962 printk ("scsi%d : SCSI FIFO not empty\n", host->host_no);
3986 host->host_no, cmd->cmd->pid, (int) cmd->cmd->target,
3990 printk("scsi%d : no active command\n", host->host_no);
3996 printk ("scsi%d : ISTAT_SIP\n", host->host_no);
3997 intr_scsi (host, cmd);
4002 printk ("scsi%d : ISTAT_DIP\n", host->host_no);
4003 intr_dma (host, cmd);
4012 printk ("scsi%d : DMA FIFO not empty\n", host->host_no);
4030 print_insn (host, hostdata->dsp, "t ", 1);
4041 * Function : static int abort_connected (struct Scsi_Host *host)
4048 * Inputs : host - SCSI host
4053 abort_connected (struct Scsi_Host *host) {
4058 host->hostdata[0];
4063 NCR53c7x0_local_setup(host);
4067 disable(host);
4072 host->host_no);
4112 * Function : static int datapath_residual (Scsi_Host *host)
4116 * Inputs : host - SCSI host
4120 datapath_residual (struct Scsi_Host *host) {
4125 NCR53c7x0_local_setup(host);
4210 * Function : static void intr_phase_mismatch (struct Scsi_Host *host,
4215 * Inputs : host, cmd - host and NCR command causing the interrupt, cmd
4225 intr_phase_mismatch (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {
4230 host->hostdata[0];
4236 NCR53c7x0_local_setup(host);
4291 residual = datapath_residual (host);
4294 host->host_no, residual);
4356 host->host_no, cmd->cmd->target);
4406 host->host_no, where ? where : "unknown location",
4408 print_lots (host);
4411 abort_connected (host);
4420 * Function : static void intr_bf (struct Scsi_Host *host,
4425 * Inputs : host, cmd - host and NCR command causing the interrupt, cmd
4430 intr_bf (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {
4441 NCR53c7x0_local_setup(host);
4471 host->host_no, reason ? reason : "unknown");
4472 print_lots (host);
4490 FATAL (host);
4495 * Function : static void intr_dma (struct Scsi_Host *host,
4501 * Inputs : host, cmd - host and NCR command causing the interrupt, cmd
4506 intr_dma (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {
4509 host->hostdata[0];
4517 NCR53c7x0_local_setup(host);
4527 printk("scsi%d : DSTAT=0x%x\n", host->host_no, (int) dstat);
4548 " ", host->host_no);
4549 print_insn (host, dsp, KERN_ALERT "s ", 1);
4550 FATAL (host);
4563 print_insn (host, dsp, "s ", 0);
4572 " ", host->host_no);
4573 print_insn (host, dsp, KERN_ALERT "", 1);
4575 FATAL (host);
4598 host->host_no);
4630 host->host_no);
4634 printk(KERN_ALERT "scsi%d : illegal instruction\n", host->host_no);
4635 print_lots (host);
4638 FATAL (host);
4647 intr_bf (host, cmd);
4661 printk ("scsi%d : DSTAT_SIR\n", host->host_no);
4662 switch ((tmp = hostdata->dstat_sir_intr (host, cmd))) {
4667 abort_connected(host);
4670 printk(KERN_ALERT "scsi%d : failure at ", host->host_no);
4671 print_insn (host, dsp, KERN_ALERT "", 1);
4673 FATAL (host);
4676 intr_break (host, cmd);
4679 printk(KERN_ALERT "scsi%d : failure at ", host->host_no);
4680 print_insn (host, dsp, KERN_ALERT "", 1);
4683 FATAL (host);
4689 * Function : static int print_insn (struct Scsi_Host *host,
4699 * Inputs : host, insn - host, pointer to instruction, prefix -
4707 print_insn (struct Scsi_Host *host, const u32 *insn,
4734 (u32)&(((struct NCR53c7x0_hostdata *)host->hostdata[0])->script))/4,
4758 debugger_kernel_write(host, buf, len);
4779 struct Scsi_Host *host = cmd->host;
4780 struct NCR53c7x0_hostdata *hostdata = host ? (struct NCR53c7x0_hostdata *)
4781 host->hostdata[0] : NULL;
4787 if (!host) {
4788 printk ("Bogus SCSI command pid %ld; no host structure\n",
4792 printk ("Bogus SCSI host %d; no hostdata\n", host->host_no);
4795 NCR53c7x0_local_setup(host);
4811 printk ("scsi%d : dropped interrupt for command %ld\n", host->host_no,
4813 NCR53c7x0_intr (host->irq, NULL, NULL);
4846 host->host_no, me->pid);
4872 host->host_no, cmd->pid);
4877 cmd->host->host_no);
4897 printk ("scsi%d : did this command ever run?\n", host->host_no);
4901 host->host_no);
4948 struct Scsi_Host *host = cmd->host;
4950 (struct NCR53c7x0_hostdata *) host->hostdata[0];
4952 NCR53c7x0_local_setup(host);
4955 ncr_halt (host);
4956 print_lots (host);
4957 dump_events (host, 30);
4958 ncr_scsi_reset (host);
4959 for (tmp = nuke_list = return_outstanding_commands (host, 1 /* free */,
4977 printk ("scsi%d: lost command %ld\n", host->host_no, cmd->pid);
4982 NCR53c7x0_driver_init (host);
4983 hostdata->soft_reset (host);
4985 disable(host);
5019 (struct NCR53c7x0_hostdata *) cmd->host->hostdata[0];
5082 NCR53c7x0_local_setup (cmd->host);
5110 cmd->host->host_no, where, offset);
5114 cmd->host->host_no, where);
5116 size = print_insn (cmd->host,
5118 print_insn (cmd->host,
5128 print_dsa (struct Scsi_Host *host, u32 *dsa, const char *prefix) {
5130 host->hostdata[0];
5137 printk("scsi%d : bad dsa virt 0x%p\n", host->host_no, dsa);
5143 host->host_no, virt_to_bus (dsa), dsa, hostdata->dsa_msgout,
5183 host->host_no, cmd->target,
5193 * Function : void print_queues (Scsi_Host *host)
5197 * Inputs : host - SCSI host we are interested in
5202 print_queues (struct Scsi_Host *host) {
5204 host->hostdata[0];
5211 printk ("scsi%d : issue queue\n", host->host_no);
5213 for (left = host->can_queue, cmd = (Scsi_Cmnd *) hostdata->issue_queue;
5223 host->host_no, cmd->pid);
5226 print_dsa (host, ((struct NCR53c7x0_cmd *) cmd->host_scribble)
5230 host->host_no, cmd->pid, cmd->target, cmd->lun);
5236 host->host_no);
5247 printk ("scsi%d : schedule dsa array :\n", host->host_no);
5248 for (left = host->can_queue, ncrcurrent = hostdata->schedule;
5251 print_dsa (host, bus_to_virt (ncrcurrent[1] -
5254 printk ("scsi%d : end schedule dsa array\n", host->host_no);
5256 printk ("scsi%d : reconnect_dsa_head :\n", host->host_no);
5258 for (left = host->can_queue,
5265 printk ("scsi%d: bad DSA pointer 0x%p", host->host_no,
5272 print_dsa (host, dsa, "");
5276 printk ("scsi%d : end reconnect_dsa_head\n", host->host_no);
5279 host->host_no);
5283 print_lots (struct Scsi_Host *host) {
5286 (struct NCR53c7x0_hostdata *) host->hostdata[0];
5290 NCR53c7x0_local_setup(host);
5309 host->host_no, dbc_dcmd, NCR53c7x0_read32(DNAD_REG),
5328 printk ("scsi%d : DSP 0x%lx (virt 0x%p) ->\n", host->host_no,
5331 size = print_insn (host, dsp, "", 1);
5335 host->host_no, NCR53c7x0_read8 (SDID_REG_800),
5339 host->host_no, NCR53c7x0_read8 (SDID_REG_700));
5340 print_dsa (host, dsa, "");
5343 print_queues (host);
5348 * Function : static int shutdown (struct Scsi_Host *host)
5356 shutdown (struct Scsi_Host *host) {
5360 host->hostdata[0];
5361 NCR53c7x0_local_setup(host);
5365 ncr_halt (host);
5366 ncr_scsi_reset (host);
5367 hostdata->soft_reset(host);
5369 disable (host);
5375 * Function : void ncr_scsi_reset (struct Scsi_Host *host)
5381 ncr_scsi_reset (struct Scsi_Host *host) {
5384 NCR53c7x0_local_setup(host);
5394 * Function : void hard_reset (struct Scsi_Host *host)
5399 hard_reset (struct Scsi_Host *host) {
5401 host->hostdata[0];
5405 ncr_scsi_reset(host);
5406 NCR53c7x0_driver_init (host);
5408 hostdata->soft_reset (host);
5414 * Function : Scsi_Cmnd *return_outstanding_commands (struct Scsi_Host *host,
5434 return_outstanding_commands (struct Scsi_Host *host, int free, int issue) {
5436 host->hostdata[0];
5444 printk ("scsi%d : loop detected in running list!\n", host->host_no);
5461 i < host->can_queue; ++i, ncrcurrent += 2) {
5472 host->host_no);
5486 * Function : static int disable (struct Scsi_Host *host)
5488 * Purpose : disables the given NCR host, causing all commands
5494 * Inputs : host - hostadapter to twiddle
5500 disable (struct Scsi_Host *host) {
5502 host->hostdata[0];
5508 ncr_halt (host);
5509 nuke_list = return_outstanding_commands (host, 1 /* free */, 1 /* issue */);
5510 hard_reset (host);
5513 printk ("scsi%d : nuking commands\n", host->host_no);
5519 printk ("scsi%d : done. \n", host->host_no);
5521 host->host_no);
5526 * Function : static int ncr_halt (struct Scsi_Host *host)
5530 * Inputs : host - SCSI chip to halt
5536 ncr_halt (struct Scsi_Host *host) {
5541 host->hostdata[0];
5543 NCR53c7x0_local_setup(host);
5568 host->host_no);
5569 disable (host);
5610 * Function : void dump_events (struct Scsi_Host *host, count)
5615 dump_events (struct Scsi_Host *host, int count) {
5617 host->hostdata[0];
5639 host->host_no, event_name (event.event), count,
5674 NCR53c7x0_release(struct Scsi_Host *host) {
5676 (struct NCR53c7x0_hostdata *) host->hostdata[0];
5678 shutdown (host);
5679 if (host->irq != IRQ_NONE)
5684 if (tmp->hostt == the_template && tmp->irq == host->irq)
5687 free_irq(host->irq, NULL);
5689 if (host->dma_channel != DMA_NONE)
5690 free_dma(host->dma_channel);
5691 if (host->io_port)
5692 release_region(host->io_port, host->n_io_port);
5707 host->host_no, hostdata->num_cmds);