3 * buffer : pointer to the data that has been written to the hostfile
4 * length : number of bytes written to the hostfile
5 * HBA_ptr: pointer to the Scsi_Host struct
7 int eata_pio_set_info(char *buffer, int length, struct Scsi_Host *HBA_ptr)
9 DBG(DBG_PROC_WRITE, printk("%s\n", buffer));
10 return(-ENOSYS); /* Currently this is a no-op */
15 * inout : decides on the direction of the dataflow and the meaning of the
17 * buffer: If inout==FALSE data is being written to it else read from it
18 * *start: If inout==FALSE start of the valid data in the buffer
19 * offset: If inout==FALSE offset from the beginning of the imaginary file
20 * from which we start writing into the buffer
21 * length: If inout==FALSE max number of bytes to be written into the buffer
22 * else number of bytes in the buffer
24 int eata_pio_proc_info(char *buffer, char **start, off_t offset, int length,
25 int hostno, int inout)
28 struct Scsi_Host *HBA_ptr;
36 for (i = 1; i <= registered_HBAs; i++) {
37 if (HBA_ptr->host_no == hostno)
39 HBA_ptr = SD(HBA_ptr)->next;
42 if(inout == TRUE) /* Has data been written to the file ? */
43 return(eata_pio_set_info(buffer, length, HBA_ptr));
46 memset(buff, 0, sizeof(buff));
48 size = sprintf(buffer+len, "EATA (Extended Attachment) PIO driver version: "
49 "%d.%d%s\n",VER_MAJOR, VER_MINOR, VER_SUB);
50 len += size; pos = begin + len;
51 size = sprintf(buffer + len, "queued commands: %10ld\n"
52 "processed interrupts:%10ld\n", queue_counter, int_counter);
53 len += size; pos = begin + len;
55 size = sprintf(buffer + len, "\nscsi%-2d: HBA %.10s\n",
56 HBA_ptr->host_no, SD(HBA_ptr)->name);
59 size = sprintf(buffer + len, "Firmware revision: v%s\n",
60 SD(HBA_ptr)->revision);
63 size = sprintf(buffer + len, "IO: PIO\n");
66 size = sprintf(buffer + len, "Base IO : %#.4x\n", (u32) HBA_ptr->base);
69 size = sprintf(buffer + len, "Host Bus: %s\n",
70 (SD(HBA_ptr)->bustype == 'P')?"PCI ":
71 (SD(HBA_ptr)->bustype == 'E')?"EISA":"ISA ");
80 if (pos > offset + length)
83 size = sprintf(buffer+len,"Attached devices: %s\n",
84 (HBA_ptr->host_queue)?"":"none");
88 for(scd = HBA_ptr->host_queue; scd; scd = scd->next) {
89 proc_print_scsidevice(scd, buffer, &size, len);
97 if (pos > offset + length)
102 DBG(DBG_PROC, printk("2pos: %ld offset: %ld len: %d\n", pos, offset, len));
103 *start=buffer+(offset-begin); /* Start of wanted data */
104 len-=(offset-begin); /* Start slop */
106 len = length; /* Ending slop */
107 DBG(DBG_PROC, printk("3pos: %ld offset: %ld len: %d\n", pos, offset, len));
113 * Overrides for Emacs so that we follow Linus's tabbing style.
114 * Emacs will notice this stuff at the end of the file and automatically
115 * adjust the settings for this buffer only. This must remain at the end
117 * ---------------------------------------------------------------------------
120 * c-brace-imaginary-offset: 0
122 * c-argdecl-indent: 4
124 * c-continued-statement-offset: 4
125 * c-continued-brace-offset: 0