2 * Generic Generic NCR5380 driver
4 * Copyright 1993, Drew Eckhardt
6 * (Unix and Linux consulting and custom programming)
10 * NCR53C400 extensions (c) 1994,1995,1996, Kevin Lentin
11 * K.Lentin@cs.monash.edu.au
15 * For more information, please consult
18 * SCSI Protocol Controller
21 * NCR Microelectronics
22 * 1635 Aeroplaza Drive
23 * Colorado Springs, CO 80916
29 * TODO : flesh out DMA support, find some one actually using this (I have
30 * a memory mapped Trantor board that works fine)
36 * PARITY - enable parity checking. Not supported.
38 * SCSI2 - enable support for SCSI-II tagged queueing. Untested.
40 * USLEEP - enable support for devices that don't disconnect. Untested.
42 * The card is detected and initialized in one of several ways :
43 * 1. With command line overrides - NCR5380=port,irq may be
44 * used on the LILO command line to override the defaults.
46 * 2. With the GENERIC_NCR5380_OVERRIDE compile time define. This is
47 * specified as an array of address, irq, dma, board tuples. Ie, for
48 * one board at 0x350, IRQ5, no dma, I could say
49 * -DGENERIC_NCR5380_OVERRIDE={{0xcc000, 5, DMA_NONE, BOARD_NCR5380}}
51 * -1 should be specified for no or DMA interrupt, -2 to autoprobe for an
52 * IRQ line if overridden on the command line.
54 * 3. When included as a module, with arguments passed on the command line:
55 * ncr_irq=xx the interrupt
56 * ncr_addr=xx the port or base address (for port or memory
59 * ncr_5380=1 to set up for a NCR5380 board
60 * ncr_53c400=1 to set up for a NCR53C400 board
62 * modprobe g_NCR5380 ncr_irq=5 ncr_addr=0x350 ncr_5380=1
63 * for a port mapped NCR5380 board or
64 * modprobe g_NCR5380 ncr_irq=255 ncr_addr=0xc8000 ncr_53c400=1
65 * for a memory mapped NCR53C400 board with interrupts disabled.
67 * 255 should be specified for no or DMA interrupt, 254 to autoprobe for an
68 * IRQ line if overridden on the command line.
73 * $Log: generic_NCR5380.c,v $
79 #include <linux/config.h>
81 #ifdef CONFIG_SCSI_GENERIC_NCR53C400
82 #define NCR53C400_PSEUDO_DMA 1
86 #undef NCR5380_STAT_LIMIT
88 #if defined(CONFIG_SCSI_G_NCR5380_PORT) && defined(CONFIG_SCSI_G_NCR5380_MEM)
89 #error You can not configure the Generic NCR 5380 SCSI Driver for memory mapped I/O and port mapped I/O at the same time (yet)
91 #if !defined(CONFIG_SCSI_G_NCR5380_PORT) && !defined(CONFIG_SCSI_G_NCR5380_MEM)
92 #error You must configure the Generic NCR 5380 SCSI Driver for one of memory mapped I/O and port mapped I/O.
95 #include <asm/system.h>
97 #include <linux/signal.h>
98 #include <linux/sched.h>
99 #include <linux/blk.h>
102 #include "g_NCR5380.h"
104 #include "constants.h"
106 #include <linux/stat.h>
107 #include <linux/init.h>
109 struct proc_dir_entry proc_scsi_g_ncr5380
= {
110 PROC_SCSI_GENERIC_NCR5380
, 9, "g_NCR5380",
111 S_IFDIR
| S_IRUGO
| S_IXUGO
, 2
114 #define NCR_NOT_SET 0
115 static int ncr_irq
=NCR_NOT_SET
;
116 static int ncr_dma
=NCR_NOT_SET
;
117 static int ncr_addr
=NCR_NOT_SET
;
118 static int ncr_5380
=NCR_NOT_SET
;
119 static int ncr_53c400
=NCR_NOT_SET
;
121 static struct override
{
122 NCR5380_implementation_fields
;
125 int board
; /* Use NCR53c400, Ricoh, etc. extensions ? */
127 #ifdef GENERIC_NCR5380_OVERRIDE
128 [] __initdata
= GENERIC_NCR5380_OVERRIDE
130 [1] __initdata
= {{0,},};
133 #define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override))
136 * Function : static internal_setup(int board, char *str, int *ints)
138 * Purpose : LILO command line initialization of the overrides array,
140 * Inputs : board - either BOARD_NCR5380 for a normal NCR5380 board,
141 * or BOARD_NCR53C400 for a NCR53C400 board. str - unused, ints -
142 * array of integer parameters with ints[0] equal to the number of ints.
146 __initfunc(static void internal_setup(int board
, char *str
, int *ints
)) {
147 static int commandline_current
= 0;
150 if (ints
[0] != 2 && ints
[0] != 3) {
151 printk("generic_NCR5380_setup : usage ncr5380=" STRVAL(NCR5380_map_name
) ",irq,dma\n");
154 case BOARD_NCR53C400
:
156 printk("generic_NCR53C400_setup : usage ncr53c400=" STRVAL(NCR5380_map_name
) ",irq\n");
161 if (commandline_current
< NO_OVERRIDES
) {
162 overrides
[commandline_current
].NCR5380_map_name
= (NCR5380_map_type
)ints
[1];
163 overrides
[commandline_current
].irq
= ints
[2];
165 overrides
[commandline_current
].dma
= ints
[3];
167 overrides
[commandline_current
].dma
= DMA_NONE
;
168 overrides
[commandline_current
].board
= board
;
169 ++commandline_current
;
174 * Function : generic_NCR5380_setup (char *str, int *ints)
176 * Purpose : LILO command line initialization of the overrides array,
178 * Inputs : str - unused, ints - array of integer parameters with ints[0]
179 * equal to the number of ints.
182 __initfunc(void generic_NCR5380_setup (char *str
, int *ints
)) {
183 internal_setup (BOARD_NCR5380
, str
, ints
);
187 * Function : generic_NCR53C400_setup (char *str, int *ints)
189 * Purpose : LILO command line initialization of the overrides array,
191 * Inputs : str - unused, ints - array of integer parameters with ints[0]
192 * equal to the number of ints.
195 __initfunc(void generic_NCR53C400_setup (char *str
, int *ints
)) {
196 internal_setup (BOARD_NCR53C400
, str
, ints
);
200 * Function : int generic_NCR5380_detect(Scsi_Host_Template * tpnt)
202 * Purpose : initializes generic NCR5380 driver based on the
203 * command line / compile time port and irq definitions.
205 * Inputs : tpnt - template for this SCSI adapter.
207 * Returns : 1 if a host adapter was found, 0 if not.
211 __initfunc(int generic_NCR5380_detect(Scsi_Host_Template
* tpnt
)) {
212 static int current_override
= 0;
215 struct Scsi_Host
*instance
;
217 if (ncr_irq
!= NCR_NOT_SET
)
218 overrides
[0].irq
=ncr_irq
;
219 if (ncr_dma
!= NCR_NOT_SET
)
220 overrides
[0].dma
=ncr_dma
;
221 if (ncr_addr
!= NCR_NOT_SET
)
222 overrides
[0].NCR5380_map_name
=(NCR5380_map_type
)ncr_addr
;
223 if (ncr_5380
!= NCR_NOT_SET
)
224 overrides
[0].board
=BOARD_NCR5380
;
225 else if (ncr_53c400
!= NCR_NOT_SET
)
226 overrides
[0].board
=BOARD_NCR53C400
;
228 tpnt
->proc_dir
= &proc_scsi_g_ncr5380
;
230 for (count
= 0; current_override
< NO_OVERRIDES
; ++current_override
) {
231 if (!(overrides
[current_override
].NCR5380_map_name
))
234 switch (overrides
[current_override
].board
) {
236 flags
= FLAG_NO_PSEUDO_DMA
;
238 case BOARD_NCR53C400
:
239 flags
= FLAG_NCR53C400
;
243 instance
= scsi_register (tpnt
, sizeof(struct NCR5380_hostdata
));
244 instance
->NCR5380_instance_name
= overrides
[current_override
].NCR5380_map_name
;
246 NCR5380_init(instance
, flags
);
248 if (overrides
[current_override
].irq
!= IRQ_AUTO
)
249 instance
->irq
= overrides
[current_override
].irq
;
251 instance
->irq
= NCR5380_probe_irq(instance
, 0xffff);
253 if (instance
->irq
!= IRQ_NONE
)
254 if (request_irq(instance
->irq
, generic_NCR5380_intr
, SA_INTERRUPT
, "NCR5380", NULL
)) {
255 printk("scsi%d : IRQ%d not free, interrupts disabled\n",
256 instance
->host_no
, instance
->irq
);
257 instance
->irq
= IRQ_NONE
;
260 if (instance
->irq
== IRQ_NONE
) {
261 printk("scsi%d : interrupts not enabled. for better interactive performance,\n", instance
->host_no
);
262 printk("scsi%d : please jumper the board for a free IRQ.\n", instance
->host_no
);
265 printk("scsi%d : at " STRVAL(NCR5380_map_name
) " 0x%x", instance
->host_no
, (unsigned int)instance
->NCR5380_instance_name
);
266 if (instance
->irq
== IRQ_NONE
)
267 printk (" interrupts disabled");
269 printk (" irq %d", instance
->irq
);
270 printk(" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d",
271 CAN_QUEUE
, CMD_PER_LUN
, GENERIC_NCR5380_PUBLIC_RELEASE
);
272 NCR5380_print_options(instance
);
281 const char * generic_NCR5380_info (struct Scsi_Host
* host
) {
282 static const char string
[]="Generic NCR5380/53C400 Driver";
286 int generic_NCR5380_release_resources(struct Scsi_Host
* instance
)
288 NCR5380_local_declare();
290 NCR5380_setup(instance
);
292 if (instance
->irq
!= IRQ_NONE
)
293 free_irq(instance
->irq
, NULL
);
300 * Function : int generic_NCR5380_biosparam(Disk * disk, kdev_t dev, int *ip)
302 * Purpose : Generates a BIOS / DOS compatible H-C-S mapping for
303 * the specified device / size.
305 * Inputs : size = size of device in sectors (512 bytes), dev = block device
306 * major / minor, ip[] = {heads, sectors, cylinders}
308 * Returns : always 0 (success), initializes ip
313 * XXX Most SCSI boards use this mapping, I could be incorrect. Some one
314 * using hard disks on a trantor should verify that this mapping corresponds
315 * to that used by the BIOS / ASPI driver by running the linux fdisk program
316 * and matching the H_C_S coordinates to what DOS uses.
319 int generic_NCR5380_biosparam(Disk
* disk
, kdev_t dev
, int *ip
)
321 int size
= disk
->capacity
;
329 #if NCR53C400_PSEUDO_DMA
330 static inline int NCR5380_pread (struct Scsi_Host
*instance
, unsigned char *dst
, int len
)
332 int blocks
= len
/ 128;
335 #ifdef CONFIG_SCSI_G_NCR5380_PORT
339 NCR5380_local_declare();
341 NCR5380_setup(instance
);
343 #if (NDEBUG & NDEBUG_C400_PREAD)
344 printk("53C400r: About to read %d blocks for %d bytes\n", blocks
, len
);
347 NCR5380_write(C400_CONTROL_STATUS_REG
, CSR_BASE
| CSR_TRANS_DIR
);
348 NCR5380_write(C400_BLOCK_COUNTER_REG
, blocks
);
351 #if (NDEBUG & NDEBUG_C400_PREAD)
352 printk("53C400r: %d blocks left\n", blocks
);
355 if ((bl
=NCR5380_read(C400_BLOCK_COUNTER_REG
)) == 0) {
356 #if (NDEBUG & NDEBUG_C400_PREAD)
358 printk("53C400r: blocks still == %d\n", blocks
);
360 printk("53C400r: Exiting loop\n");
366 if (NCR5380_read(C400_CONTROL_STATUS_REG
) & CSR_GATED_53C80_IRQ
) {
367 printk("53C400r: Got 53C80_IRQ start=%d, blocks=%d\n", start
, blocks
);
372 #if (NDEBUG & NDEBUG_C400_PREAD)
373 printk("53C400r: Waiting for buffer, bl=%d\n", bl
);
376 while (NCR5380_read(C400_CONTROL_STATUS_REG
) & CSR_HOST_BUF_NOT_RDY
)
378 #if (NDEBUG & NDEBUG_C400_PREAD)
379 printk("53C400r: Transferring 128 bytes\n");
382 #ifdef CONFIG_SCSI_G_NCR5380_PORT
383 for (i
=0; i
<128; i
++)
384 dst
[start
+i
] = NCR5380_read(C400_HOST_BUFFER
);
386 /* implies CONFIG_SCSI_G_NCR5380_MEM */
387 memmove(dst
+start
,NCR53C400_host_buffer
+NCR5380_map_name
,128);
394 #if (NDEBUG & NDEBUG_C400_PREAD)
395 printk("53C400r: EXTRA: Waiting for buffer\n");
397 while (NCR5380_read(C400_CONTROL_STATUS_REG
) & CSR_HOST_BUF_NOT_RDY
)
400 #if (NDEBUG & NDEBUG_C400_PREAD)
401 printk("53C400r: Transferring EXTRA 128 bytes\n");
403 #ifdef CONFIG_SCSI_G_NCR5380_PORT
404 for (i
=0; i
<128; i
++)
405 dst
[start
+i
] = NCR5380_read(C400_HOST_BUFFER
);
407 /* implies CONFIG_SCSI_G_NCR5380_MEM */
408 memmove(dst
+start
,NCR53C400_host_buffer
+NCR5380_map_name
,128);
413 #if (NDEBUG & NDEBUG_C400_PREAD)
415 printk("53C400r: No EXTRA required\n");
418 #if (NDEBUG & NDEBUG_C400_PREAD)
419 printk("53C400r: Final values: blocks=%d start=%d\n", blocks
, start
);
422 if (!(NCR5380_read(C400_CONTROL_STATUS_REG
) & CSR_GATED_53C80_IRQ
))
423 printk("53C400r: no 53C80 gated irq after transfer");
424 #if (NDEBUG & NDEBUG_C400_PREAD)
426 printk("53C400r: Got 53C80 interrupt and tried to clear it\n");
429 /* DON'T DO THIS - THEY NEVER ARRIVE!
430 printk("53C400r: Waiting for 53C80 registers\n");
431 while (NCR5380_read(C400_CONTROL_STATUS_REG) & CSR_53C80_REG)
435 if (!(NCR5380_read(BUS_AND_STATUS_REG
) & BASR_END_DMA_TRANSFER
))
436 printk("53C400r: no end dma signal\n");
437 #if (NDEBUG & NDEBUG_C400_PREAD)
439 printk("53C400r: end dma as expected\n");
442 NCR5380_write(MODE_REG
, MR_BASE
);
443 NCR5380_read(RESET_PARITY_INTERRUPT_REG
);
447 static inline int NCR5380_pwrite (struct Scsi_Host
*instance
, unsigned char *src
, int len
)
449 int blocks
= len
/ 128;
453 NCR5380_local_declare();
455 NCR5380_setup(instance
);
457 #if (NDEBUG & NDEBUG_C400_PWRITE)
458 printk("53C400w: About to write %d blocks for %d bytes\n", blocks
, len
);
461 NCR5380_write(C400_CONTROL_STATUS_REG
, CSR_BASE
);
462 NCR5380_write(C400_BLOCK_COUNTER_REG
, blocks
);
464 if (NCR5380_read(C400_CONTROL_STATUS_REG
) & CSR_GATED_53C80_IRQ
) {
465 printk("53C400w: Got 53C80_IRQ start=%d, blocks=%d\n", start
, blocks
);
469 if ((bl
=NCR5380_read(C400_BLOCK_COUNTER_REG
)) == 0) {
470 #if (NDEBUG & NDEBUG_C400_PWRITE)
472 printk("53C400w: exiting loop, blocks still == %d\n", blocks
);
474 printk("53C400w: exiting loop\n");
479 #if (NDEBUG & NDEBUG_C400_PWRITE)
480 printk("53C400w: %d blocks left\n", blocks
);
482 printk("53C400w: waiting for buffer, bl=%d\n", bl
);
484 while (NCR5380_read(C400_CONTROL_STATUS_REG
) & CSR_HOST_BUF_NOT_RDY
)
487 #if (NDEBUG & NDEBUG_C400_PWRITE)
488 printk("53C400w: transferring 128 bytes\n");
490 #ifdef CONFIG_SCSI_G_NCR5380_PORT
491 for (i
=0; i
<128; i
++)
492 NCR5380_write(C400_HOST_BUFFER
, src
[start
+i
]);
494 /* implies CONFIG_SCSI_G_NCR5380_MEM */
495 memmove(NCR53C400_host_buffer
+NCR5380_map_name
,src
+start
,128);
501 #if (NDEBUG & NDEBUG_C400_PWRITE)
502 printk("53C400w: EXTRA waiting for buffer\n");
504 while (NCR5380_read(C400_CONTROL_STATUS_REG
) & CSR_HOST_BUF_NOT_RDY
)
507 #if (NDEBUG & NDEBUG_C400_PWRITE)
508 printk("53C400w: transferring EXTRA 128 bytes\n");
510 #ifdef CONFIG_SCSI_G_NCR5380_PORT
511 for (i
=0; i
<128; i
++)
512 NCR5380_write(C400_HOST_BUFFER
, src
[start
+i
]);
514 /* implies CONFIG_SCSI_G_NCR5380_MEM */
515 memmove(NCR53C400_host_buffer
+NCR5380_map_name
,src
+start
,128);
520 #if (NDEBUG & NDEBUG_C400_PWRITE)
522 printk("53C400w: No EXTRA required\n");
525 #if (NDEBUG & NDEBUG_C400_PWRITE)
526 printk("53C400w: Final values: blocks=%d start=%d\n", blocks
, start
);
530 printk("53C400w: waiting for registers to be available\n");
532 while (NCR5380_read(C400_CONTROL_STATUS_REG
) & CSR_53C80_REG
)
534 printk("53C400w: Got em\n");
537 /* Let's wait for this instead - could be ugly */
538 /* All documentation says to check for this. Maybe my hardware is too
539 * fast. Waiting for it seems to work fine! KLL
541 while (!(i
= NCR5380_read(C400_CONTROL_STATUS_REG
) & CSR_GATED_53C80_IRQ
))
545 * I know. i is certainly != 0 here but the loop is new. See previous
549 #if (NDEBUG & NDEBUG_C400_PWRITE)
550 printk("53C400w: got 53C80 gated irq (last block)\n");
552 if (!((i
=NCR5380_read(BUS_AND_STATUS_REG
)) & BASR_END_DMA_TRANSFER
))
553 printk("53C400w: No END OF DMA bit - WHOOPS! BASR=%0x\n",i
);
554 #if (NDEBUG & NDEBUG_C400_PWRITE)
556 printk("53C400w: Got END OF DMA\n");
560 printk("53C400w: no 53C80 gated irq after transfer (last block)\n");
563 if (!(NCR5380_read(BUS_AND_STATUS_REG
) & BASR_END_DMA_TRANSFER
)) {
564 printk("53C400w: no end dma signal\n");
568 #if (NDEBUG & NDEBUG_C400_PWRITE)
569 printk("53C400w: waiting for last byte...\n");
571 while (!(NCR5380_read(TARGET_COMMAND_REG
) & TCR_LAST_BYTE_SENT
))
574 #if (NDEBUG & NDEBUG_C400_PWRITE)
575 printk("53C400w: got last byte.\n");
576 printk("53C400w: pwrite exiting with status 0, whoopee!\n");
580 #endif /* PSEUDO_DMA */
584 #define PRINTP(x) len += sprintf(buffer+len, x)
587 static int sprint_opcode(char* buffer
, int len
, int opcode
) {
589 PRINTP("0x%02x " ANDP opcode
);
593 static int sprint_command (char* buffer
, int len
, unsigned char *command
) {
595 len
+= sprint_opcode(buffer
, len
, command
[0]);
596 for ( i
= 1, s
= COMMAND_SIZE(command
[0]); i
< s
; ++i
)
597 PRINTP("%02x " ANDP command
[i
]);
602 static int sprint_Scsi_Cmnd (char* buffer
, int len
, Scsi_Cmnd
*cmd
) {
604 PRINTP("host number %d destination target %d, lun %d\n" ANDP
605 cmd
->host
->host_no ANDP
608 PRINTP(" command = ");
609 len
+= sprint_command (buffer
, len
, cmd
->cmnd
);
613 int generic_NCR5380_proc_info(char* buffer
, char** start
, off_t offset
, int length
, int hostno
, int inout
)
616 NCR5380_local_declare();
617 unsigned char status
;
619 struct Scsi_Host
*scsi_ptr
;
621 struct NCR5380_hostdata
*hostdata
;
625 for (scsi_ptr
= first_instance
; scsi_ptr
; scsi_ptr
=scsi_ptr
->next
)
626 if (scsi_ptr
->host_no
== hostno
)
628 NCR5380_setup(scsi_ptr
);
629 hostdata
= (struct NCR5380_hostdata
*)scsi_ptr
->hostdata
;
631 PRINTP("SCSI host number %d : %s\n" ANDP scsi_ptr
->host_no ANDP scsi_ptr
->hostt
->name
);
632 PRINTP("Generic NCR5380 driver version %d\n" ANDP GENERIC_NCR5380_PUBLIC_RELEASE
);
633 PRINTP("NCR5380 core version %d\n" ANDP NCR5380_PUBLIC_RELEASE
);
635 PRINTP("NCR53C400 extension version %d\n" ANDP NCR53C400_PUBLIC_RELEASE
);
636 PRINTP("NCR53C400 card%s detected\n" ANDP (((struct NCR5380_hostdata
*)scsi_ptr
->hostdata
)->flags
& FLAG_NCR53C400
)?"":" not");
637 # if NCR53C400_PSEUDO_DMA
638 PRINTP("NCR53C400 pseudo DMA used\n");
641 PRINTP("NO NCR53C400 driver extensions\n");
643 PRINTP("Using %s mapping at %s 0x%x, " ANDP
STRVAL(NCR5380_map_config
) ANDP
STRVAL(NCR5380_map_name
) ANDP scsi_ptr
->NCR5380_instance_name
);
644 if (scsi_ptr
->irq
== IRQ_NONE
)
645 PRINTP("no interrupt\n");
647 PRINTP("on interrupt %d\n" ANDP scsi_ptr
->irq
);
650 if (hostdata
->connected
|| hostdata
->issue_queue
|| hostdata
->disconnected_queue
)
651 PRINTP("There are commands pending, transfer rates may be crud\n");
652 if (hostdata
->pendingr
)
653 PRINTP(" %d pending reads" ANDP hostdata
->pendingr
);
654 if (hostdata
->pendingw
)
655 PRINTP(" %d pending writes" ANDP hostdata
->pendingw
);
656 if (hostdata
->pendingr
|| hostdata
->pendingw
)
658 for (dev
= scsi_devices
; dev
; dev
=dev
->next
) {
659 if (dev
->host
== scsi_ptr
) {
660 unsigned long br
= hostdata
->bytes_read
[dev
->id
];
661 unsigned long bw
= hostdata
->bytes_write
[dev
->id
];
662 long tr
= hostdata
->time_read
[dev
->id
] / HZ
;
663 long tw
= hostdata
->time_write
[dev
->id
] / HZ
;
665 PRINTP(" T:%d %s " ANDP dev
->id
ANDP (dev
->type
< MAX_SCSI_DEVICE_CODE
) ? scsi_device_types
[(int)dev
->type
] : "Unknown");
667 if (dev
->vendor
[i
] >= 0x20)
668 *(buffer
+(len
++)) = dev
->vendor
[i
];
669 *(buffer
+(len
++)) = ' ';
671 if (dev
->model
[i
] >= 0x20)
672 *(buffer
+(len
++)) = dev
->model
[i
];
673 *(buffer
+(len
++)) = ' ';
675 if (dev
->rev
[i
] >= 0x20)
676 *(buffer
+(len
++)) = dev
->rev
[i
];
677 *(buffer
+(len
++)) = ' ';
679 PRINTP("\n%10ld kb read in %5ld secs" ANDP br
/1024 ANDP tr
);
681 PRINTP(" @ %5ld bps" ANDP br
/ tr
);
683 PRINTP("\n%10ld kb written in %5ld secs" ANDP bw
/1024 ANDP tw
);
685 PRINTP(" @ %5ld bps" ANDP bw
/ tw
);
691 status
= NCR5380_read(STATUS_REG
);
692 if (!(status
& SR_REQ
))
693 PRINTP("REQ not asserted, phase unknown.\n");
695 for (i
= 0; (phases
[i
].value
!= PHASE_UNKNOWN
) &&
696 (phases
[i
].value
!= (status
& PHASE_MASK
)); ++i
)
698 PRINTP("Phase %s\n" ANDP phases
[i
].name
);
701 if (!hostdata
->connected
) {
702 PRINTP("No currently connected command\n");
704 len
+= sprint_Scsi_Cmnd (buffer
, len
, (Scsi_Cmnd
*) hostdata
->connected
);
707 PRINTP("issue_queue\n");
709 for (ptr
= (Scsi_Cmnd
*) hostdata
->issue_queue
; ptr
;
710 ptr
= (Scsi_Cmnd
*) ptr
->host_scribble
)
711 len
+= sprint_Scsi_Cmnd (buffer
, len
, ptr
);
713 PRINTP("disconnected_queue\n");
715 for (ptr
= (Scsi_Cmnd
*) hostdata
->disconnected_queue
; ptr
;
716 ptr
= (Scsi_Cmnd
*) ptr
->host_scribble
)
717 len
+= sprint_Scsi_Cmnd (buffer
, len
, ptr
);
719 *start
= buffer
+ offset
;
731 /* Eventually this will go into an include file, but this will be later */
732 Scsi_Host_Template driver_template
= GENERIC_NCR5380
;
734 #include <linux/module.h>
735 #include "scsi_module.c"