summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/i2o/i2omstr.h
blob: 3065c8c2f58379fbfd3981571bf0ca411a6bf4a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
/*
 * Copyright (c) 1998-1999 by Sun Microsystems, Inc.
 * All rights reserved.
 */

/*
 * *****************************************************************************
 *
 * All software on this website is made available under the following terms and
 * conditions.  By downloading this software, you agree to abide by these terms
 * and conditions with respect to this software.
 *
 * I2O SIG All rights reserved.
 *
 * These header files are provided, pursuant to your I2O SIG membership
 * agreement, free of charge on an as-is basis without warranty of any kind,
 * either express or implied, including but not limited to, implied warranties
 * or merchantability and fitness for a particular purpose.  I2O SIG does not
 * warrant that this program will meet the user's requirements or that the
 * operation of these programs will be uninterrupted or error-free.
 * Acceptance and use of this program constitutes the user's understanding
 * that he will have no recourse to I2O SIG for any actual or consequential
 * damages including, but not limited to, loss profits arising out of use
 * or inability to use this program.
 *
 * Member is permitted to create derivative works to this header-file program.
 * However, all copies of the program and its derivative works must contain the
 * I2O SIG copyright notice.
 *
 * *****************************************************************************
 */

#ifndef	_SYS_I2OMSTOR_H
#define	_SYS_I2OMSTOR_H

#pragma ident	"%Z%%M%	%I%	%E% SMI"

