Loading...
1===================
2ARECA FIRMWARE SPEC
3===================
4
5Usage of IOP331 adapter
6=======================
7
8(All In/Out is in IOP331's view)
9
101. Message 0
11------------
12
13- InitThread message and return code
14
152. Doorbell is used for RS-232 emulation
16----------------------------------------
17
18inDoorBell
19 bit0
20 data in ready
21 zDRIVER DATA WRITE OK)
22 bit1
23 data out has been read
24 (DRIVER DATA READ OK)
25
26outDooeBell:
27 bit0
28 data out ready
29 (IOP331 DATA WRITE OK)
30 bit1
31 data in has been read
32 (IOP331 DATA READ OK)
33
343. Index Memory Usage
35---------------------
36
37============ ==========================================
38offset 0xf00 for RS232 out (request buffer)
39offset 0xe00 for RS232 in (scratch buffer)
40offset 0xa00 for inbound message code message_rwbuffer
41 (driver send to IOP331)
42offset 0xa00 for outbound message code message_rwbuffer
43 (IOP331 send to driver)
44============ ==========================================
45
464. RS-232 emulation
47-------------------
48
49Currently 128 byte buffer is used:
50
51============ =====================
521st uint32_t Data length (1--124)
53Byte 4--127 Max 124 bytes of data
54============ =====================
55
565. PostQ
57--------
58
59All SCSI Command must be sent through postQ:
60
61 (inbound queue port)
62 Request frame must be 32 bytes aligned:
63
64 #bit27--bit31
65 flag for post ccb
66 #bit0--bit26
67 real address (bit27--bit31) of post arcmsr_cdb
68
69 ===== ===================
70 bit31 == ===============
71 0 256 bytes frame
72 1 512 bytes frame
73 == ===============
74 bit30 == ==============
75 0 normal request
76 1 BIOS request
77 == ==============
78 bit29 reserved
79 bit28 reserved
80 bit27 reserved
81 ===== ===================
82
83 (outbount queue port)
84 Request reply:
85
86 #bit27--bit31
87 flag for reply
88 #bit0--bit26
89 real address (bit27--bit31) of reply arcmsr_cdb
90
91 ===== =======================================================
92 bit31 must be 0 (for this type of reply)
93 bit30 reserved for BIOS handshake
94 bit29 reserved
95 bit28 == ===================================================
96 0 no error, ignore AdapStatus/DevStatus/SenseData
97 1 Error, error code in AdapStatus/DevStatus/SenseData
98 == ===================================================
99 bit27 reserved
100 ===== =======================================================
101
1026. BIOS request
103---------------
104
105All BIOS request is the same with request from PostQ
106
107Except:
108
109Request frame is sent from configuration space:
110
111 ============ ==========================
112 offset: 0x78 Request Frame (bit30 == 1)
113 offset: 0x18 writeonly to generate
114 IRQ to IOP331
115 ============ ==========================
116
117Completion of request::
118
119 (bit30 == 0, bit28==err flag)
120
1217. Definition of SGL entry (structure)
122--------------------------------------
123
1248. Message1 Out - Diag Status Code (????)
125-----------------------------------------
126
1279. Message0 message code
128------------------------
129
130====== =================================================================
1310x00 NOP
1320x01 Get Config
133 ->offset 0xa00 :for outbound message code message_rwbuffer
134 (IOP331 send to driver)
135
136 ===================== ==========================================
137 Signature 0x87974060(4)
138 Request len 0x00000200(4)
139 numbers of queue 0x00000100(4)
140 SDRAM Size 0x00000100(4)-->256 MB
141 IDE Channels 0x00000008(4)
142 vendor 40 bytes char
143 model 8 bytes char
144 FirmVer 16 bytes char
145 Device Map 16 bytes char
146 FirmwareVersion DWORD
147
148 - Added for checking of
149 new firmware capability
150 ===================== ==========================================
1510x02 Set Config
152 ->offset 0xa00 :for inbound message code message_rwbuffer
153 (driver send to IOP331)
154
155 ========================= ==================
156 Signature 0x87974063(4)
157 UPPER32 of Request Frame (4)-->Driver Only
158 ========================= ==================
1590x03 Reset (Abort all queued Command)
1600x04 Stop Background Activity
1610x05 Flush Cache
1620x06 Start Background Activity
163 (re-start if background is halted)
1640x07 Check If Host Command Pending
165 (Novell May Need This Function)
1660x08 Set controller time
167 ->offset 0xa00 for inbound message code message_rwbuffer
168 (driver to IOP331)
169
170 ====== ==================
171 byte 0 0xaa <-- signature
172 byte 1 0x55 <-- signature
173 byte 2 year (04)
174 byte 3 month (1..12)
175 byte 4 date (1..31)
176 byte 5 hour (0..23)
177 byte 6 minute (0..59)
178 byte 7 second (0..59)
179 ====== ==================
180====== =================================================================
181
182
183RS-232 Interface for Areca Raid Controller
184==========================================
185
186 The low level command interface is exclusive with VT100 terminal
187
1881. Sequence of command execution
189--------------------------------
190
191 (A) Header
192 3 bytes sequence (0x5E, 0x01, 0x61)
193
194 (B) Command block
195 variable length of data including length,
196 command code, data and checksum byte
197
198 (C) Return data
199 variable length of data
200
2012. Command block
202----------------
203
204 (A) 1st byte
205 command block length (low byte)
206
207 (B) 2nd byte
208 command block length (high byte)
209
210 .. Note:: command block length shouldn't > 2040 bytes,
211 length excludes these two bytes
212
213 (C) 3rd byte
214 command code
215
216 (D) 4th and following bytes
217 variable length data bytes
218
219 depends on command code
220
221 (E) last byte
222 checksum byte (sum of 1st byte until last data byte)
223
2243. Command code and associated data
225-----------------------------------
226
227The following are command code defined in raid controller Command
228code 0x10--0x1? are used for system level management,
229no password checking is needed and should be implemented in separate
230well controlled utility and not for end user access.
231Command code 0x20--0x?? always check the password,
232password must be entered to enable these command::
233
234 enum
235 {
236 GUI_SET_SERIAL=0x10,
237 GUI_SET_VENDOR,
238 GUI_SET_MODEL,
239 GUI_IDENTIFY,
240 GUI_CHECK_PASSWORD,
241 GUI_LOGOUT,
242 GUI_HTTP,
243 GUI_SET_ETHERNET_ADDR,
244 GUI_SET_LOGO,
245 GUI_POLL_EVENT,
246 GUI_GET_EVENT,
247 GUI_GET_HW_MONITOR,
248 // GUI_QUICK_CREATE=0x20, (function removed)
249 GUI_GET_INFO_R=0x20,
250 GUI_GET_INFO_V,
251 GUI_GET_INFO_P,
252 GUI_GET_INFO_S,
253 GUI_CLEAR_EVENT,
254 GUI_MUTE_BEEPER=0x30,
255 GUI_BEEPER_SETTING,
256 GUI_SET_PASSWORD,
257 GUI_HOST_INTERFACE_MODE,
258 GUI_REBUILD_PRIORITY,
259 GUI_MAX_ATA_MODE,
260 GUI_RESET_CONTROLLER,
261 GUI_COM_PORT_SETTING,
262 GUI_NO_OPERATION,
263 GUI_DHCP_IP,
264 GUI_CREATE_PASS_THROUGH=0x40,
265 GUI_MODIFY_PASS_THROUGH,
266 GUI_DELETE_PASS_THROUGH,
267 GUI_IDENTIFY_DEVICE,
268 GUI_CREATE_RAIDSET=0x50,
269 GUI_DELETE_RAIDSET,
270 GUI_EXPAND_RAIDSET,
271 GUI_ACTIVATE_RAIDSET,
272 GUI_CREATE_HOT_SPARE,
273 GUI_DELETE_HOT_SPARE,
274 GUI_CREATE_VOLUME=0x60,
275 GUI_MODIFY_VOLUME,
276 GUI_DELETE_VOLUME,
277 GUI_START_CHECK_VOLUME,
278 GUI_STOP_CHECK_VOLUME
279 };
280
281Command description
282^^^^^^^^^^^^^^^^^^^
283
284GUI_SET_SERIAL
285 Set the controller serial#
286
287 ================ =============================================
288 byte 0,1 length
289 byte 2 command code 0x10
290 byte 3 password length (should be 0x0f)
291 byte 4-0x13 should be "ArEcATecHnoLogY"
292 byte 0x14--0x23 Serial number string (must be 16 bytes)
293 ================ =============================================
294
295GUI_SET_VENDOR
296 Set vendor string for the controller
297
298 ================ =============================================
299 byte 0,1 length
300 byte 2 command code 0x11
301 byte 3 password length (should be 0x08)
302 byte 4-0x13 should be "ArEcAvAr"
303 byte 0x14--0x3B vendor string (must be 40 bytes)
304 ================ =============================================
305
306GUI_SET_MODEL
307 Set the model name of the controller
308
309 ================ =============================================
310 byte 0,1 length
311 byte 2 command code 0x12
312 byte 3 password length (should be 0x08)
313 byte 4-0x13 should be "ArEcAvAr"
314 byte 0x14--0x1B model string (must be 8 bytes)
315 ================ =============================================
316
317GUI_IDENTIFY
318 Identify device
319
320 ================ =============================================
321 byte 0,1 length
322 byte 2 command code 0x13
323 return "Areca RAID Subsystem "
324 ================ =============================================
325
326GUI_CHECK_PASSWORD
327 Verify password
328
329 ================ =============================================
330 byte 0,1 length
331 byte 2 command code 0x14
332 byte 3 password length
333 byte 4-0x?? user password to be checked
334 ================ =============================================
335
336GUI_LOGOUT
337 Logout GUI (force password checking on next command)
338
339 ================ =============================================
340 byte 0,1 length
341 byte 2 command code 0x15
342 ================ =============================================
343
344GUI_HTTP
345 HTTP interface (reserved for Http proxy service)(0x16)
346
347GUI_SET_ETHERNET_ADDR
348 Set the ethernet MAC address
349
350 ================ =============================================
351 byte 0,1 length
352 byte 2 command code 0x17
353 byte 3 password length (should be 0x08)
354 byte 4-0x13 should be "ArEcAvAr"
355 byte 0x14--0x19 Ethernet MAC address (must be 6 bytes)
356 ================ =============================================
357
358GUI_SET_LOGO
359 Set logo in HTTP
360
361 ================ =============================================
362 byte 0,1 length
363 byte 2 command code 0x18
364 byte 3 Page# (0/1/2/3) (0xff --> clear OEM logo)
365 byte 4/5/6/7 0x55/0xaa/0xa5/0x5a
366 byte 8 TITLE.JPG data (each page must be 2000 bytes)
367
368 .. Note:: page0 1st 2 byte must be
369 actual length of the JPG file
370 ================ =============================================
371
372GUI_POLL_EVENT
373 Poll If Event Log Changed
374
375 ================ =============================================
376 byte 0,1 length
377 byte 2 command code 0x19
378 ================ =============================================
379
380GUI_GET_EVENT
381 Read Event
382
383 ================ =============================================
384 byte 0,1 length
385 byte 2 command code 0x1a
386 byte 3 Event Page (0:1st page/1/2/3:last page)
387 ================ =============================================
388
389GUI_GET_HW_MONITOR
390 Get HW monitor data
391
392 ================ =============================================
393 byte 0,1 length
394 byte 2 command code 0x1b
395 byte 3 # of FANs(example 2)
396 byte 4 # of Voltage sensor(example 3)
397 byte 5 # of temperature sensor(example 2)
398 byte 6 # of power
399 byte 7/8 Fan#0 (RPM)
400 byte 9/10 Fan#1
401 byte 11/12 Voltage#0 original value in ``*1000``
402 byte 13/14 Voltage#0 value
403 byte 15/16 Voltage#1 org
404 byte 17/18 Voltage#1
405 byte 19/20 Voltage#2 org
406 byte 21/22 Voltage#2
407 byte 23 Temp#0
408 byte 24 Temp#1
409 byte 25 Power indicator (bit0 power#0,
410 bit1 power#1)
411 byte 26 UPS indicator
412 ================ =============================================
413
414GUI_QUICK_CREATE
415 Quick create raid/volume set
416
417 ================ ==============================================
418 byte 0,1 length
419 byte 2 command code 0x20
420 byte 3/4/5/6 raw capacity
421 byte 7 raid level
422 byte 8 stripe size
423 byte 9 spare
424 byte 10/11/12/13 device mask (the devices to create raid/volume)
425 ================ ==============================================
426
427 This function is removed, application like
428 to implement quick create function
429
430 need to use GUI_CREATE_RAIDSET and GUI_CREATE_VOLUMESET function.
431
432GUI_GET_INFO_R
433 Get Raid Set Information
434
435 ================ =============================================
436 byte 0,1 length
437 byte 2 command code 0x20
438 byte 3 raidset#
439 ================ =============================================
440
441 ::
442
443 typedef struct sGUI_RAIDSET
444 {
445 BYTE grsRaidSetName[16];
446 DWORD grsCapacity;
447 DWORD grsCapacityX;
448 DWORD grsFailMask;
449 BYTE grsDevArray[32];
450 BYTE grsMemberDevices;
451 BYTE grsNewMemberDevices;
452 BYTE grsRaidState;
453 BYTE grsVolumes;
454 BYTE grsVolumeList[16];
455 BYTE grsRes1;
456 BYTE grsRes2;
457 BYTE grsRes3;
458 BYTE grsFreeSegments;
459 DWORD grsRawStripes[8];
460 DWORD grsRes4;
461 DWORD grsRes5; // Total to 128 bytes
462 DWORD grsRes6; // Total to 128 bytes
463 } sGUI_RAIDSET, *pGUI_RAIDSET;
464
465GUI_GET_INFO_V
466 Get Volume Set Information
467
468 ================ =============================================
469 byte 0,1 length
470 byte 2 command code 0x21
471 byte 3 volumeset#
472 ================ =============================================
473
474 ::
475
476 typedef struct sGUI_VOLUMESET
477 {
478 BYTE gvsVolumeName[16]; // 16
479 DWORD gvsCapacity;
480 DWORD gvsCapacityX;
481 DWORD gvsFailMask;
482 DWORD gvsStripeSize;
483 DWORD gvsNewFailMask;
484 DWORD gvsNewStripeSize;
485 DWORD gvsVolumeStatus;
486 DWORD gvsProgress; // 32
487 sSCSI_ATTR gvsScsi;
488 BYTE gvsMemberDisks;
489 BYTE gvsRaidLevel; // 8
490 BYTE gvsNewMemberDisks;
491 BYTE gvsNewRaidLevel;
492 BYTE gvsRaidSetNumber;
493 BYTE gvsRes0; // 4
494 BYTE gvsRes1[4]; // 64 bytes
495 } sGUI_VOLUMESET, *pGUI_VOLUMESET;
496
497GUI_GET_INFO_P
498 Get Physical Drive Information
499
500 ================ =============================================
501 byte 0,1 length
502 byte 2 command code 0x22
503 byte 3 drive # (from 0 to max-channels - 1)
504 ================ =============================================
505
506 ::
507
508 typedef struct sGUI_PHY_DRV
509 {
510 BYTE gpdModelName[40];
511 BYTE gpdSerialNumber[20];
512 BYTE gpdFirmRev[8];
513 DWORD gpdCapacity;
514 DWORD gpdCapacityX; // Reserved for expansion
515 BYTE gpdDeviceState;
516 BYTE gpdPioMode;
517 BYTE gpdCurrentUdmaMode;
518 BYTE gpdUdmaMode;
519 BYTE gpdDriveSelect;
520 BYTE gpdRaidNumber; // 0xff if not belongs to a raid set
521 sSCSI_ATTR gpdScsi;
522 BYTE gpdReserved[40]; // Total to 128 bytes
523 } sGUI_PHY_DRV, *pGUI_PHY_DRV;
524
525GUI_GET_INFO_S
526 Get System Information
527
528 ================ =============================================
529 byte 0,1 length
530 byte 2 command code 0x23
531 ================ =============================================
532
533 ::
534
535 typedef struct sCOM_ATTR
536 {
537 BYTE comBaudRate;
538 BYTE comDataBits;
539 BYTE comStopBits;
540 BYTE comParity;
541 BYTE comFlowControl;
542 } sCOM_ATTR, *pCOM_ATTR;
543 typedef struct sSYSTEM_INFO
544 {
545 BYTE gsiVendorName[40];
546 BYTE gsiSerialNumber[16];
547 BYTE gsiFirmVersion[16];
548 BYTE gsiBootVersion[16];
549 BYTE gsiMbVersion[16];
550 BYTE gsiModelName[8];
551 BYTE gsiLocalIp[4];
552 BYTE gsiCurrentIp[4];
553 DWORD gsiTimeTick;
554 DWORD gsiCpuSpeed;
555 DWORD gsiICache;
556 DWORD gsiDCache;
557 DWORD gsiScache;
558 DWORD gsiMemorySize;
559 DWORD gsiMemorySpeed;
560 DWORD gsiEvents;
561 BYTE gsiMacAddress[6];
562 BYTE gsiDhcp;
563 BYTE gsiBeeper;
564 BYTE gsiChannelUsage;
565 BYTE gsiMaxAtaMode;
566 BYTE gsiSdramEcc; // 1:if ECC enabled
567 BYTE gsiRebuildPriority;
568 sCOM_ATTR gsiComA; // 5 bytes
569 sCOM_ATTR gsiComB; // 5 bytes
570 BYTE gsiIdeChannels;
571 BYTE gsiScsiHostChannels;
572 BYTE gsiIdeHostChannels;
573 BYTE gsiMaxVolumeSet;
574 BYTE gsiMaxRaidSet;
575 BYTE gsiEtherPort; // 1:if ether net port supported
576 BYTE gsiRaid6Engine; // 1:Raid6 engine supported
577 BYTE gsiRes[75];
578 } sSYSTEM_INFO, *pSYSTEM_INFO;
579
580GUI_CLEAR_EVENT
581 Clear System Event
582
583 ================ =============================================
584 byte 0,1 length
585 byte 2 command code 0x24
586 ================ =============================================
587
588GUI_MUTE_BEEPER
589 Mute current beeper
590
591 ================ =============================================
592 byte 0,1 length
593 byte 2 command code 0x30
594 ================ =============================================
595GUI_BEEPER_SETTING
596 Disable beeper
597
598 ================ =============================================
599 byte 0,1 length
600 byte 2 command code 0x31
601 byte 3 0->disable, 1->enable
602 ================ =============================================
603
604GUI_SET_PASSWORD
605 Change password
606
607 ================ =============================================
608 byte 0,1 length
609 byte 2 command code 0x32
610 byte 3 pass word length ( must <= 15 )
611 byte 4 password (must be alpha-numerical)
612 ================ =============================================
613
614GUI_HOST_INTERFACE_MODE
615 Set host interface mode
616
617 ================ =============================================
618 byte 0,1 length
619 byte 2 command code 0x33
620 byte 3 0->Independent, 1->cluster
621 ================ =============================================
622
623GUI_REBUILD_PRIORITY
624 Set rebuild priority
625
626 ================ =============================================
627 byte 0,1 length
628 byte 2 command code 0x34
629 byte 3 0/1/2/3 (low->high)
630 ================ =============================================
631
632GUI_MAX_ATA_MODE
633 Set maximum ATA mode to be used
634
635 ================ =============================================
636 byte 0,1 length
637 byte 2 command code 0x35
638 byte 3 0/1/2/3 (133/100/66/33)
639 ================ =============================================
640
641GUI_RESET_CONTROLLER
642 Reset Controller
643
644 ================ =============================================
645 byte 0,1 length
646 byte 2 command code 0x36
647 * Response with VT100 screen (discard it)
648 ================ =============================================
649
650GUI_COM_PORT_SETTING
651 COM port setting
652
653 ================ =================================================
654 byte 0,1 length
655 byte 2 command code 0x37
656 byte 3 0->COMA (term port),
657 1->COMB (debug port)
658 byte 4 0/1/2/3/4/5/6/7
659 (1200/2400/4800/9600/19200/38400/57600/115200)
660 byte 5 data bit
661 (0:7 bit, 1:8 bit must be 8 bit)
662 byte 6 stop bit (0:1, 1:2 stop bits)
663 byte 7 parity (0:none, 1:off, 2:even)
664 byte 8 flow control
665 (0:none, 1:xon/xoff, 2:hardware => must use none)
666 ================ =================================================
667
668GUI_NO_OPERATION
669 No operation
670
671 ================ =============================================
672 byte 0,1 length
673 byte 2 command code 0x38
674 ================ =============================================
675
676GUI_DHCP_IP
677 Set DHCP option and local IP address
678
679 ================ =============================================
680 byte 0,1 length
681 byte 2 command code 0x39
682 byte 3 0:dhcp disabled, 1:dhcp enabled
683 byte 4/5/6/7 IP address
684 ================ =============================================
685
686GUI_CREATE_PASS_THROUGH
687 Create pass through disk
688
689 ================ =============================================
690 byte 0,1 length
691 byte 2 command code 0x40
692 byte 3 device #
693 byte 4 scsi channel (0/1)
694 byte 5 scsi id (0-->15)
695 byte 6 scsi lun (0-->7)
696 byte 7 tagged queue (1 enabled)
697 byte 8 cache mode (1 enabled)
698 byte 9 max speed (0/1/2/3/4,
699 async/20/40/80/160 for scsi)
700 (0/1/2/3/4, 33/66/100/133/150 for ide )
701 ================ =============================================
702
703GUI_MODIFY_PASS_THROUGH
704 Modify pass through disk
705
706 ================ =============================================
707 byte 0,1 length
708 byte 2 command code 0x41
709 byte 3 device #
710 byte 4 scsi channel (0/1)
711 byte 5 scsi id (0-->15)
712 byte 6 scsi lun (0-->7)
713 byte 7 tagged queue (1 enabled)
714 byte 8 cache mode (1 enabled)
715 byte 9 max speed (0/1/2/3/4,
716 async/20/40/80/160 for scsi)
717 (0/1/2/3/4, 33/66/100/133/150 for ide )
718 ================ =============================================
719
720GUI_DELETE_PASS_THROUGH
721 Delete pass through disk
722
723 ================ =============================================
724 byte 0,1 length
725 byte 2 command code 0x42
726 byte 3 device# to be deleted
727 ================ =============================================
728GUI_IDENTIFY_DEVICE
729 Identify Device
730
731 ================ =============================================
732 byte 0,1 length
733 byte 2 command code 0x43
734 byte 3 Flash Method
735 (0:flash selected, 1:flash not selected)
736 byte 4/5/6/7 IDE device mask to be flashed
737 .. Note:: no response data available
738 ================ =============================================
739
740GUI_CREATE_RAIDSET
741 Create Raid Set
742
743 ================ =============================================
744 byte 0,1 length
745 byte 2 command code 0x50
746 byte 3/4/5/6 device mask
747 byte 7-22 raidset name (if byte 7 == 0:use default)
748 ================ =============================================
749
750GUI_DELETE_RAIDSET
751 Delete Raid Set
752
753 ================ =============================================
754 byte 0,1 length
755 byte 2 command code 0x51
756 byte 3 raidset#
757 ================ =============================================
758
759GUI_EXPAND_RAIDSET
760 Expand Raid Set
761
762 ================ =============================================
763 byte 0,1 length
764 byte 2 command code 0x52
765 byte 3 raidset#
766 byte 4/5/6/7 device mask for expansion
767 byte 8/9/10 (8:0 no change, 1 change, 0xff:terminate,
768 9:new raid level,
769 10:new stripe size
770 0/1/2/3/4/5->4/8/16/32/64/128K )
771 byte 11/12/13 repeat for each volume in the raidset
772 ================ =============================================
773
774GUI_ACTIVATE_RAIDSET
775 Activate incomplete raid set
776
777 ================ =============================================
778 byte 0,1 length
779 byte 2 command code 0x53
780 byte 3 raidset#
781 ================ =============================================
782
783GUI_CREATE_HOT_SPARE
784 Create hot spare disk
785
786 ================ =============================================
787 byte 0,1 length
788 byte 2 command code 0x54
789 byte 3/4/5/6 device mask for hot spare creation
790 ================ =============================================
791
792GUI_DELETE_HOT_SPARE
793 Delete hot spare disk
794
795 ================ =============================================
796 byte 0,1 length
797 byte 2 command code 0x55
798 byte 3/4/5/6 device mask for hot spare deletion
799 ================ =============================================
800
801GUI_CREATE_VOLUME
802 Create volume set
803
804 ================ =============================================
805 byte 0,1 length
806 byte 2 command code 0x60
807 byte 3 raidset#
808 byte 4-19 volume set name
809 (if byte4 == 0, use default)
810 byte 20-27 volume capacity (blocks)
811 byte 28 raid level
812 byte 29 stripe size
813 (0/1/2/3/4/5->4/8/16/32/64/128K)
814 byte 30 channel
815 byte 31 ID
816 byte 32 LUN
817 byte 33 1 enable tag
818 byte 34 1 enable cache
819 byte 35 speed
820 (0/1/2/3/4->async/20/40/80/160 for scsi)
821 (0/1/2/3/4->33/66/100/133/150 for IDE )
822 byte 36 1 to select quick init
823 ================ =============================================
824
825GUI_MODIFY_VOLUME
826 Modify volume Set
827
828 ================ =============================================
829 byte 0,1 length
830 byte 2 command code 0x61
831 byte 3 volumeset#
832 byte 4-19 new volume set name
833 (if byte4 == 0, not change)
834 byte 20-27 new volume capacity (reserved)
835 byte 28 new raid level
836 byte 29 new stripe size
837 (0/1/2/3/4/5->4/8/16/32/64/128K)
838 byte 30 new channel
839 byte 31 new ID
840 byte 32 new LUN
841 byte 33 1 enable tag
842 byte 34 1 enable cache
843 byte 35 speed
844 (0/1/2/3/4->async/20/40/80/160 for scsi)
845 (0/1/2/3/4->33/66/100/133/150 for IDE )
846 ================ =============================================
847
848GUI_DELETE_VOLUME
849 Delete volume set
850
851 ================ =============================================
852 byte 0,1 length
853 byte 2 command code 0x62
854 byte 3 volumeset#
855 ================ =============================================
856
857GUI_START_CHECK_VOLUME
858 Start volume consistency check
859
860 ================ =============================================
861 byte 0,1 length
862 byte 2 command code 0x63
863 byte 3 volumeset#
864 ================ =============================================
865
866GUI_STOP_CHECK_VOLUME
867 Stop volume consistency check
868
869 ================ =============================================
870 byte 0,1 length
871 byte 2 command code 0x64
872 ================ =============================================
873
8744. Returned data
875----------------
876
877(A) Header
878 3 bytes sequence (0x5E, 0x01, 0x61)
879(B) Length
880 2 bytes
881 (low byte 1st, excludes length and checksum byte)
882(C)
883 status or data:
884
885 1) If length == 1 ==> 1 byte status code::
886
887 #define GUI_OK 0x41
888 #define GUI_RAIDSET_NOT_NORMAL 0x42
889 #define GUI_VOLUMESET_NOT_NORMAL 0x43
890 #define GUI_NO_RAIDSET 0x44
891 #define GUI_NO_VOLUMESET 0x45
892 #define GUI_NO_PHYSICAL_DRIVE 0x46
893 #define GUI_PARAMETER_ERROR 0x47
894 #define GUI_UNSUPPORTED_COMMAND 0x48
895 #define GUI_DISK_CONFIG_CHANGED 0x49
896 #define GUI_INVALID_PASSWORD 0x4a
897 #define GUI_NO_DISK_SPACE 0x4b
898 #define GUI_CHECKSUM_ERROR 0x4c
899 #define GUI_PASSWORD_REQUIRED 0x4d
900
901 2) If length > 1:
902
903 data block returned from controller
904 and the contents depends on the command code
905
906(E) Checksum
907 checksum of length and status or data byte
908
1ARECA FIRMWARE SPEC
2===================
3
4Usage of IOP331 adapter
5=======================
6
7(All In/Out is in IOP331's view)
8
91. Message 0
10------------
11
12- InitThread message and return code
13
142. Doorbell is used for RS-232 emulation
15----------------------------------------
16
17inDoorBell
18 bit0
19 data in ready
20 zDRIVER DATA WRITE OK)
21 bit1
22 data out has been read
23 (DRIVER DATA READ OK)
24
25outDooeBell:
26 bit0
27 data out ready
28 (IOP331 DATA WRITE OK)
29 bit1
30 data in has been read
31 (IOP331 DATA READ OK)
32
333. Index Memory Usage
34---------------------
35
36============ ==========================================
37offset 0xf00 for RS232 out (request buffer)
38offset 0xe00 for RS232 in (scratch buffer)
39offset 0xa00 for inbound message code message_rwbuffer
40 (driver send to IOP331)
41offset 0xa00 for outbound message code message_rwbuffer
42 (IOP331 send to driver)
43============ ==========================================
44
454. RS-232 emulation
46-------------------
47
48Currently 128 byte buffer is used:
49
50============ =====================
511st uint32_t Data length (1--124)
52Byte 4--127 Max 124 bytes of data
53============ =====================
54
555. PostQ
56--------
57
58All SCSI Command must be sent through postQ:
59
60 (inbound queue port)
61 Request frame must be 32 bytes aligned:
62
63 #bit27--bit31
64 flag for post ccb
65 #bit0--bit26
66 real address (bit27--bit31) of post arcmsr_cdb
67
68 ===== ===================
69 bit31 == ===============
70 0 256 bytes frame
71 1 512 bytes frame
72 == ===============
73 bit30 == ==============
74 0 normal request
75 1 BIOS request
76 == ==============
77 bit29 reserved
78 bit28 reserved
79 bit27 reserved
80 ===== ===================
81
82 (outbount queue port)
83 Request reply:
84
85 #bit27--bit31
86 flag for reply
87 #bit0--bit26
88 real address (bit27--bit31) of reply arcmsr_cdb
89
90 ===== =======================================================
91 bit31 must be 0 (for this type of reply)
92 bit30 reserved for BIOS handshake
93 bit29 reserved
94 bit28 == ===================================================
95 0 no error, ignore AdapStatus/DevStatus/SenseData
96 1 Error, error code in AdapStatus/DevStatus/SenseData
97 == ===================================================
98 bit27 reserved
99 ===== =======================================================
100
1016. BIOS request
102---------------
103
104All BIOS request is the same with request from PostQ
105
106Except:
107
108Request frame is sent from configuration space:
109
110 ============ ==========================
111 offset: 0x78 Request Frame (bit30 == 1)
112 offset: 0x18 writeonly to generate
113 IRQ to IOP331
114 ============ ==========================
115
116Completion of request::
117
118 (bit30 == 0, bit28==err flag)
119
1207. Definition of SGL entry (structure)
121--------------------------------------
122
1238. Message1 Out - Diag Status Code (????)
124-----------------------------------------
125
1269. Message0 message code
127------------------------
128
129====== =================================================================
1300x00 NOP
1310x01 Get Config
132 ->offset 0xa00 :for outbound message code message_rwbuffer
133 (IOP331 send to driver)
134
135 ===================== ==========================================
136 Signature 0x87974060(4)
137 Request len 0x00000200(4)
138 numbers of queue 0x00000100(4)
139 SDRAM Size 0x00000100(4)-->256 MB
140 IDE Channels 0x00000008(4)
141 vendor 40 bytes char
142 model 8 bytes char
143 FirmVer 16 bytes char
144 Device Map 16 bytes char
145 FirmwareVersion DWORD
146
147 - Added for checking of
148 new firmware capability
149 ===================== ==========================================
1500x02 Set Config
151 ->offset 0xa00 :for inbound message code message_rwbuffer
152 (driver send to IOP331)
153
154 ========================= ==================
155 Signature 0x87974063(4)
156 UPPER32 of Request Frame (4)-->Driver Only
157 ========================= ==================
1580x03 Reset (Abort all queued Command)
1590x04 Stop Background Activity
1600x05 Flush Cache
1610x06 Start Background Activity
162 (re-start if background is halted)
1630x07 Check If Host Command Pending
164 (Novell May Need This Function)
1650x08 Set controller time
166 ->offset 0xa00 for inbound message code message_rwbuffer
167 (driver to IOP331)
168
169 ====== ==================
170 byte 0 0xaa <-- signature
171 byte 1 0x55 <-- signature
172 byte 2 year (04)
173 byte 3 month (1..12)
174 byte 4 date (1..31)
175 byte 5 hour (0..23)
176 byte 6 minute (0..59)
177 byte 7 second (0..59)
178 ====== ==================
179====== =================================================================
180
181
182RS-232 Interface for Areca Raid Controller
183==========================================
184
185 The low level command interface is exclusive with VT100 terminal
186
1871. Sequence of command execution
188--------------------------------
189
190 (A) Header
191 3 bytes sequence (0x5E, 0x01, 0x61)
192
193 (B) Command block
194 variable length of data including length,
195 command code, data and checksum byte
196
197 (C) Return data
198 variable length of data
199
2002. Command block
201----------------
202
203 (A) 1st byte
204 command block length (low byte)
205
206 (B) 2nd byte
207 command block length (high byte)
208
209 .. Note:: command block length shouldn't > 2040 bytes,
210 length excludes these two bytes
211
212 (C) 3rd byte
213 command code
214
215 (D) 4th and following bytes
216 variable length data bytes
217
218 depends on command code
219
220 (E) last byte
221 checksum byte (sum of 1st byte until last data byte)
222
2233. Command code and associated data
224-----------------------------------
225
226The following are command code defined in raid controller Command
227code 0x10--0x1? are used for system level management,
228no password checking is needed and should be implemented in separate
229well controlled utility and not for end user access.
230Command code 0x20--0x?? always check the password,
231password must be entered to enable these command::
232
233 enum
234 {
235 GUI_SET_SERIAL=0x10,
236 GUI_SET_VENDOR,
237 GUI_SET_MODEL,
238 GUI_IDENTIFY,
239 GUI_CHECK_PASSWORD,
240 GUI_LOGOUT,
241 GUI_HTTP,
242 GUI_SET_ETHERNET_ADDR,
243 GUI_SET_LOGO,
244 GUI_POLL_EVENT,
245 GUI_GET_EVENT,
246 GUI_GET_HW_MONITOR,
247 // GUI_QUICK_CREATE=0x20, (function removed)
248 GUI_GET_INFO_R=0x20,
249 GUI_GET_INFO_V,
250 GUI_GET_INFO_P,
251 GUI_GET_INFO_S,
252 GUI_CLEAR_EVENT,
253 GUI_MUTE_BEEPER=0x30,
254 GUI_BEEPER_SETTING,
255 GUI_SET_PASSWORD,
256 GUI_HOST_INTERFACE_MODE,
257 GUI_REBUILD_PRIORITY,
258 GUI_MAX_ATA_MODE,
259 GUI_RESET_CONTROLLER,
260 GUI_COM_PORT_SETTING,
261 GUI_NO_OPERATION,
262 GUI_DHCP_IP,
263 GUI_CREATE_PASS_THROUGH=0x40,
264 GUI_MODIFY_PASS_THROUGH,
265 GUI_DELETE_PASS_THROUGH,
266 GUI_IDENTIFY_DEVICE,
267 GUI_CREATE_RAIDSET=0x50,
268 GUI_DELETE_RAIDSET,
269 GUI_EXPAND_RAIDSET,
270 GUI_ACTIVATE_RAIDSET,
271 GUI_CREATE_HOT_SPARE,
272 GUI_DELETE_HOT_SPARE,
273 GUI_CREATE_VOLUME=0x60,
274 GUI_MODIFY_VOLUME,
275 GUI_DELETE_VOLUME,
276 GUI_START_CHECK_VOLUME,
277 GUI_STOP_CHECK_VOLUME
278 };
279
280Command description
281^^^^^^^^^^^^^^^^^^^
282
283GUI_SET_SERIAL
284 Set the controller serial#
285
286 ================ =============================================
287 byte 0,1 length
288 byte 2 command code 0x10
289 byte 3 password length (should be 0x0f)
290 byte 4-0x13 should be "ArEcATecHnoLogY"
291 byte 0x14--0x23 Serial number string (must be 16 bytes)
292 ================ =============================================
293
294GUI_SET_VENDOR
295 Set vendor string for the controller
296
297 ================ =============================================
298 byte 0,1 length
299 byte 2 command code 0x11
300 byte 3 password length (should be 0x08)
301 byte 4-0x13 should be "ArEcAvAr"
302 byte 0x14--0x3B vendor string (must be 40 bytes)
303 ================ =============================================
304
305GUI_SET_MODEL
306 Set the model name of the controller
307
308 ================ =============================================
309 byte 0,1 length
310 byte 2 command code 0x12
311 byte 3 password length (should be 0x08)
312 byte 4-0x13 should be "ArEcAvAr"
313 byte 0x14--0x1B model string (must be 8 bytes)
314 ================ =============================================
315
316GUI_IDENTIFY
317 Identify device
318
319 ================ =============================================
320 byte 0,1 length
321 byte 2 command code 0x13
322 return "Areca RAID Subsystem "
323 ================ =============================================
324
325GUI_CHECK_PASSWORD
326 Verify password
327
328 ================ =============================================
329 byte 0,1 length
330 byte 2 command code 0x14
331 byte 3 password length
332 byte 4-0x?? user password to be checked
333 ================ =============================================
334
335GUI_LOGOUT
336 Logout GUI (force password checking on next command)
337
338 ================ =============================================
339 byte 0,1 length
340 byte 2 command code 0x15
341 ================ =============================================
342
343GUI_HTTP
344 HTTP interface (reserved for Http proxy service)(0x16)
345
346GUI_SET_ETHERNET_ADDR
347 Set the ethernet MAC address
348
349 ================ =============================================
350 byte 0,1 length
351 byte 2 command code 0x17
352 byte 3 password length (should be 0x08)
353 byte 4-0x13 should be "ArEcAvAr"
354 byte 0x14--0x19 Ethernet MAC address (must be 6 bytes)
355 ================ =============================================
356
357GUI_SET_LOGO
358 Set logo in HTTP
359
360 ================ =============================================
361 byte 0,1 length
362 byte 2 command code 0x18
363 byte 3 Page# (0/1/2/3) (0xff --> clear OEM logo)
364 byte 4/5/6/7 0x55/0xaa/0xa5/0x5a
365 byte 8 TITLE.JPG data (each page must be 2000 bytes)
366
367 .. Note:: page0 1st 2 byte must be
368 actual length of the JPG file
369 ================ =============================================
370
371GUI_POLL_EVENT
372 Poll If Event Log Changed
373
374 ================ =============================================
375 byte 0,1 length
376 byte 2 command code 0x19
377 ================ =============================================
378
379GUI_GET_EVENT
380 Read Event
381
382 ================ =============================================
383 byte 0,1 length
384 byte 2 command code 0x1a
385 byte 3 Event Page (0:1st page/1/2/3:last page)
386 ================ =============================================
387
388GUI_GET_HW_MONITOR
389 Get HW monitor data
390
391 ================ =============================================
392 byte 0,1 length
393 byte 2 command code 0x1b
394 byte 3 # of FANs(example 2)
395 byte 4 # of Voltage sensor(example 3)
396 byte 5 # of temperature sensor(example 2)
397 byte 6 # of power
398 byte 7/8 Fan#0 (RPM)
399 byte 9/10 Fan#1
400 byte 11/12 Voltage#0 original value in ``*1000``
401 byte 13/14 Voltage#0 value
402 byte 15/16 Voltage#1 org
403 byte 17/18 Voltage#1
404 byte 19/20 Voltage#2 org
405 byte 21/22 Voltage#2
406 byte 23 Temp#0
407 byte 24 Temp#1
408 byte 25 Power indicator (bit0 power#0,
409 bit1 power#1)
410 byte 26 UPS indicator
411 ================ =============================================
412
413GUI_QUICK_CREATE
414 Quick create raid/volume set
415
416 ================ ==============================================
417 byte 0,1 length
418 byte 2 command code 0x20
419 byte 3/4/5/6 raw capacity
420 byte 7 raid level
421 byte 8 stripe size
422 byte 9 spare
423 byte 10/11/12/13 device mask (the devices to create raid/volume)
424 ================ ==============================================
425
426 This function is removed, application like
427 to implement quick create function
428
429 need to use GUI_CREATE_RAIDSET and GUI_CREATE_VOLUMESET function.
430
431GUI_GET_INFO_R
432 Get Raid Set Information
433
434 ================ =============================================
435 byte 0,1 length
436 byte 2 command code 0x20
437 byte 3 raidset#
438 ================ =============================================
439
440 ::
441
442 typedef struct sGUI_RAIDSET
443 {
444 BYTE grsRaidSetName[16];
445 DWORD grsCapacity;
446 DWORD grsCapacityX;
447 DWORD grsFailMask;
448 BYTE grsDevArray[32];
449 BYTE grsMemberDevices;
450 BYTE grsNewMemberDevices;
451 BYTE grsRaidState;
452 BYTE grsVolumes;
453 BYTE grsVolumeList[16];
454 BYTE grsRes1;
455 BYTE grsRes2;
456 BYTE grsRes3;
457 BYTE grsFreeSegments;
458 DWORD grsRawStripes[8];
459 DWORD grsRes4;
460 DWORD grsRes5; // Total to 128 bytes
461 DWORD grsRes6; // Total to 128 bytes
462 } sGUI_RAIDSET, *pGUI_RAIDSET;
463
464GUI_GET_INFO_V
465 Get Volume Set Information
466
467 ================ =============================================
468 byte 0,1 length
469 byte 2 command code 0x21
470 byte 3 volumeset#
471 ================ =============================================
472
473 ::
474
475 typedef struct sGUI_VOLUMESET
476 {
477 BYTE gvsVolumeName[16]; // 16
478 DWORD gvsCapacity;
479 DWORD gvsCapacityX;
480 DWORD gvsFailMask;
481 DWORD gvsStripeSize;
482 DWORD gvsNewFailMask;
483 DWORD gvsNewStripeSize;
484 DWORD gvsVolumeStatus;
485 DWORD gvsProgress; // 32
486 sSCSI_ATTR gvsScsi;
487 BYTE gvsMemberDisks;
488 BYTE gvsRaidLevel; // 8
489 BYTE gvsNewMemberDisks;
490 BYTE gvsNewRaidLevel;
491 BYTE gvsRaidSetNumber;
492 BYTE gvsRes0; // 4
493 BYTE gvsRes1[4]; // 64 bytes
494 } sGUI_VOLUMESET, *pGUI_VOLUMESET;
495
496GUI_GET_INFO_P
497 Get Physical Drive Information
498
499 ================ =============================================
500 byte 0,1 length
501 byte 2 command code 0x22
502 byte 3 drive # (from 0 to max-channels - 1)
503 ================ =============================================
504
505 ::
506
507 typedef struct sGUI_PHY_DRV
508 {
509 BYTE gpdModelName[40];
510 BYTE gpdSerialNumber[20];
511 BYTE gpdFirmRev[8];
512 DWORD gpdCapacity;
513 DWORD gpdCapacityX; // Reserved for expansion
514 BYTE gpdDeviceState;
515 BYTE gpdPioMode;
516 BYTE gpdCurrentUdmaMode;
517 BYTE gpdUdmaMode;
518 BYTE gpdDriveSelect;
519 BYTE gpdRaidNumber; // 0xff if not belongs to a raid set
520 sSCSI_ATTR gpdScsi;
521 BYTE gpdReserved[40]; // Total to 128 bytes
522 } sGUI_PHY_DRV, *pGUI_PHY_DRV;
523
524GUI_GET_INFO_S
525 Get System Information
526
527 ================ =============================================
528 byte 0,1 length
529 byte 2 command code 0x23
530 ================ =============================================
531
532 ::
533
534 typedef struct sCOM_ATTR
535 {
536 BYTE comBaudRate;
537 BYTE comDataBits;
538 BYTE comStopBits;
539 BYTE comParity;
540 BYTE comFlowControl;
541 } sCOM_ATTR, *pCOM_ATTR;
542 typedef struct sSYSTEM_INFO
543 {
544 BYTE gsiVendorName[40];
545 BYTE gsiSerialNumber[16];
546 BYTE gsiFirmVersion[16];
547 BYTE gsiBootVersion[16];
548 BYTE gsiMbVersion[16];
549 BYTE gsiModelName[8];
550 BYTE gsiLocalIp[4];
551 BYTE gsiCurrentIp[4];
552 DWORD gsiTimeTick;
553 DWORD gsiCpuSpeed;
554 DWORD gsiICache;
555 DWORD gsiDCache;
556 DWORD gsiScache;
557 DWORD gsiMemorySize;
558 DWORD gsiMemorySpeed;
559 DWORD gsiEvents;
560 BYTE gsiMacAddress[6];
561 BYTE gsiDhcp;
562 BYTE gsiBeeper;
563 BYTE gsiChannelUsage;
564 BYTE gsiMaxAtaMode;
565 BYTE gsiSdramEcc; // 1:if ECC enabled
566 BYTE gsiRebuildPriority;
567 sCOM_ATTR gsiComA; // 5 bytes
568 sCOM_ATTR gsiComB; // 5 bytes
569 BYTE gsiIdeChannels;
570 BYTE gsiScsiHostChannels;
571 BYTE gsiIdeHostChannels;
572 BYTE gsiMaxVolumeSet;
573 BYTE gsiMaxRaidSet;
574 BYTE gsiEtherPort; // 1:if ether net port supported
575 BYTE gsiRaid6Engine; // 1:Raid6 engine supported
576 BYTE gsiRes[75];
577 } sSYSTEM_INFO, *pSYSTEM_INFO;
578
579GUI_CLEAR_EVENT
580 Clear System Event
581
582 ================ =============================================
583 byte 0,1 length
584 byte 2 command code 0x24
585 ================ =============================================
586
587GUI_MUTE_BEEPER
588 Mute current beeper
589
590 ================ =============================================
591 byte 0,1 length
592 byte 2 command code 0x30
593 ================ =============================================
594GUI_BEEPER_SETTING
595 Disable beeper
596
597 ================ =============================================
598 byte 0,1 length
599 byte 2 command code 0x31
600 byte 3 0->disable, 1->enable
601 ================ =============================================
602
603GUI_SET_PASSWORD
604 Change password
605
606 ================ =============================================
607 byte 0,1 length
608 byte 2 command code 0x32
609 byte 3 pass word length ( must <= 15 )
610 byte 4 password (must be alpha-numerical)
611 ================ =============================================
612
613GUI_HOST_INTERFACE_MODE
614 Set host interface mode
615
616 ================ =============================================
617 byte 0,1 length
618 byte 2 command code 0x33
619 byte 3 0->Independent, 1->cluster
620 ================ =============================================
621
622GUI_REBUILD_PRIORITY
623 Set rebuild priority
624
625 ================ =============================================
626 byte 0,1 length
627 byte 2 command code 0x34
628 byte 3 0/1/2/3 (low->high)
629 ================ =============================================
630
631GUI_MAX_ATA_MODE
632 Set maximum ATA mode to be used
633
634 ================ =============================================
635 byte 0,1 length
636 byte 2 command code 0x35
637 byte 3 0/1/2/3 (133/100/66/33)
638 ================ =============================================
639
640GUI_RESET_CONTROLLER
641 Reset Controller
642
643 ================ =============================================
644 byte 0,1 length
645 byte 2 command code 0x36
646 * Response with VT100 screen (discard it)
647 ================ =============================================
648
649GUI_COM_PORT_SETTING
650 COM port setting
651
652 ================ =================================================
653 byte 0,1 length
654 byte 2 command code 0x37
655 byte 3 0->COMA (term port),
656 1->COMB (debug port)
657 byte 4 0/1/2/3/4/5/6/7
658 (1200/2400/4800/9600/19200/38400/57600/115200)
659 byte 5 data bit
660 (0:7 bit, 1:8 bit must be 8 bit)
661 byte 6 stop bit (0:1, 1:2 stop bits)
662 byte 7 parity (0:none, 1:off, 2:even)
663 byte 8 flow control
664 (0:none, 1:xon/xoff, 2:hardware => must use none)
665 ================ =================================================
666
667GUI_NO_OPERATION
668 No operation
669
670 ================ =============================================
671 byte 0,1 length
672 byte 2 command code 0x38
673 ================ =============================================
674
675GUI_DHCP_IP
676 Set DHCP option and local IP address
677
678 ================ =============================================
679 byte 0,1 length
680 byte 2 command code 0x39
681 byte 3 0:dhcp disabled, 1:dhcp enabled
682 byte 4/5/6/7 IP address
683 ================ =============================================
684
685GUI_CREATE_PASS_THROUGH
686 Create pass through disk
687
688 ================ =============================================
689 byte 0,1 length
690 byte 2 command code 0x40
691 byte 3 device #
692 byte 4 scsi channel (0/1)
693 byte 5 scsi id (0-->15)
694 byte 6 scsi lun (0-->7)
695 byte 7 tagged queue (1 enabled)
696 byte 8 cache mode (1 enabled)
697 byte 9 max speed (0/1/2/3/4,
698 async/20/40/80/160 for scsi)
699 (0/1/2/3/4, 33/66/100/133/150 for ide )
700 ================ =============================================
701
702GUI_MODIFY_PASS_THROUGH
703 Modify pass through disk
704
705 ================ =============================================
706 byte 0,1 length
707 byte 2 command code 0x41
708 byte 3 device #
709 byte 4 scsi channel (0/1)
710 byte 5 scsi id (0-->15)
711 byte 6 scsi lun (0-->7)
712 byte 7 tagged queue (1 enabled)
713 byte 8 cache mode (1 enabled)
714 byte 9 max speed (0/1/2/3/4,
715 async/20/40/80/160 for scsi)
716 (0/1/2/3/4, 33/66/100/133/150 for ide )
717 ================ =============================================
718
719GUI_DELETE_PASS_THROUGH
720 Delete pass through disk
721
722 ================ =============================================
723 byte 0,1 length
724 byte 2 command code 0x42
725 byte 3 device# to be deleted
726 ================ =============================================
727GUI_IDENTIFY_DEVICE
728 Identify Device
729
730 ================ =============================================
731 byte 0,1 length
732 byte 2 command code 0x43
733 byte 3 Flash Method
734 (0:flash selected, 1:flash not selected)
735 byte 4/5/6/7 IDE device mask to be flashed
736 .. Note:: no response data available
737 ================ =============================================
738
739GUI_CREATE_RAIDSET
740 Create Raid Set
741
742 ================ =============================================
743 byte 0,1 length
744 byte 2 command code 0x50
745 byte 3/4/5/6 device mask
746 byte 7-22 raidset name (if byte 7 == 0:use default)
747 ================ =============================================
748
749GUI_DELETE_RAIDSET
750 Delete Raid Set
751
752 ================ =============================================
753 byte 0,1 length
754 byte 2 command code 0x51
755 byte 3 raidset#
756 ================ =============================================
757
758GUI_EXPAND_RAIDSET
759 Expand Raid Set
760
761 ================ =============================================
762 byte 0,1 length
763 byte 2 command code 0x52
764 byte 3 raidset#
765 byte 4/5/6/7 device mask for expansion
766 byte 8/9/10 (8:0 no change, 1 change, 0xff:terminate,
767 9:new raid level,
768 10:new stripe size
769 0/1/2/3/4/5->4/8/16/32/64/128K )
770 byte 11/12/13 repeat for each volume in the raidset
771 ================ =============================================
772
773GUI_ACTIVATE_RAIDSET
774 Activate incomplete raid set
775
776 ================ =============================================
777 byte 0,1 length
778 byte 2 command code 0x53
779 byte 3 raidset#
780 ================ =============================================
781
782GUI_CREATE_HOT_SPARE
783 Create hot spare disk
784
785 ================ =============================================
786 byte 0,1 length
787 byte 2 command code 0x54
788 byte 3/4/5/6 device mask for hot spare creation
789 ================ =============================================
790
791GUI_DELETE_HOT_SPARE
792 Delete hot spare disk
793
794 ================ =============================================
795 byte 0,1 length
796 byte 2 command code 0x55
797 byte 3/4/5/6 device mask for hot spare deletion
798 ================ =============================================
799
800GUI_CREATE_VOLUME
801 Create volume set
802
803 ================ =============================================
804 byte 0,1 length
805 byte 2 command code 0x60
806 byte 3 raidset#
807 byte 4-19 volume set name
808 (if byte4 == 0, use default)
809 byte 20-27 volume capacity (blocks)
810 byte 28 raid level
811 byte 29 stripe size
812 (0/1/2/3/4/5->4/8/16/32/64/128K)
813 byte 30 channel
814 byte 31 ID
815 byte 32 LUN
816 byte 33 1 enable tag
817 byte 34 1 enable cache
818 byte 35 speed
819 (0/1/2/3/4->async/20/40/80/160 for scsi)
820 (0/1/2/3/4->33/66/100/133/150 for IDE )
821 byte 36 1 to select quick init
822 ================ =============================================
823
824GUI_MODIFY_VOLUME
825 Modify volume Set
826
827 ================ =============================================
828 byte 0,1 length
829 byte 2 command code 0x61
830 byte 3 volumeset#
831 byte 4-19 new volume set name
832 (if byte4 == 0, not change)
833 byte 20-27 new volume capacity (reserved)
834 byte 28 new raid level
835 byte 29 new stripe size
836 (0/1/2/3/4/5->4/8/16/32/64/128K)
837 byte 30 new channel
838 byte 31 new ID
839 byte 32 new LUN
840 byte 33 1 enable tag
841 byte 34 1 enable cache
842 byte 35 speed
843 (0/1/2/3/4->async/20/40/80/160 for scsi)
844 (0/1/2/3/4->33/66/100/133/150 for IDE )
845 ================ =============================================
846
847GUI_DELETE_VOLUME
848 Delete volume set
849
850 ================ =============================================
851 byte 0,1 length
852 byte 2 command code 0x62
853 byte 3 volumeset#
854 ================ =============================================
855
856GUI_START_CHECK_VOLUME
857 Start volume consistency check
858
859 ================ =============================================
860 byte 0,1 length
861 byte 2 command code 0x63
862 byte 3 volumeset#
863 ================ =============================================
864
865GUI_STOP_CHECK_VOLUME
866 Stop volume consistency check
867
868 ================ =============================================
869 byte 0,1 length
870 byte 2 command code 0x64
871 ================ =============================================
872
8734. Returned data
874----------------
875
876(A) Header
877 3 bytes sequence (0x5E, 0x01, 0x61)
878(B) Length
879 2 bytes
880 (low byte 1st, excludes length and checksum byte)
881(C)
882 status or data:
883
884 1) If length == 1 ==> 1 byte status code::
885
886 #define GUI_OK 0x41
887 #define GUI_RAIDSET_NOT_NORMAL 0x42
888 #define GUI_VOLUMESET_NOT_NORMAL 0x43
889 #define GUI_NO_RAIDSET 0x44
890 #define GUI_NO_VOLUMESET 0x45
891 #define GUI_NO_PHYSICAL_DRIVE 0x46
892 #define GUI_PARAMETER_ERROR 0x47
893 #define GUI_UNSUPPORTED_COMMAND 0x48
894 #define GUI_DISK_CONFIG_CHANGED 0x49
895 #define GUI_INVALID_PASSWORD 0x4a
896 #define GUI_NO_DISK_SPACE 0x4b
897 #define GUI_CHECKSUM_ERROR 0x4c
898 #define GUI_PASSWORD_REQUIRED 0x4d
899
900 2) If length > 1:
901
902 data block returned from controller
903 and the contents depends on the command code
904
905(E) Checksum
906 checksum of length and status or data byte
907