arcmsr_spec.rst 25 KB

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