#ifdef	__cplusplus
extern "C" {
#endif

#include	<sys/i2o/i2omsg.h>	/* the Base Message file */
#include	<sys/types.h>



#define	I2OMSTOR_REV 1_5_1	/* Header file revision string */


/*
 * ****************************************************************************
 *
 *    I2OMStor.h -- I2O Random Block Storage Devices Class Message defintion
 *			file
 *
 *    This file contains information presented in Chapter 6, Section 4 of
 *    the I2O Specification.
 *
 *  Revision History: (Revision History tracks the revision number of the I2O
 *	specification)
 *
 *	.92 - First marked revsion used for Proof of Concept.
 *	.93 - Change to match the rev .93 of the spec.
 *	.95 - Updated to Rev .95 of 2/5/96.
 *	1.00 - Checked and Updated against spec version 1.00 4/9/96.
 *	1.xx - Updated to the 1.x version of the I2O Specification (11/04/96).
 *		(RAID disk parameter group definition is not complete.)
 *	1.xx - 11/06/96 1) Changed to new SGL addressing nomenclature.
 *		2) Changed I2O_BSA_FLAGS reference to i2o_bsa_ctl_flags_t.
 *		3) Added BSA request message definitions.
 *		4) Commented out subclass and RAID request message definitions.
 *	1.xx - 11/11/96
 *		1) Updated BSA Cache Control parameters group definitions.
 *	1.xx - 11/13/96
 *		1) Changed messages definitions from "I20" to "I2O".
 *		2) Fixed I2O_BSA_MEDIA_EJECT references.
 *		3) Added "DSC" to Detailed Status Code definitions.
 *	1.xx   11/15/96 - Added #pragma statments for i960.
 *	1.5d   03/05/97 - Update for spec. draft version 1.5d.
 *		1) Added "_BSA" designation to the three reply messages.
 *		2) Added BSA_TIMEOUT DSC.
 *	1.5d   04/11/97 - Corrections from review cycle:
 *		1) Added reserved1 field to OPERATIONAL_CONTROL parameter group.
 *		2) Added reserved2 field to ERROR_LOG parameter group.
 *		3) Added reserved1 field to HIST_STATS parameter group.
 *		4) Added reserved2 field to HIST_STATS parameter group.
 *		5) Added reserved1 field to STORAGE_HIST_STATS parameter group.
 *		6) Added reserved2 field to STORAGE_HIST_STATS parameter group.
 *		7) Removed double underscore from MEDIA_INFO parameter group.
 *	1.5.1  05/02/97 - Corrections from review cycle:
 *		1) Change reply templates to include RetryCount field.
 *		2) Add Aborted Operation reply message.
 *		3) Remove #include for i2outil.h.
 *		4) Add field to 32-bit align CACHE_CONTROL parameter group.
 *		5) Add optional RAID parameter group definitions.
 *		6) Add fields to 32-bit align REDUNDANCY parameter group.
 *		7) Add fields to 32-bit align COMPONENT_SPARES parm group.
 *		8) Add fields to 32-bit align ASSOCIATION parameter group.
 *		9) Add revision string.
 *		10) Convert tabs to spaces.
 *		11) New disclaimer.
 *
 * ****************************************************************************
 */

/*
 * ****************************************************************************
 *  NOTES:
 *
 *   Gets, reads, receives, etc. are all even numbered functions.
 *   Sets, writes, sends, etc. are all odd numbered functions.
 *   Functions that both send and receive data can be either but an attempt
 *   is made to use the function number that indicates the greater transfer
 *   amount.  Functions that do not send or receive data use odd function
 *   numbers.
 *
 *   Some functions are synonyms like read, receive and send, write.
 *
 *   All common functions will have a code of less than 0x80.
 *   Unique functions to a class will start at 0x80.
 *   Executive Functions start at 0xA0.
 *
 *   Utility Message function codes range from 0 - 0x1f
 *   Base Message function codes range from 0x20 - 0xfe
 *   Private Message function code is 0xff.
 * *****************************************************************************
 */




/*
 *  Random Block Storage Class specific functions
 *
 *  Although the names are block storage class specific, the values
 *  assigned are common with other classes when applicable.
 */

#define	I2O_BSA_BLOCK_READ		0x30
#define	I2O_BSA_BLOCK_REASSIGN		0x71
#define	I2O_BSA_BLOCK_WRITE		0x31
#define	I2O_BSA_BLOCK_WRITE_VERIFY	0x33
#define	I2O_BSA_CACHE_FLUSH		0x37
#define	I2O_BSA_DEVICE_RESET		0x27
#define	I2O_BSA_MEDIA_EJECT		0x43
#define	I2O_BSA_MEDIA_FORMAT		0x45
#define	I2O_BSA_MEDIA_LOCK		0x49
#define	I2O_BSA_MEDIA_MOUNT		0x41
#define	I2O_BSA_MEDIA_UNLOCK		0x4B
#define	I2O_BSA_MEDIA_VERIFY		0x35
#define	I2O_BSA_POWER_MANAGEMENT	0x70
#define	I2O_BSA_STATUS_CHECK		0x25

/* RAID Additions. */
/*
 * #define	I2O_MANAGEMENT			0x81
 * #define	I2O_DIAGNOSTICS			0x83
 * #define	I2O_INSTRUMENTATION		0x85
 */

/* Detailed Status Codes for Random Block Storage operations */

#define	I2O_BSA_DSC_SUCCESS		0x0000
#define	I2O_BSA_DSC_MEDIA_ERROR		0x0001
#define	I2O_BSA_DSC_ACCESS_ERROR	0x0002
#define	I2O_BSA_DSC_DEVICE_FAILURE	0x0003
#define	I2O_BSA_DSC_DEVICE_NOT_READY	0x0004
#define	I2O_BSA_DSC_MEDIA_NOT_PRESENT	0x0005
#define	I2O_BSA_DSC_MEDIA_LOCKED	0x0006
#define	I2O_BSA_DSC_MEDIA_FAILURE	0x0007
#define	I2O_BSA_DSC_PROTOCOL_FAILURE	0x0008
#define	I2O_BSA_DSC_BUS_FAILURE		0x0009
#define	I2O_BSA_DSC_ACCESS_VIOLATION	0x000A
#define	I2O_BSA_DSC_WRITE_PROTECTED	0x000B
#define	I2O_BSA_DSC_DEVICE_RESET	0x000C
#define	I2O_BSA_DSC_VOLUME_CHANGED	0x000D
#define	I2O_BSA_DSC_TIMEOUT		0x000E


/* ************************************************************************** */

/* Block Storage Parameter Groups */

/* ************************************************************************* */

/* Block Storage Configuration and Operating Structures and Defines */

/* Block Storage Parameter Groups */

#define	I2O_BSA_DEVICE_INFO_GROUP_NO			0x0000
#define	I2O_BSA_OPERATIONAL_CONTROL_GROUP_NO		0x0001
#define	I2O_BSA_POWER_CONTROL_GROUP_NO			0x0002
#define	I2O_BSA_CACHE_CONTROL_GROUP_NO			0x0003
#define	I2O_BSA_MEDIA_INFO_GROUP_NO			0x0004
#define	I2O_BSA_ERROR_LOG_GROUP_NO			0x0005

/* Block Storage Optional Historical Statistics Parameter Groups */

#define	I2O_BSA_HISTORICAL_STATS_CONTROL_GROUP_NO	0x0180
#define	I2O_BSA_STORAGE_HISTORICAL_STATS_GROUP_NO	0x0181
#define	I2O_BSA_CACHE_HISTORICAL_STATS_GROUP_NO		0x0182

/* Block Storage Optional RAID Disk Parameter Groups */

#define	I2O_BSA_VOLUME_SET_INFORMATION_GROUP_NO		0x0200
#define	I2O_BSA_PROTECTED_SPACE_EXTENT_GROUP_NO		0x0201
#define	I2O_BSA_AGGREGATE_PROT_SPACE_EXT_GROUP_NO	0x0202
#define	I2O_BSA_PHYSICAL_EXTENT_GROUP_NO		0x0203
#define	I2O_BSA_AGGREGATE_PHYSICAL_EXT_GROUP_NO		0x0204
#define	I2O_BSA_REDUNDANCY_GROUP_NO			0x0205
#define	I2O_BSA_COMPONENT_SPARES_GROUP_NO		0x0206
#define	I2O_BSA_ASSOCIATION_TABLE_GROUP_NO		0x0207


/* - 0000h - Device Information Parameters Group defines */

/* Device Type */

#define	I2O_BSA_DEVICE_TYPE_DIRECT		0x00
#define	I2O_BSA_DEVICE_TYPE_WORM		0x04
#define	I2O_BSA_DEVICE_TYPE_CDROM		0x05
#define	I2O_BSA_DEVICE_TYPE_OPTICAL		0x07

/* Device Capability Support */

#define	I2O_BSA_DEV_CAP_CACHING			0x00000001
#define	I2O_BSA_DEV_CAP_MULTI_PATH		0x00000002
#define	I2O_BSA_DEV_CAP_DYNAMIC_CAPACITY	0x00000004
#define	I2O_BSA_DEV_CAP_REMOVABLE_MEDIA		0x00000008
#define	I2O_BSA_DEV_CAP_REMOVEABLE_DEVICE	0x00000010
#define	I2O_BSA_DEV_CAP_READ_ONLY		0x00000020
#define	I2O_BSA_DEV_CAP_LOCKOUT			0x00000040
#define	I2O_BSA_DEV_CAP_BOOT_BYPASS		0x00000080
#define	I2O_BSA_DEV_CAP_COMPRESSION		0x00000100
#define	I2O_BSA_DEV_CAP_DATA_SECURITY		0x00000200
#define	I2O_BSA_DEV_CAP_RAID			0x00000400

/* Device States */

#define	I2O_BSA_DEV_STATE_CACHING		0x00000001
#define	I2O_BSA_DEV_STATE_POWERED_ON		0x00000002
#define	I2O_BSA_DEV_STATE_READY			0x00000004
#define	I2O_BSA_DEV_STATE_MEDIA_LOADED		0x00000008
#define	I2O_BSA_DEV_STATE_DEVICE_LOADED		0x00000010
#define	I2O_BSA_DEV_STATE_READ_ONLY		0x00000020
#define	I2O_BSA_DEV_STATE_LOCKOUT		0x00000040
#define	I2O_BSA_DEV_STATE_BOOT_BYPASS		0x00000080
#define	I2O_BSA_DEV_STATE_COMPRESSION		0x00000100
#define	I2O_BSA_DEV_STATE_DATA_SECURITY		0x00000200
#define	I2O_BSA_DEV_STATE_RAID			0x00000400


/* - 0001h - Operational Control Parameters Group defines */

/* No definition required */


/* - 0002h - Power Control Parameters Group defines */

/* On Access */

#define	I2O_BSA_POWERED_UP_ON_ACCESS	0x00000001
#define	I2O_BSA_LOAD_ON_ACCESS		0x00000002


/* - 0003h - Cache Control Parameters Group defines */

/* Write Policy */

#define	I2O_BSA_NO_WRITE_CACHE		0x00
#define	I2O_BSA_WRITE_TO_CACHE		0x01
#define	I2O_BSA_WRITE_THRU_CACHE	0x02

/* Read Policy */

#define	I2O_BSA_NO_READ_CACHE		0x00
#define	I2O_BSA_READ_CACHE		0x01
#define	I2O_BSA_READ_AHEAD_CACHE	0x02
#define	I2O_BSA_READ_READ_AHEAD_CACHE	0x03

/* Error Correction */

#define	I2O_BSA_ERR_COR_NONE		0x00
#define	I2O_BSA_ERR_COR_UNKNOWN		0x01
#define	I2O_BSA_ERR_COR_OTHER		0x02
#define	I2O_BSA_ERR_COR_PARITY		0x03
#define	I2O_BSA_ERR_COR_SINGLE_BIT_ECC	0x04
#define	I2O_BSA_ERR_COR_MULTI_BIT_ECC	0x05


/* - 0004h - Media Information Parameters Group defines */

/* No definition required */


/* - 0005h - Error Log Parameters Group defines */

/* No definition required */


/* - 0180h - Historical Statistics Control Parameters Group defines */

/* Statistis Control */

#define	I2O_BSA_STAT_CTL_STORAGE_ENABLE		0x01
#define	I2O_BSA_STAT_CTL_CACHE_ENABLE		0x02


/* - 0181h - Storage Historical Statistics Parameter Group defines */

/* No definition required */


/* - 0182h - Cache Historical Statistics Parameter Group defines */

/* No definition required */


/* - 0200H - Volume Set Information Parameter Group defines */

/* No definition required */


/* - 0201h - Protected Space Extent Parameter Group defines */

/* Data Stripe Granularity */

#define	I2O_BSA_DATA_STRIPE_OTHER		0x00
#define	I2O_BSA_DATA_STRIPE_UNKNOWN		0x01
#define	I2O_BSA_DATA_STRIPE_BITS		0x02
#define	I2O_BSA_DATA_STRIPE_BYTES		0x03
#define	I2O_BSA_DATA_STRIPE_16BIT_WORDS		0x04
#define	I2O_BSA_DATA_STRIPE_32BIT_DWORDS	0x05
#define	I2O_BSA_DATA_STRIPE_BLOCKS		0x06

/* - 0202h - Aggregate Protected Space Extent Parameter Group defines */

/* No definition required */


/* - 0203h - Physical Extent Parameter Group defines */

/* Granularity Unit */

#define	I2O_BSA_GRANULARITY_OTHER		0x00
#define	I2O_BSA_GRANULARITY_UNKNOWN		0x01
#define	I2O_BSA_GRANULARITY_BITS		0x02
#define	I2O_BSA_GRANULARITY_BYTES		0x03
#define	I2O_BSA_GRANULARITY_16BIT_WORDS		0x04
#define	I2O_BSA_GRANULARITY_32BIT_DWORDS	0x05
#define	I2O_BSA_GRANULARITY_BLOCKS		0x06


/* - 0204h - Aggregate Physical Extent Parameter Group defines */

/* No definition required */


/* - 0205h - Redundancy Parameter Group defines */

/* Redundancy Type */

#define	I2O_BSA_REDUNDANCY_OTHER		0x00
#define	I2O_BSA_REDUNDANCY_UNKNOWN		0x01
#define	I2O_BSA_REDUNDANCY_NONE			0x02
#define	I2O_BSA_REDUNDANCY_COPY			0x03
#define	I2O_BSA_REDUNDANCY_XOR			0x04
#define	I2O_BSA_REDUNDANCY_P_Q			0x05
#define	I2O_BSA_REDUNDANCY_S			0x06
#define	I2O_BSA_REDUNDANCY_P_S			0x07


/* - 0206h - Component Spares Parameter Group defines */

/* Spare Functioning State */

#define	I2O_BSA_SPARE_STATE_OTHER		0x00
#define	I2O_BSA_SPARE_STATE_UNKNOWN		0x01
#define	I2O_BSA_SPARE_STATE_INACTIVE		0x02
#define	I2O_BSA_SPARE_STATE_ACTIVE		0x03
#define	I2O_BSA_SPARE_STATE_LOAD_BALANCE	0x04


/* - 0207h - Association Table Parameter Group defines */

/* Type */

#define	I2O_BSA_ASSOC_TYPE_PHYSICAL		0x00
#define	I2O_BSA_ASSOC_TYPE_LOGICAL		0x01
#define	I2O_BSA_ASSOC_TYPE_LOG_TO_PHYS		0x02
#define	I2O_BSA_ASSOC_TYPE_PROTECTION		0x03
#define	I2O_BSA_ASSOC_TYPE_SPARE		0x04
#define	I2O_BSA_ASSOC_TYPE_CACHE		0x05
#define	I2O_BSA_ASSOC_TYPE_SOFTWARE		0x06

/* Object 1 Type */

#define	I2O_BSA_OBJECT_1_CONTROLLER		0x00
#define	I2O_BSA_OBJECT_1_DEVICE			0x01
#define	I2O_BSA_OBJECT_1_BUS_PORT		0x02
#define	I2O_BSA_OBJECT_1_VOLUME_SET		0x03
#define	I2O_BSA_OBJECT_1_PROT_SPACE_EXT		0x04
#define	I2O_BSA_OBJECT_1_AGG_PROT_SPACE_EXT	0x05
#define	I2O_BSA_OBJECT_1_PHYSICAL_EXT		0x06
#define	I2O_BSA_OBJECT_1_AGG_PHYSICAL_EXT	0x07
#define	I2O_BSA_OBJECT_1_REDUNDANCY		0x08
#define	I2O_BSA_OBJECT_1_CACHE			0x09
#define	I2O_BSA_OBJECT_1_SOFTWARE		0x0A

/* Object 2 Type */

#define	I2O_BSA_OBJECT_2_CONTROLLER		0x00
#define	I2O_BSA_OBJECT_2_DEVICE			0x01
#define	I2O_BSA_OBJECT_2_BUS_PORT		0x02
#define	I2O_BSA_OBJECT_2_VOLUME_SET		0x03
#define	I2O_BSA_OBJECT_2_PROT_SPACE_EXT		0x04
#define	I2O_BSA_OBJECT_2_AGG_PROT_SPACE_EXT	0x05
#define	I2O_BSA_OBJECT_2_PHYSICAL_EXT		0x06
#define	I2O_BSA_OBJECT_2_AGG_PHYSICAL_EXT	0x07
#define	I2O_BSA_OBJECT_2_REDUNDANCY		0x08
#define	I2O_BSA_OBJECT_2_CACHE			0x09
#define	I2O_BSA_OBJECT_2_SOFTWARE		0x0A




/* Block Storage Group 0000h - Device Information Parameter Group */

typedef struct i2o_bsa_device_info_scalar {
    uint8_t		DeviceType;
    uint8_t		NumberOfPaths;
    uint16_t		PowerState;
    uint32_t		BlockSize;
    uint64_t		DeviceCapacity;
    uint32_t		DeviceCapabilitySupport;
    uint32_t		DeviceState;
} i2o_bsa_device_info_scalar_t;


/* Block Storage Group 0001h - Operational Control Parameter Group */

typedef struct i2o_bsa_operational_control_scalar {
    uint8_t		AutoReassign;
    uint8_t		ReassignTolerance;
    uint8_t		RetryAttempts;
    uint8_t		reserved1;
    uint32_t		ReassignSize;
    uint32_t		ExpectedTimeout;
    uint32_t		RWVTimeout;
    uint32_t		RWVTimeoutBase;
    uint32_t		TimeoutBase;
    uint32_t		OrderedRequestDepth;
    uint32_t		AtomicWriteSize;
} i2o_bsa_operational_control_scalar_t;


/* Block Storage Group 0002h - Power Control Parameter Group */

typedef struct i2o_bsa_power_control_scalar {
    uint32_t		PowerdownTimeout;
    uint32_t		OnAccess;
} i2o_bsa_power_control_scalar_t;


/* Block Storage Group 0003h - Cache Control Parameter Group */

typedef struct i2o_bsa_cache_control_scalar {
    uint32_t		TotalCacheSize;
    uint32_t		ReadCacheSize;
    uint32_t		WriteCacheSize;
    uint8_t		WritePolicy;
    uint8_t		ReadPolicy;
    uint8_t		ErrorCorrection;
    uint8_t		reserved1;	/* Note: not in 1.5 spec. */
} i2o_bsa_cache_control_scalar_t;


/* Block Storage Group 0004h - Media Information Parameter Group */

typedef struct i2o_bsa_media_info_scalar {
    uint64_t		Capacity;
    uint32_t		BlockSize;
} i2o_bsa_media_info_scalar_t;


/* Block Storage Group 0005h - Error Log Parameter Group */

typedef struct i2o_bsa_error_log_table {
    uint16_t		ErrorDataIndex;
    uint8_t		Function;
    uint8_t		RetryCount;
    uint16_t		DetailedErrorCode;
    uint16_t		reserved2;
    uint64_t		TimeStamp;
    uint32_t		UserInfo;
} i2o_bsa_error_log_table_t;


/* Block Storage Group 0180h - Optional Historical STATS Support/Control */

typedef struct i2o_bsa_hist_stats_scalar {
    uint8_t		StatisticsControl;
    uint8_t		reserved1;
    uint16_t		reserved2;
    uint32_t		StorageStatistics;
    uint32_t		CacheStatistics;
} i2o_bsa_hist_stats_scalar_t;


/* Block Storage Group 0181h - Optional Storage Historical STATS */

typedef struct i2o_bsa_storage_hist_stats_scalar {
    uint64_t		ReadCommands;
    uint64_t		WriteCommands;
    uint8_t		DataUnit;
    uint8_t		reserved1;
    uint16_t		reserved2;
    uint64_t		IORange1Read;
    uint64_t		IORange2Read;
    uint64_t		IORange3Read;
    uint64_t		IORange4Read;
    uint64_t		IORange1Write;
    uint64_t		IORange2Write;
    uint64_t		IORange3Write;
    uint64_t		IORange4Write;
    uint64_t		NumberSeeks;
} i2o_bsa_storage_hist_stats_scalar_t;


/* Block Storage Group 0182h - Optional Cache Historical STATS */

typedef struct i2o_bsa_cache_hist_stats_scalar {
    uint64_t		CacheAccess;
    uint64_t		CacheHit;
    uint64_t		PartialCacheHit;
    uint64_t		HitDataSize;
    uint32_t		ValidUsage;
    uint32_t		DirtyUsage;
    uint32_t		TimeLastFault;
    uint32_t		LastFaultFailure;
} i2o_bsa_cache_hist_stats_scalar_t;


/* Block Storage Group 0200h - Optional Volume Set Information */

typedef struct i2o_bsa_volume_info_scalar {
    uint8_t		Name[64];
    uint64_t		TotalStorageCapacity;
    uint64_t		StripeLength;
    uint64_t		InterleaveDepth;
} i2o_bsa_volume_info_scalar_t;


/* Block Storage Group 0201h - Optional Protected Space Extent */

typedef struct i2o_bsa_pro_space_ext_scalar {
    uint64_t		StartAddress;
    uint64_t		NumberBlocks;
    uint32_t		BlockSize;
    uint32_t		DataStripeGranularity;
    uint32_t		DataStripeLength;
} i2o_bsa_pro_space_ext_scalar_t;


/* Block Storage Group 0202h - Optional Aggregate Protected Space Extent */

typedef struct i2o_bsa_agg_prot_space_ext_scalar {
    uint64_t		NumberBlocks;
} i2o_bsa_agg_prot_space_ext_scalar_t;


/* Block Storage Group 0203h - Optional Physical Extent */

typedef struct i2o_bsa_phys_ext_scalar {
    uint64_t		StartAddress;
    uint64_t		NumberBlocks;
    uint32_t		BlockSize;
    uint32_t		GranularityUnit;
    uint64_t		CheckDataInterleave;
    uint64_t		CheckData;
    uint64_t		UserData;
} i2o_bsa_phys_ext_scalar_t;


/* Block Storage Group 0204h - Optional Aggregate Physical Extent */

typedef struct i2o_bsa_agg_phys_ext_scalar {
    uint64_t		NumberBlocks;
    uint64_t		CheckData;
} i2o_bsa_agg_phys_ext_scalar_t;


/* Block Storage Group 0205h - Optional Redundancy Table */

typedef struct i2o_bsa_redundancy_scalar {
    uint8_t	RedundancyType;
    uint8_t	reserved1;	/* Note: not in 1.5 spec. */
    uint16_t	reserved2;	/* Note: not in 1.5 spec. */
} i2o_bsa_redundancy_scalar_t;


/* Block Storage Group 0206h - Optional Component Spares */

typedef struct i2o_bsa_component_spares_table {
    uint8_t	RowNumber;
    uint8_t	SpareType;
    uint8_t	ToBeSparedIndex;
    uint8_t	SparedIndex;
    uint8_t	SpareFunctioningState;
    uint8_t	reserved1;	/* Note: not in 1.5 spec. */
    uint16_t	reserved2;	/* Note: not in 1.5 spec. */
} i2o_bsa_component_spares_table_t;


/* Block Storage Group 0207h - Optional Association Table */

typedef struct i2o_bsa_association_table {
    uint8_t	RowNumber;
    uint8_t	Type;
    uint8_t	Object1Type;
    uint8_t	Object1Index;
    uint8_t	Object2Type;
    uint8_t	Object2Index;
    uint16_t	reserved2;	/* Note: not in 1.5 spec. */
} i2o_bsa_association_table_t;



/* I2O BSA Block Storage Event Indicator Assignment */

#define	I2O_BSA_EVENT_VOLUME_LOAD		0x00000001
#define	I2O_BSA_EVENT_VOLUME_UNLOAD		0x00000002
#define	I2O_BSA_EVENT_VOLUME_UNLOAD_REQUEST	0x00000004
#define	I2O_BSA_EVENT_CAPACITY_CHANGE		0x00000008
#define	I2O_BSA_EVENT_SCSI_SMART		0x00000010




/* Block Storage Class Specific Message Definitions */


/* I2O Block Storage Reply Message Frame Template */

typedef struct i2o_bsa_reply_message_frame {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
    uint16_t			DetailedStatusCode;
    uint8_t			RetryCount;
    uint8_t			ReqStatus;
/* 				ReplyPayload	*/
} i2o_bsa_reply_message_frame_t;



/* I2O Block Storage Successful Completion Reply Message Frame */

typedef struct i2o_bsa_success_reply_message_frame {
    i2o_bsa_reply_message_frame_t BsaReplyFrame;
    uint32_t	TransferCount;
} i2o_bsa_success_reply_message_frame_t;



/* I2O Block Storage Aborted Operation Reply Message Frame */

typedef struct i2o_bsa_abort_reply_message_frame {
    i2o_bsa_reply_message_frame_t	BsaReplyFrame;
} i2o_bsa_abort_reply_message_frame_t;



/* I2O Block Storage Progress Report Reply Message Frame */

typedef struct i2o_bsa_progress_reply_message_frame {
    i2o_bsa_reply_message_frame_t	BsaReplyFrame;
    uint8_t				PercentComplete;
    uint8_t				Reserved[3];
} i2o_bsa_progress_reply_message_frame_t;


/* I2O Block Storage Error Report Reply Message Frame */

typedef struct i2o_bsa_error_reply_message_frame {
    i2o_bsa_reply_message_frame_t	BsaReplyFrame;
    uint32_t				TransferCount;
    uint64_t				LogicalByteAddress;
} i2o_bsa_error_reply_message_frame_t;




/* I2O BSA request message flag definitions */

/* I2O BSA Control Flags */

typedef	uint16_t	i2o_bsa_ctl_flags_t;

#define	I2O_BSA_FLAG_PROGRESS_REPORT	0x0080

/* I2O BSA Block Read Message Control Flags */

typedef uint16_t	i2o_bsa_read_flags_t;
#define	I2O_BSA_RD_FLAG_DONT_RETRY	0x0001
#define	I2O_BSA_RD_FLAG_SOLO		0x0002
#define	I2O_BSA_RD_FLAG_CACHE_READ	0x0004
#define	I2O_BSA_RD_FLAG_READ_PREFETCH	0x0008
#define	I2O_BSA_RD_FLAG_CACHE_DATA	0x0010

/* I2O BSA Block Write Message Control Flags */

typedef	uint16_t	i2o_bsa_write_flags_t;
#define	I2O_BSA_WR_FLAG_DONT_RETRY	0x0001
#define	I2O_BSA_WR_FLAG_SOLO		0x0002
#define	I2O_BSA_WR_FLAG_DONT_CACHE	0x0004
#define	I2O_BSA_WR_FLAG_WRITE_THRU	0x0008
#define	I2O_BSA_WR_FLAG_WRITE_TO	0x0010

/* I2O BSA Device Reset Message Control Flags */

typedef	uint16_t	i2o_bsa_reset_flags_t;
#define	I2O_BSA_FLAG_HARD_RESET	0x0001

/* I2O BSA Media Verify Message Control Flags */

typedef	uint16_t	i2o_bsa_verify_flags_t;
/* Progress Report flag definition is valid  */
#define	I2O_BSA_ERROR_CORRECTION	0x0040


/* I2O BSA Removeable Media Identifier values */

typedef	uint32_t	i2o_bsa_media_id_t;
#define	I2O_BSA_MEDIA_ID_CURRENT_MOUNTED    0xFFFFFFFF


/* I2O BSA Removeable Media Load Flags */

typedef	uint8_t	i2o_bsa_load_flags_t;
#define	I2O_BSA_LOAD_FLAG_MEDIA_LOCK    0x80


/* I2O BSA Power Management Operation values */

typedef	uint8_t	i2o_bsa_operation_t;
#define	I2O_BSA_POWER_MGT_PARTIAL_POWER_UP		0x01
#define	I2O_BSA_POWER_MGT_POWER_UP			0x02
#define	I2O_BSA_POWER_MGT_POWER_UP_LOAD			0x03
#define	I2O_BSA_POWER_MGT_QUIESCE_DEVICE		0x20
#define	I2O_BSA_POWER_MGT_PARTIAL_POWER_DOWN		0x21
#define	I2O_BSA_POWER_MGT_PARTIAL_POWER_DOWN_UNLOAD	0x22
#define	I2O_BSA_POWER_MGT_POWER_DOWN_UNLOAD		0x23
#define	I2O_BSA_POWER_MGT_POWER_DOWN_RETAIN		0x24



/* I2O BSA Block Read Message Frame */

typedef struct i2o_bsa_read_message {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
    i2o_bsa_read_flags_t	ControlFlags;
    uint8_t			TimeMultiplier;
    uint8_t			FetchAhead;
    uint32_t			TransferByteCount;
    uint64_t			LogicalByteAddress;
    i2o_sg_element_t		SGL;
} i2o_bsa_read_message_t;



/* I2O BSA Block Reassign Message Frame */

typedef struct i2o_bsa_block_reassign_message {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
    uint16_t			Reserved1;
    uint8_t			TimeMultiplier;
    uint8_t			Reserved2;
    i2o_sg_element_t		SGL;
} i2o_bsa_block_reassign_message_t;



/* I2O BSA Block Write Message Frame */

typedef struct i2o_bsa_write_message {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
    i2o_bsa_write_flags_t	ControlFlags;
    uint8_t			TimeMultiplier;
    uint8_t			Reserved;
    uint32_t			TransferByteCount;
    uint64_t			LogicalByteAddress;
    i2o_sg_element_t		SGL;
} i2o_bsa_write_message_t;



/* I2O BSA Block Write and Verify Message Frame */

typedef struct i2o_bsa_write_verify_message {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
    i2o_bsa_write_flags_t	ControlFlags;
    uint8_t			TimeMultiplier;
    uint8_t			Reserved;
    uint32_t			TransferByteCount;
    uint64_t			LogicalByteAddress;
    i2o_sg_element_t		SGL;
} i2o_bsa_write_verify_message_t;



/* I2O BSA Cache Flush Message Frame */

typedef struct i2o_bsa_cache_flush_message {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
    i2o_bsa_ctl_flags_t		ControlFlags;
    uint8_t			TimeMultiplier;
    uint8_t			Reserved;
} i2o_bsa_cache_flush_message_t;



/* I2O BSA Device Reset Message Frame */

typedef struct _12o_bsa_device_reset_message {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
    i2o_bsa_reset_flags_t	ControlFlags;
    uint8_t			TimeMultiplier;
    uint8_t			Reserved;
} i2o_bsa_device_reset_message_t;



/* I2O BSA Media Eject for Removeable Media Message Frame */

typedef struct i2o_bsa_media_eject_message {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
    i2o_bsa_media_id_t		MediaIdentifier;
} i2o_bsa_media_eject_message_t;



/* I2O BSA Media Lock Message Frame */

typedef struct i2o_bsa_media_lock_message {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
    i2o_bsa_media_id_t		MediaIdentifier;
} i2o_bsa_media_lock_message_t;



/* I2O BSA Media Mount for Removeable Media Message Frame */

typedef struct i2o_bsa_media_mount_message {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
    i2o_bsa_media_id_t		MediaIdentifier;
    i2o_bsa_load_flags_t	LoadFlags;
    uint8_t			Reserved[3];
} i2o_bsa_media_mount_message_t;



/* I2O BSA Media Unlock Message Frame */

typedef struct i2o_bsa_media_unlock_message {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
    i2o_bsa_media_id_t		MediaIdentifier;
} i2o_bsa_media_unlock_message_t;



/* I2O BSA Media Verify Message Frame */

typedef struct i2o_bsa_media_verify_message {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
    i2o_bsa_verify_flags_t	ControlFlags;
    uint8_t			TimeMultiplier;
    uint8_t			Reserved;
    uint32_t			ByteCount;
    uint64_t			LogicalByteAddress;
} i2o_bsa_media_verify_message_t;



/* I2O BSA Power Management Message Frame */

typedef struct i2o_bsa_power_management_message {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
    i2o_bsa_ctl_flags_t		ControlFlags;
    uint8_t			TimeMultiplier;
    uint8_t			ReplyType;
    i2o_bsa_operation_t		Operation;
} i2o_bsa_power_management_message_t;



/* I2O BSA Status Check Message Frame */

typedef struct i2o_bsa_status_check_message {
    i2o_message_frame_t		StdMessageFrame;
    i2o_transaction_context_t	TransactionContext;
} i2o_bsa_status_check_message_t;


#ifdef	__cplusplus
}
#endif

#endif /* _SYS_I2OMSTOR_H */