This source file includes following definitions.
- gdth_cmnd_priv
1
2 #ifndef _GDTH_H
3 #define _GDTH_H
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #include <linux/types.h>
18
19 #ifndef TRUE
20 #define TRUE 1
21 #endif
22 #ifndef FALSE
23 #define FALSE 0
24 #endif
25
26
27
28
29 #define GDTH_VERSION_STR "3.05"
30 #define GDTH_VERSION 3
31 #define GDTH_SUBVERSION 5
32
33
34 #define PROTOCOL_VERSION 1
35
36
37 #define OEM_ID_ICP 0x941c
38 #define OEM_ID_INTEL 0x8000
39
40
41 #define GDT_PCI 0x03
42 #define GDT_PCINEW 0x04
43 #define GDT_PCIMPR 0x05
44
45 #ifndef PCI_DEVICE_ID_VORTEX_GDT60x0
46
47 #define PCI_DEVICE_ID_VORTEX_GDT60x0 0
48 #define PCI_DEVICE_ID_VORTEX_GDT6000B 1
49
50 #define PCI_DEVICE_ID_VORTEX_GDT6x10 2
51 #define PCI_DEVICE_ID_VORTEX_GDT6x20 3
52 #define PCI_DEVICE_ID_VORTEX_GDT6530 4
53 #define PCI_DEVICE_ID_VORTEX_GDT6550 5
54
55 #define PCI_DEVICE_ID_VORTEX_GDT6x17 6
56 #define PCI_DEVICE_ID_VORTEX_GDT6x27 7
57 #define PCI_DEVICE_ID_VORTEX_GDT6537 8
58 #define PCI_DEVICE_ID_VORTEX_GDT6557 9
59
60 #define PCI_DEVICE_ID_VORTEX_GDT6x15 10
61 #define PCI_DEVICE_ID_VORTEX_GDT6x25 11
62 #define PCI_DEVICE_ID_VORTEX_GDT6535 12
63 #define PCI_DEVICE_ID_VORTEX_GDT6555 13
64 #endif
65
66 #ifndef PCI_DEVICE_ID_VORTEX_GDT6x17RP
67
68 #define PCI_DEVICE_ID_VORTEX_GDT6x17RP 0x100
69 #define PCI_DEVICE_ID_VORTEX_GDT6x27RP 0x101
70 #define PCI_DEVICE_ID_VORTEX_GDT6537RP 0x102
71 #define PCI_DEVICE_ID_VORTEX_GDT6557RP 0x103
72
73 #define PCI_DEVICE_ID_VORTEX_GDT6x11RP 0x104
74 #define PCI_DEVICE_ID_VORTEX_GDT6x21RP 0x105
75 #endif
76 #ifndef PCI_DEVICE_ID_VORTEX_GDT6x17RD
77
78 #define PCI_DEVICE_ID_VORTEX_GDT6x17RD 0x110
79 #define PCI_DEVICE_ID_VORTEX_GDT6x27RD 0x111
80 #define PCI_DEVICE_ID_VORTEX_GDT6537RD 0x112
81 #define PCI_DEVICE_ID_VORTEX_GDT6557RD 0x113
82
83 #define PCI_DEVICE_ID_VORTEX_GDT6x11RD 0x114
84 #define PCI_DEVICE_ID_VORTEX_GDT6x21RD 0x115
85
86 #define PCI_DEVICE_ID_VORTEX_GDT6x18RD 0x118
87
88 #define PCI_DEVICE_ID_VORTEX_GDT6x28RD 0x119
89
90 #define PCI_DEVICE_ID_VORTEX_GDT6x38RD 0x11A
91 #define PCI_DEVICE_ID_VORTEX_GDT6x58RD 0x11B
92
93 #define PCI_DEVICE_ID_VORTEX_GDT7x18RN 0x168
94
95 #define PCI_DEVICE_ID_VORTEX_GDT7x28RN 0x169
96
97 #define PCI_DEVICE_ID_VORTEX_GDT7x38RN 0x16A
98 #define PCI_DEVICE_ID_VORTEX_GDT7x58RN 0x16B
99 #endif
100
101 #ifndef PCI_DEVICE_ID_VORTEX_GDT6x19RD
102
103 #define PCI_DEVICE_ID_VORTEX_GDT6x19RD 0x210
104 #define PCI_DEVICE_ID_VORTEX_GDT6x29RD 0x211
105
106 #define PCI_DEVICE_ID_VORTEX_GDT7x19RN 0x260
107 #define PCI_DEVICE_ID_VORTEX_GDT7x29RN 0x261
108 #endif
109
110 #ifndef PCI_DEVICE_ID_VORTEX_GDTMAXRP
111
112 #define PCI_DEVICE_ID_VORTEX_GDTMAXRP 0x2ff
113 #endif
114
115 #ifndef PCI_DEVICE_ID_VORTEX_GDTNEWRX
116
117 #define PCI_DEVICE_ID_VORTEX_GDTNEWRX 0x300
118 #endif
119
120 #ifndef PCI_DEVICE_ID_VORTEX_GDTNEWRX2
121
122 #define PCI_DEVICE_ID_VORTEX_GDTNEWRX2 0x301
123 #endif
124
125 #ifndef PCI_DEVICE_ID_INTEL_SRC
126
127 #define PCI_DEVICE_ID_INTEL_SRC 0x600
128 #endif
129
130 #ifndef PCI_DEVICE_ID_INTEL_SRC_XSCALE
131
132 #define PCI_DEVICE_ID_INTEL_SRC_XSCALE 0x601
133 #endif
134
135
136 #define GDTH_SCRATCH PAGE_SIZE
137 #define GDTH_MAXCMDS 120
138 #define GDTH_MAXC_P_L 16
139 #define GDTH_MAX_RAW 2
140 #define MAXOFFSETS 128
141 #define MAXHA 16
142 #define MAXID 127
143 #define MAXLUN 8
144 #define MAXBUS 6
145 #define MAX_EVENTS 100
146 #define MAX_RES_ARGS 40
147
148 #define MAXCYLS 1024
149 #define HEADS 64
150 #define SECS 32
151 #define MEDHEADS 127
152 #define MEDSECS 63
153 #define BIGHEADS 255
154 #define BIGSECS 63
155
156
157 #define UNUSED_CMND ((struct scsi_cmnd *)-1)
158 #define INTERNAL_CMND ((struct scsi_cmnd *)-2)
159 #define SCREEN_CMND ((struct scsi_cmnd *)-3)
160 #define SPECIAL_SCP(p) (p==UNUSED_CMND || p==INTERNAL_CMND || p==SCREEN_CMND)
161
162
163 #define SCSIRAWSERVICE 3
164 #define CACHESERVICE 9
165 #define SCREENSERVICE 11
166
167
168 #define MSG_INV_HANDLE -1
169 #define MSGLEN 16
170 #define MSG_SIZE 34
171 #define MSG_REQUEST 0
172
173
174 #define DPMEM_MAGIC 0xC0FFEE11
175 #define IC_HEADER_BYTES 48
176 #define IC_QUEUE_BYTES 4
177 #define DPMEM_COMMAND_OFFSET IC_HEADER_BYTES+IC_QUEUE_BYTES*MAXOFFSETS
178
179
180 #define CLUSTER_DRIVE 1
181 #define CLUSTER_MOUNTED 2
182 #define CLUSTER_RESERVED 4
183 #define CLUSTER_RESERVE_STATE (CLUSTER_DRIVE|CLUSTER_MOUNTED|CLUSTER_RESERVED)
184
185
186 #define GDT_INIT 0
187 #define GDT_READ 1
188 #define GDT_WRITE 2
189 #define GDT_INFO 3
190 #define GDT_FLUSH 4
191 #define GDT_IOCTL 5
192 #define GDT_DEVTYPE 9
193 #define GDT_MOUNT 10
194 #define GDT_UNMOUNT 11
195 #define GDT_SET_FEAT 12
196 #define GDT_GET_FEAT 13
197 #define GDT_WRITE_THR 16
198 #define GDT_READ_THR 17
199 #define GDT_EXT_INFO 18
200 #define GDT_RESET 19
201 #define GDT_RESERVE_DRV 20
202 #define GDT_RELEASE_DRV 21
203 #define GDT_CLUST_INFO 22
204 #define GDT_RW_ATTRIBS 23
205 #define GDT_CLUST_RESET 24
206 #define GDT_FREEZE_IO 25
207 #define GDT_UNFREEZE_IO 26
208 #define GDT_X_INIT_HOST 29
209 #define GDT_X_INFO 30
210
211
212 #define GDT_RESERVE 14
213 #define GDT_RELEASE 15
214 #define GDT_RESERVE_ALL 16
215 #define GDT_RELEASE_ALL 17
216 #define GDT_RESET_BUS 18
217 #define GDT_SCAN_START 19
218 #define GDT_SCAN_END 20
219 #define GDT_X_INIT_RAW 21
220
221
222 #define GDT_REALTIME 3
223 #define GDT_X_INIT_SCR 4
224
225
226 #define SCSI_DR_INFO 0x00
227 #define SCSI_CHAN_CNT 0x05
228 #define SCSI_DR_LIST 0x06
229 #define SCSI_DEF_CNT 0x15
230 #define DSK_STATISTICS 0x4b
231 #define IOCHAN_DESC 0x5d
232 #define IOCHAN_RAW_DESC 0x5e
233 #define L_CTRL_PATTERN 0x20000000L
234 #define ARRAY_INFO 0x12
235 #define ARRAY_DRV_LIST 0x0f
236 #define ARRAY_DRV_LIST2 0x34
237 #define LA_CTRL_PATTERN 0x10000000L
238 #define CACHE_DRV_CNT 0x01
239 #define CACHE_DRV_LIST 0x02
240 #define CACHE_INFO 0x04
241 #define CACHE_CONFIG 0x05
242 #define CACHE_DRV_INFO 0x07
243 #define BOARD_FEATURES 0x15
244 #define BOARD_INFO 0x28
245 #define SET_PERF_MODES 0x82
246 #define GET_PERF_MODES 0x83
247 #define CACHE_READ_OEM_STRING_RECORD 0x84
248 #define HOST_GET 0x10001L
249 #define IO_CHANNEL 0x00020000L
250 #define INVALID_CHANNEL 0x0000ffffL
251
252
253 #define S_OK 1
254 #define S_GENERR 6
255 #define S_BSY 7
256 #define S_CACHE_UNKNOWN 12
257 #define S_RAW_SCSI 12
258 #define S_RAW_ILL 0xff
259 #define S_NOFUNC -2
260 #define S_CACHE_RESERV -24
261
262
263 #define INIT_RETRIES 100000
264 #define INIT_TIMEOUT 100000
265 #define POLL_TIMEOUT 10000
266
267
268 #define DEFAULT_PRI 0x20
269 #define IOCTL_PRI 0x10
270 #define HIGH_PRI 0x08
271
272
273 #define GDTH_DATA_IN 0x01000000L
274 #define GDTH_DATA_OUT 0x00000000L
275
276
277 #define LINUX_OS 8
278 #define SECS32 0x1f
279 #define BIOS_ID_OFFS 0x10
280 #define LOCALBOARD 0
281 #define ASYNCINDEX 0
282 #define SPEZINDEX 1
283 #define COALINDEX (GDTH_MAXCMDS + 2)
284
285
286 #define SCATTER_GATHER 1
287 #define GDT_WR_THROUGH 0x100
288 #define GDT_64BIT 0x200
289
290 #include "gdth_ioctl.h"
291
292
293 typedef struct {
294 u32 msg_handle;
295 u32 msg_len;
296 u32 msg_alen;
297 u8 msg_answer;
298 u8 msg_ext;
299 u8 msg_reserved[2];
300 char msg_text[MSGLEN+2];
301 } __attribute__((packed)) gdth_msg_str;
302
303
304
305
306
307 typedef struct {
308 u32 status;
309 u32 ext_status;
310 u32 info0;
311 u32 info1;
312 } __attribute__((packed)) gdth_coal_status;
313
314
315 typedef struct {
316 u32 version;
317 u32 st_mode;
318 u32 st_buff_addr1;
319 u32 st_buff_u_addr1;
320 u32 st_buff_indx1;
321 u32 st_buff_addr2;
322 u32 st_buff_u_addr2;
323 u32 st_buff_indx2;
324 u32 st_buff_size;
325 u32 cmd_mode;
326 u32 cmd_buff_addr1;
327 u32 cmd_buff_u_addr1;
328 u32 cmd_buff_indx1;
329 u32 cmd_buff_addr2;
330 u32 cmd_buff_u_addr2;
331 u32 cmd_buff_indx2;
332 u32 cmd_buff_size;
333 u32 reserved1;
334 u32 reserved2;
335 } __attribute__((packed)) gdth_perf_modes;
336
337
338 typedef struct {
339 u8 vendor[8];
340 u8 product[16];
341 u8 revision[4];
342 u32 sy_rate;
343 u32 sy_max_rate;
344 u32 no_ldrive;
345 u32 blkcnt;
346 u16 blksize;
347 u8 available;
348 u8 init;
349 u8 devtype;
350 u8 rm_medium;
351 u8 wp_medium;
352 u8 ansi;
353 u8 protocol;
354 u8 sync;
355 u8 disc;
356 u8 queueing;
357 u8 cached;
358 u8 target_id;
359 u8 lun;
360 u8 orphan;
361 u32 last_error;
362 u32 last_result;
363 u32 check_errors;
364 u8 percent;
365 u8 last_check;
366 u8 res[2];
367 u32 flags;
368 u8 multi_bus;
369 u8 mb_status;
370 u8 res2[2];
371 u8 mb_alt_status;
372 u8 mb_alt_bid;
373 u8 mb_alt_tid;
374 u8 res3;
375 u8 fc_flag;
376 u8 res4;
377 u16 fc_frame_size;
378 char wwn[8];
379 } __attribute__((packed)) gdth_diskinfo_str;
380
381
382 typedef struct {
383 u32 channel_no;
384 u32 drive_cnt;
385 u8 siop_id;
386 u8 siop_state;
387 } __attribute__((packed)) gdth_getch_str;
388
389
390 typedef struct {
391 u32 sc_no;
392 u32 sc_cnt;
393 u32 sc_list[MAXID];
394 } __attribute__((packed)) gdth_drlist_str;
395
396
397 typedef struct {
398 u8 sddc_type;
399 u8 sddc_format;
400 u8 sddc_len;
401 u8 sddc_res;
402 u32 sddc_cnt;
403 } __attribute__((packed)) gdth_defcnt_str;
404
405
406 typedef struct {
407 u32 bid;
408 u32 first;
409 u32 entries;
410 u32 count;
411 u32 mon_time;
412 struct {
413 u8 tid;
414 u8 lun;
415 u8 res[2];
416 u32 blk_size;
417 u32 rd_count;
418 u32 wr_count;
419 u32 rd_blk_count;
420 u32 wr_blk_count;
421 u32 retries;
422 u32 reassigns;
423 } __attribute__((packed)) list[1];
424 } __attribute__((packed)) gdth_dskstat_str;
425
426
427 typedef struct {
428 u32 version;
429 u8 list_entries;
430 u8 first_chan;
431 u8 last_chan;
432 u8 chan_count;
433 u32 list_offset;
434 } __attribute__((packed)) gdth_iochan_header;
435
436
437 typedef struct {
438 gdth_iochan_header hdr;
439 struct {
440 u32 address;
441 u8 type;
442 u8 local_no;
443 u16 features;
444 } __attribute__((packed)) list[MAXBUS];
445 } __attribute__((packed)) gdth_iochan_str;
446
447
448 typedef struct {
449 gdth_iochan_header hdr;
450 struct {
451 u8 proc_id;
452 u8 proc_defect;
453 u8 reserved[2];
454 } __attribute__((packed)) list[MAXBUS];
455 } __attribute__((packed)) gdth_raw_iochan_str;
456
457
458 typedef struct {
459 u32 al_controller;
460 u8 al_cache_drive;
461 u8 al_status;
462 u8 al_res[2];
463 } __attribute__((packed)) gdth_arraycomp_str;
464
465
466 typedef struct {
467 u8 ai_type;
468 u8 ai_cache_drive_cnt;
469 u8 ai_state;
470 u8 ai_master_cd;
471 u32 ai_master_controller;
472 u32 ai_size;
473 u32 ai_striping_size;
474 u32 ai_secsize;
475 u32 ai_err_info;
476 u8 ai_name[8];
477 u8 ai_controller_cnt;
478 u8 ai_removable;
479 u8 ai_write_protected;
480 u8 ai_devtype;
481 gdth_arraycomp_str ai_drives[35];
482 u8 ai_drive_entries;
483 u8 ai_protected;
484 u8 ai_verify_state;
485 u8 ai_ext_state;
486 u8 ai_expand_state;
487 u8 ai_reserved[3];
488 } __attribute__((packed)) gdth_arrayinf_str;
489
490
491 typedef struct {
492 u32 controller_no;
493 u8 cd_handle;
494 u8 is_arrayd;
495 u8 is_master;
496 u8 is_parity;
497 u8 is_hotfix;
498 u8 res[3];
499 } __attribute__((packed)) gdth_alist_str;
500
501 typedef struct {
502 u32 entries_avail;
503 u32 entries_init;
504 u32 first_entry;
505 u32 list_offset;
506 gdth_alist_str list[1];
507 } __attribute__((packed)) gdth_arcdl_str;
508
509
510 typedef struct {
511 u32 version;
512 u16 state;
513 u16 strategy;
514 u16 write_back;
515 u16 block_size;
516 } __attribute__((packed)) gdth_cpar_str;
517
518 typedef struct {
519 u32 csize;
520 u32 read_cnt;
521 u32 write_cnt;
522 u32 tr_hits;
523 u32 sec_hits;
524 u32 sec_miss;
525 } __attribute__((packed)) gdth_cstat_str;
526
527 typedef struct {
528 gdth_cpar_str cpar;
529 gdth_cstat_str cstat;
530 } __attribute__((packed)) gdth_cinfo_str;
531
532
533 typedef struct {
534 u8 cd_name[8];
535 u32 cd_devtype;
536 u32 cd_ldcnt;
537 u32 cd_last_error;
538 u8 cd_initialized;
539 u8 cd_removable;
540 u8 cd_write_protected;
541 u8 cd_flags;
542 u32 ld_blkcnt;
543 u32 ld_blksize;
544 u32 ld_dcnt;
545 u32 ld_slave;
546 u32 ld_dtype;
547 u32 ld_last_error;
548 u8 ld_name[8];
549 u8 ld_error;
550 } __attribute__((packed)) gdth_cdrinfo_str;
551
552
553 typedef struct {
554 u32 ctl_version;
555 u32 file_major_version;
556 u32 file_minor_version;
557 u32 buffer_size;
558 u32 cpy_count;
559 u32 ext_error;
560 u32 oem_id;
561 u32 board_id;
562 } __attribute__((packed)) gdth_oem_str_params;
563
564 typedef struct {
565 u8 product_0_1_name[16];
566 u8 product_4_5_name[16];
567 u8 product_cluster_name[16];
568 u8 product_reserved[16];
569 u8 scsi_cluster_target_vendor_id[16];
570 u8 cluster_raid_fw_name[16];
571 u8 oem_brand_name[16];
572 u8 oem_raid_type[16];
573 u8 bios_type[13];
574 u8 bios_title[50];
575 u8 oem_company_name[37];
576 u32 pci_id_1;
577 u32 pci_id_2;
578 u8 validation_status[80];
579 u8 reserved_1[4];
580 u8 scsi_host_drive_inquiry_vendor_id[16];
581 u8 library_file_template[16];
582 u8 reserved_2[16];
583 u8 tool_name_1[32];
584 u8 tool_name_2[32];
585 u8 tool_name_3[32];
586 u8 oem_contact_1[84];
587 u8 oem_contact_2[84];
588 u8 oem_contact_3[84];
589 } __attribute__((packed)) gdth_oem_str;
590
591 typedef struct {
592 gdth_oem_str_params params;
593 gdth_oem_str text;
594 } __attribute__((packed)) gdth_oem_str_ioctl;
595
596
597 typedef struct {
598 u8 chaining;
599 u8 striping;
600 u8 mirroring;
601 u8 raid;
602 } __attribute__((packed)) gdth_bfeat_str;
603
604
605 typedef struct {
606 u32 ser_no;
607 u8 oem_id[2];
608 u16 ep_flags;
609 u32 proc_id;
610 u32 memsize;
611 u8 mem_banks;
612 u8 chan_type;
613 u8 chan_count;
614 u8 rdongle_pres;
615 u32 epr_fw_ver;
616 u32 upd_fw_ver;
617 u32 upd_revision;
618 char type_string[16];
619 char raid_string[16];
620 u8 update_pres;
621 u8 xor_pres;
622 u8 prom_type;
623 u8 prom_count;
624 u32 dup_pres;
625 u32 chan_pres;
626 u32 mem_pres;
627 u8 ft_bus_system;
628 u8 subtype_valid;
629 u8 board_subtype;
630 u8 ramparity_pres;
631 } __attribute__((packed)) gdth_binfo_str;
632
633
634 typedef struct {
635 char name[8];
636 u32 size;
637 u8 host_drive;
638 u8 log_drive;
639 u8 reserved;
640 u8 rw_attribs;
641 u32 start_sec;
642 } __attribute__((packed)) gdth_hentry_str;
643
644 typedef struct {
645 u32 entries;
646 u32 offset;
647 u8 secs_p_head;
648 u8 heads_p_cyl;
649 u8 reserved;
650 u8 clust_drvtype;
651 u32 location;
652 gdth_hentry_str entry[MAX_HDRIVES];
653 } __attribute__((packed)) gdth_hget_str;
654
655
656
657
658
659 typedef struct {
660 u8 S_Cmd_Indx;
661 u8 volatile S_Status;
662 u16 reserved1;
663 u32 S_Info[4];
664 u8 volatile Sema0;
665 u8 reserved2[3];
666 u8 Cmd_Index;
667 u8 reserved3[3];
668 u16 volatile Status;
669 u16 Service;
670 u32 Info[2];
671 struct {
672 u16 offset;
673 u16 serv_id;
674 } __attribute__((packed)) comm_queue[MAXOFFSETS];
675 u32 bios_reserved[2];
676 u8 gdt_dpr_cmd[1];
677 } __attribute__((packed)) gdt_dpr_if;
678
679
680 typedef struct {
681 u32 magic;
682 u16 need_deinit;
683 u8 switch_support;
684 u8 padding[9];
685 u8 os_used[16];
686 u8 unused[28];
687 u8 fw_magic;
688 } __attribute__((packed)) gdt_pci_sram;
689
690
691 typedef struct {
692 union {
693 struct {
694 u8 bios_used[0x3c00-32];
695 u16 need_deinit;
696 u8 switch_support;
697 u8 padding[9];
698 u8 os_used[16];
699 } __attribute__((packed)) dp_sram;
700 u8 bios_area[0x4000];
701 } bu;
702 union {
703 gdt_dpr_if ic;
704 u8 if_area[0x3000];
705 } u;
706 struct {
707 u8 memlock;
708 u8 event;
709 u8 irqen;
710 u8 irqdel;
711 u8 volatile Sema1;
712 u8 rq;
713 } __attribute__((packed)) io;
714 } __attribute__((packed)) gdt2_dpram_str;
715
716
717 typedef struct {
718 union {
719 gdt_dpr_if ic;
720 u8 if_area[0xff0-sizeof(gdt_pci_sram)];
721 } u;
722 gdt_pci_sram gdt6sr;
723 struct {
724 u8 unused0[1];
725 u8 volatile Sema1;
726 u8 unused1[3];
727 u8 irqen;
728 u8 unused2[2];
729 u8 event;
730 u8 unused3[3];
731 u8 irqdel;
732 u8 unused4[3];
733 } __attribute__((packed)) io;
734 } __attribute__((packed)) gdt6_dpram_str;
735
736
737 typedef struct {
738 u8 cfg_reg;
739 u8 unused1[0x3f];
740 u8 volatile sema0_reg;
741 u8 volatile sema1_reg;
742 u8 unused2[2];
743 u16 volatile status;
744 u16 service;
745 u32 info[2];
746 u8 unused3[0x10];
747 u8 ldoor_reg;
748 u8 unused4[3];
749 u8 volatile edoor_reg;
750 u8 unused5[3];
751 u8 control0;
752 u8 control1;
753 u8 unused6[0x16];
754 } __attribute__((packed)) gdt6c_plx_regs;
755
756
757 typedef struct {
758 union {
759 gdt_dpr_if ic;
760 u8 if_area[0x4000-sizeof(gdt_pci_sram)];
761 } u;
762 gdt_pci_sram gdt6sr;
763 } __attribute__((packed)) gdt6c_dpram_str;
764
765
766 typedef struct {
767 u8 unused1[16];
768 u8 volatile sema0_reg;
769 u8 unused2;
770 u8 volatile sema1_reg;
771 u8 unused3;
772 u16 volatile status;
773 u16 service;
774 u32 info[2];
775 u8 ldoor_reg;
776 u8 unused4[11];
777 u8 volatile edoor_reg;
778 u8 unused5[7];
779 u8 edoor_en_reg;
780 u8 unused6[27];
781 u32 unused7[939];
782 u32 severity;
783 char evt_str[256];
784 } __attribute__((packed)) gdt6m_i960_regs;
785
786
787 typedef struct {
788 gdt6m_i960_regs i960r;
789 union {
790 gdt_dpr_if ic;
791 u8 if_area[0x3000-sizeof(gdt_pci_sram)];
792 } u;
793 gdt_pci_sram gdt6sr;
794 } __attribute__((packed)) gdt6m_dpram_str;
795
796
797
798 typedef struct {
799 struct pci_dev *pdev;
800 unsigned long dpmem;
801 unsigned long io;
802 } gdth_pci_str;
803
804
805
806 typedef struct {
807 struct Scsi_Host *shost;
808 struct list_head list;
809 u16 hanum;
810 u16 oem_id;
811 u16 type;
812 u32 stype;
813 u16 fw_vers;
814 u16 cache_feat;
815 u16 raw_feat;
816 u16 screen_feat;
817 void __iomem *brd;
818 u32 brd_phys;
819 gdt6c_plx_regs *plx;
820 gdth_cmd_str cmdext;
821 gdth_cmd_str *pccb;
822 u32 ccb_phys;
823 #ifdef INT_COAL
824 gdth_coal_status *coal_stat;
825 u64 coal_stat_phys;
826 #endif
827 char *pscratch;
828 u64 scratch_phys;
829 u8 scratch_busy;
830 u8 dma64_support;
831 gdth_msg_str *pmsg;
832 u64 msg_phys;
833 u8 scan_mode;
834 u8 irq;
835 u8 drq;
836 u16 status;
837 u16 service;
838 u32 info;
839 u32 info2;
840 struct scsi_cmnd *req_first;
841 struct {
842 u8 present;
843 u8 is_logdrv;
844 u8 is_arraydrv;
845 u8 is_master;
846 u8 is_parity;
847 u8 is_hotfix;
848 u8 master_no;
849 u8 lock;
850 u8 heads;
851 u8 secs;
852 u16 devtype;
853 u64 size;
854 u8 ldr_no;
855 u8 rw_attribs;
856 u8 cluster_type;
857 u8 media_changed;
858 u32 start_sec;
859 } hdr[MAX_LDRIVES];
860 struct {
861 u8 lock;
862 u8 pdev_cnt;
863 u8 local_no;
864 u8 io_cnt[MAXID];
865 u32 address;
866 u32 id_list[MAXID];
867 } raw[MAXBUS];
868 struct {
869 struct scsi_cmnd *cmnd;
870 u16 service;
871 } cmd_tab[GDTH_MAXCMDS];
872 struct gdth_cmndinfo {
873 int index;
874 int internal_command;
875 gdth_cmd_str *internal_cmd_str;
876 dma_addr_t sense_paddr;
877 u8 priority;
878 int timeout_count;
879 volatile int wait_for_completion;
880 u16 status;
881 u32 info;
882 enum dma_data_direction dma_dir;
883 int phase;
884 int OpCode;
885 } cmndinfo[GDTH_MAXCMDS];
886 u8 bus_cnt;
887 u8 tid_cnt;
888 u8 bus_id[MAXBUS];
889 u8 virt_bus;
890 u8 more_proc;
891 u16 cmd_cnt;
892 u16 cmd_len;
893 u16 cmd_offs_dpmem;
894 u16 ic_all_size;
895 gdth_cpar_str cpar;
896 gdth_bfeat_str bfeat;
897 gdth_binfo_str binfo;
898 gdth_evt_data dvr;
899 spinlock_t smp_lock;
900 struct pci_dev *pdev;
901 char oem_name[8];
902 #ifdef GDTH_DMA_STATISTICS
903 unsigned long dma32_cnt, dma64_cnt;
904 #endif
905 struct scsi_device *sdev;
906 } gdth_ha_str;
907
908 static inline struct gdth_cmndinfo *gdth_cmnd_priv(struct scsi_cmnd* cmd)
909 {
910 return (struct gdth_cmndinfo *)cmd->host_scribble;
911 }
912
913
914 typedef struct {
915 u8 type_qual;
916 u8 modif_rmb;
917 u8 version;
918 u8 resp_aenc;
919 u8 add_length;
920 u8 reserved1;
921 u8 reserved2;
922 u8 misc;
923 u8 vendor[8];
924 u8 product[16];
925 u8 revision[4];
926 } __attribute__((packed)) gdth_inq_data;
927
928
929 typedef struct {
930 u32 last_block_no;
931 u32 block_length;
932 } __attribute__((packed)) gdth_rdcap_data;
933
934
935 typedef struct {
936 u64 last_block_no;
937 u32 block_length;
938 } __attribute__((packed)) gdth_rdcap16_data;
939
940
941 typedef struct {
942 u8 errorcode;
943 u8 segno;
944 u8 key;
945 u32 info;
946 u8 add_length;
947 u32 cmd_info;
948 u8 adsc;
949 u8 adsq;
950 u8 fruc;
951 u8 key_spec[3];
952 } __attribute__((packed)) gdth_sense_data;
953
954
955 typedef struct {
956 struct {
957 u8 data_length;
958 u8 med_type;
959 u8 dev_par;
960 u8 bd_length;
961 } __attribute__((packed)) hd;
962 struct {
963 u8 dens_code;
964 u8 block_count[3];
965 u8 reserved;
966 u8 block_length[3];
967 } __attribute__((packed)) bd;
968 } __attribute__((packed)) gdth_modep_data;
969
970
971 typedef struct {
972 unsigned long b[10];
973 } __attribute__((packed)) gdth_stackframe;
974
975
976
977
978 int gdth_show_info(struct seq_file *, struct Scsi_Host *);
979 int gdth_set_info(struct Scsi_Host *, char *, int);
980
981 #endif