1 //<MStar Software> 2 //****************************************************************************** 3 // MStar Software 4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5 // All software, firmware and related documentation herein ("MStar Software") are 6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7 // law, including, but not limited to, copyright law and international treaties. 8 // Any use, modification, reproduction, retransmission, or republication of all 9 // or part of MStar Software is expressly prohibited, unless prior written 10 // permission has been granted by MStar. 11 // 12 // By accessing, browsing and/or using MStar Software, you acknowledge that you 13 // have read, understood, and agree, to be bound by below terms ("Terms") and to 14 // comply with all applicable laws and regulations: 15 // 16 // 1. MStar shall retain any and all right, ownership and interest to MStar 17 // Software and any modification/derivatives thereof. 18 // No right, ownership, or interest to MStar Software and any 19 // modification/derivatives thereof is transferred to you under Terms. 20 // 21 // 2. You understand that MStar Software might include, incorporate or be 22 // supplied together with third party`s software and the use of MStar 23 // Software may require additional licenses from third parties. 24 // Therefore, you hereby agree it is your sole responsibility to separately 25 // obtain any and all third party right and license necessary for your use of 26 // such third party`s software. 27 // 28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29 // MStar`s confidential information and you agree to keep MStar`s 30 // confidential information in strictest confidence and not disclose to any 31 // third party. 32 // 33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34 // kind. Any warranties are hereby expressly disclaimed by MStar, including 35 // without limitation, any warranties of merchantability, non-infringement of 36 // intellectual property rights, fitness for a particular purpose, error free 37 // and in conformity with any international standard. You agree to waive any 38 // claim against MStar for any loss, damage, cost or expense that you may 39 // incur related to your use of MStar Software. 40 // In no event shall MStar be liable for any direct, indirect, incidental or 41 // consequential damages, including without limitation, lost of profit or 42 // revenues, lost or damage of data, and unauthorized system use. 43 // You agree that this Section 4 shall still apply without being affected 44 // even if MStar Software has been modified by MStar in accordance with your 45 // request or instruction for your use, except otherwise agreed by both 46 // parties in writing. 47 // 48 // 5. If requested, MStar may from time to time provide technical supports or 49 // services in relation with MStar Software to you for your use of 50 // MStar Software in conjunction with your or your customer`s product 51 // ("Services"). 52 // You understand and agree that, except otherwise agreed by both parties in 53 // writing, Services are provided on an "AS IS" basis and the warranty 54 // disclaimer set forth in Section 4 above shall apply. 55 // 56 // 6. Nothing contained herein shall be construed as by implication, estoppels 57 // or otherwise: 58 // (a) conferring any license or right to use MStar name, trademark, service 59 // mark, symbol or any other identification; 60 // (b) obligating MStar or any of its affiliates to furnish any person, 61 // including without limitation, you and your customers, any assistance 62 // of any kind whatsoever, or any information; or 63 // (c) conferring any license or right under any intellectual property right. 64 // 65 // 7. These terms shall be governed by and construed in accordance with the laws 66 // of Taiwan, R.O.C., excluding its conflict of law rules. 67 // Any and all dispute arising out hereof or related hereto shall be finally 68 // settled by arbitration referred to the Chinese Arbitration Association, 69 // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70 // Rules of the Association by three (3) arbitrators appointed in accordance 71 // with the said Rules. 72 // The place of arbitration shall be in Taipei, Taiwan and the language shall 73 // be English. 74 // The arbitration award shall be final and binding to both parties. 75 // 76 //****************************************************************************** 77 //<MStar Software> 78 79 80 #ifndef SCSI_H 81 #define SCSI_H 82 83 #include <MsTypes.h> 84 #include "include/drvTypes.h" 85 #include "drvUsbcommon.h" 86 //#include "../../include/kernel/Timer.h" 87 //#include "../mass_stor/drvMassStor.h" 88 89 #define MAX_USTOR 8 90 91 92 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 93 94 #define TEST_UNIT_READY 0x00 95 #define REQUEST_SENSE 0x03 96 #define FORMAT_UNIT 0x04 97 #define INQUIRY 0x12 98 #define MODE_SELECT 0x15 99 #define RESERVE 0x16 100 #define RELEASE 0x17 101 #define MODE_SENSE 0x5a 102 #define MODE_SENSE6 0x1a 103 #define START_STOP 0x1b 104 #define ALLOW_MEDIUM_REMOVAL 0x1e 105 #define READ_CAPACITY 0x25 106 #define READ_10 0x28 107 #define WRITE_10 0x2a 108 #define VERIFY 0x2f 109 #define SYNCHRONIZE_CACHE 0x35 110 #define WRITE_BUFFER 0x3b 111 #define PERSISTENT_RESERVE_IN 0x5e 112 #define PERSISTENT_RESERVE_OUT 0x5f 113 114 #define SEND_DIAGNOSTIC 0x1d 115 116 117 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 118 #define GOOD 0x00 119 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 120 #define CHECK_CONDITION 0x01 121 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 122 #define CONDITION_GOOD 0x02 123 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 124 #define BUSY 0x04 125 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 126 #define INTERMEDIATE_GOOD 0x08 127 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 128 #define INTERMEDIATE_C_GOOD 0x0a 129 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 130 #define RESERVATION_CONFLICT 0x0c 131 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 132 #define COMMAND_TERMINATED 0x11 133 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 134 #define QUEUE_FULL 0x14 135 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 136 #define STATUS_MASK 0x3e 137 138 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 139 #define NO_SENSE 0x00 140 #define RECOVERED_ERROR 0x01 141 #define NOT_READY 0x02 142 #define MEDIUM_ERROR 0x03 143 #define HARDWARE_ERROR 0x04 144 #define ILLEGAL_REQUEST 0x05 145 #define UNIT_ATTENTION 0x06 146 #define DATA_PROTECT 0x07 147 #define BLANK_CHECK 0x08 148 #define COPY_ABORTED 0x0a 149 #define ABORTED_COMMAND 0x0b 150 #define VOLUME_OVERFLOW 0x0d 151 #define MISCOMPARE 0x0e 152 153 154 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 155 #define TYPE_DISK 0x00 156 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 157 #define TYPE_TAPE 0x01 158 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 159 #define TYPE_PRINTER 0x02 160 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 161 #define TYPE_PROCESSOR 0x03 162 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 163 #define TYPE_WORM 0x04 164 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 165 #define TYPE_ROM 0x05 166 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 167 #define TYPE_SCANNER 0x06 168 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 169 #define TYPE_MOD 0x07 170 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 171 #define TYPE_MEDIUM_CHANGER 0x08 172 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 173 #define TYPE_COMM 0x09 174 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 175 #define TYPE_ENCLOSURE 0x0d 176 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 177 #define TYPE_NO_LUN 0x7f 178 179 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 180 #define COMMAND_COMPLETE 0x00 181 #define EXTENDED_MESSAGE 0x01 182 #define EXTENDED_MODIFY_DATA_POINTER 0x00 183 #define EXTENDED_SDTR 0x01 184 #define EXTENDED_EXTENDED_IDENTIFY 0x02 185 #define EXTENDED_WDTR 0x03 186 #define SAVE_POINTERS 0x02 187 #define RESTORE_POINTERS 0x03 188 #define DISCONNECT 0x04 189 #define INITIATOR_ERROR 0x05 190 #define ABORT 0x06 191 #define MESSAGE_REJECT 0x07 192 #define NOP 0x08 193 #define MSG_PARITY_ERROR 0x09 194 #define LINKED_CMD_COMPLETE 0x0a 195 #define LINKED_FLG_CMD_COMPLETE 0x0b 196 #define BUS_DEVICE_RESET 0x0c 197 198 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 199 #define INITIATE_RECOVERY 0x0f 200 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 201 #define RELEASE_RECOVERY 0x10 202 203 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 204 #define SIMPLE_QUEUE_TAG 0x20 205 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 206 #define HEAD_OF_QUEUE_TAG 0x21 207 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 208 #define ORDERED_QUEUE_TAG 0x22 209 210 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 211 212 #define SCSI_IOCTL_GET_IDLUN 0x5382 /* conflicts with CDROMAUDIOBUFSIZ */ 213 214 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 215 216 #define SCSI_IOCTL_TAGGED_ENABLE 0x5383 217 #define SCSI_IOCTL_TAGGED_DISABLE 0x5384 218 219 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 220 #define SCSI_IOCTL_PROBE_HOST 0x5385 221 222 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 223 #define SCSI_IOCTL_GET_BUS_NUMBER 0x5386 224 225 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 226 #define SCSI_IOCTL_GET_PCI 0x5387 227 228 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 229 #define status_byte(result) (((result) >> 1) & 0x1f) 230 #define msg_byte(result) (((result) >> 8) & 0xff) 231 #define host_byte(result) (((result) >> 16) & 0xff) 232 #define driver_byte(result) (((result) >> 24) & 0xff) 233 #define suggestion(result) (driver_byte(result) & SUGGEST_MASK) 234 235 #define sense_class(sense) (((sense) >> 4) & 0x7) 236 #define sense_error(sense) ((sense) & 0xf) 237 #define sense_valid(sense) ((sense) & 0x80); 238 239 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 240 #define NEEDS_RETRY 0x2001 241 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 242 #define SUCCESS 0x2002 243 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 244 #define FAILED 0x2003 245 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 246 #define QUEUED 0x2004 247 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 248 #define SOFT_ERROR 0x2005 249 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 250 #define ADD_TO_MLQUEUE 0x2006 251 252 #define IDENTIFY_BASE 0x80 253 #define IDENTIFY(can_disconnect, lun) (IDENTIFY_BASE |\ 254 ((can_disconnect) ? 0x40 : 0) |\ 255 ((lun) & 0x07)) 256 257 258 259 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 260 #define MAX_COMMAND_SIZE 16 261 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 262 #define SCSI_SENSE_BUFFERSIZE 64 263 264 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 265 266 267 #define DID_OK 0x00 268 #define DID_NO_CONNECT 0x01 269 #define DID_BUS_BUSY 0x02 270 #define DID_TIME_OUT 0x03 271 #define DID_BAD_TARGET 0x04 272 #define DID_ABORT 0x05 273 #define DID_PARITY 0x06 274 #define DID_ERROR 0x07 275 #define DID_RESET 0x08 276 #define DID_BAD_INTR 0x09 277 #define DID_PASSTHROUGH 0x0a 278 #define DID_SOFT_ERROR 0x0b 279 #define DRIVER_OK 0x00 280 281 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 282 #define SCSI_DATA_UNKNOWN 0 283 #define SCSI_DATA_WRITE 1 284 #define SCSI_DATA_READ 2 285 #define SCSI_DATA_NONE 3 286 287 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 288 #define SAM_STAT_GOOD 0x00 289 #define SAM_STAT_CHECK_CONDITION 0x02 290 #define SAM_STAT_CONDITION_MET 0x04 291 #define SAM_STAT_BUSY 0x08 292 #define SAM_STAT_INTERMEDIATE 0x10 293 #define SAM_STAT_INTERMEDIATE_CONDITION_MET 0x14 294 #define SAM_STAT_RESERVATION_CONFLICT 0x18 295 #define SAM_STAT_COMMAND_TERMINATED 0x22 /* obsolete in SAM-3 */ 296 #define SAM_STAT_TASK_SET_FULL 0x28 297 #define SAM_STAT_ACA_ACTIVE 0x30 298 #define SAM_STAT_TASK_ABORTED 0x40 299 300 301 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 302 #define CBW_TAG 0x01020304 // temp 303 304 #define CBW_SIGNATE 0x43425355 305 #define CSW_SIGNATE 0x53425355 306 #define CSW_STATUS_CMD_PASS 0x00 307 #define CSW_STATUS_CMD_FAIL 0x01 308 #define CSW_STATUS_PHASE_ERROR 0x02 309 310 #define CBW_FLAG_IN 0x80 311 #define CBW_FLAG_OUT 0x00 312 313 #if 0 314 #define CB_LENGTH_TEST_UNIT_READY 0x06 315 #define CB_LENGTH_REQUEST_SENSE 0x0C 316 #define CB_LENGTH_INQUIRY 0x06 317 #define CB_LENGTH_MODE_SENSE 0x0C 318 //#define CB_LENGTH_ALLOW_MEDIUM_REMOVAL 0x1e 319 #define CB_LENGTH_READ_CAPACITY 0x0A 320 #define CB_LENGTH_READ_10 0x0A 321 #define CB_LENGTH_WRITE_10 0x0A 322 #else 323 #define CB_LENGTH_TEST_UNIT_READY 0x0C 324 #define CB_LENGTH_REQUEST_SENSE 0x0C 325 #define CB_LENGTH_INQUIRY 0x0C 326 #define CB_LENGTH_MODE_SENSE 0x0C 327 //#define CB_LENGTH_ALLOW_MEDIUM_REMOVAL 0x1e 328 #define CB_LENGTH_READ_CAPACITY 0x0C 329 #define CB_LENGTH_READ_10 0x0C 330 #define CB_LENGTH_WRITE_10 0x0C 331 #endif 332 333 #define DATA_LENGTH_INQUIRY 36 334 #define DATA_LENGTH_MODE_SENSE 192 335 #define DATA_LENGTH_REQUEST_SENSE 18 336 #define DATA_LENGTH_READ_CAPACITY 8 337 338 #define REMOVABLE_DEVICE_MASK 0x80 339 340 typedef struct CommandBlockWrapper 341 { 342 U32 u32Signature; 343 U32 u32Tag; 344 U32 u32DataTransferLength; 345 unsigned char u8Flags; 346 unsigned char u8LUN; 347 unsigned char u8CBLength; 348 unsigned char u8CB[16]; 349 } CBW; 350 351 typedef struct CommandStatusWrapper 352 { 353 U32 u32Signature; 354 U32 u32Tag; 355 U32 u32DataResidue; 356 unsigned char u8Status; 357 } CSW; 358 359 typedef enum 360 { 361 SCSI_OPSTATE_TEST_UNIT_READY = 0, 362 SCSI_OPSTATE_REQUEST_SENSE, 363 SCSI_OPSTATE_INQUIRY, 364 SCSI_OPSTATE_MODE_SELECT, 365 SCSI_OPSTATE_MODE_SENSE, 366 SCSI_OPSTATE_ALLOW_MEDIUM_REMOVAL, 367 SCSI_OPSTATE_READ_CAPACITY, 368 SCSI_OPSTATE_READ_10, 369 SCSI_OPSTATE_WRITE_10 370 } ScsiOpState; 371 372 373 typedef struct ScsiDevice 374 { 375 // Get by INQUIRY command 376 unsigned char u8DeviceType; 377 unsigned char u8VendorID[8]; 378 unsigned char u8ProductID[16]; 379 unsigned char u8ProductVer[4]; 380 } Scsi_Device; 381 382 // extern Scsi_Device tScsi_Device; 383 struct scsi_cmnd 384 { 385 // int sc_magic; //no use 386 387 // struct Scsi_Host *host; 388 // U16 state; //no use 389 // U16 owner; //no use 390 391 // Scsi_Device device; 392 393 // Scsi_Request *sc_request; 394 // struct scsi_cmnd *next; //no use 395 // struct scsi_cmnd *reset_chain; //no use 396 397 // int eh_state; //no use 398 /* Used for state tracking in error handlr */ 399 // void (*done) (struct scsi_cmnd *); //no use 400 /* Mid-level done function */ 401 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 402 403 U32 serial_number; // CBW Tag 404 // U32 serial_number_at_timeout; //no use 405 406 // int retries; //no use 407 // int allowed; //no use 408 // int timeout_per_command; //no use 409 // int timeout_total; //no use 410 // int timeout; //no use 411 412 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 413 // unsigned volatile char internal_timeout; //no use 414 // struct scsi_cmnd *bh_next; //no use 415 /* To enumerate the commands waiting 416 to be processed. */ 417 418 // U32 target; //no use 419 unsigned char lun; //no use?? 420 // U32 channel; //no use 421 unsigned char cmd_len; 422 // unsigned char old_cmd_len; //no use 423 unsigned char sc_data_direction; 424 // unsigned char sc_old_data_direction; //no use 425 426 /* These elements define the operation we are about to perform */ 427 unsigned char cmnd[MAX_COMMAND_SIZE]; 428 U32 request_bufflen; /* Actual request size */ 429 430 // struct timer_list eh_timeout; /* Used to time out the command. */ 431 void *request_buffer; /* Actual requested buffer */ 432 433 /* These elements define the operation we ultimately want to perform */ 434 // unsigned char data_cmnd[MAX_COMMAND_SIZE]; //no use 435 // U16 old_use_sg; //no use 436 /* We save use_sg here when requesting 437 * sense info */ 438 U16 use_sg; /* Number of pieces of scatter-gather */ 439 // U16 sglist_len; //no use 440 /* size of malloc'd scatter-gather list */ 441 // U16 abort_reason; //no use 442 /* If the mid-level code requests an 443 * abort, this is the reason. */ 444 // U32 bufflen; //no use 445 /* Size of data buffer */ 446 // void *buffer; //no use 447 /* Data buffer */ 448 449 // U32 underflow; //no use 450 /* Return error if less than 451 this amount is transferred */ 452 // U32 old_underflow; //no use 453 /* save underflow here when reusing the 454 * command for error handling */ 455 456 // U32 transfersize; //no use 457 /* How much we are guaranteed to 458 transfer with each SCSI transfer 459 (ie, between disconnect / 460 reconnects. Probably == sector 461 size */ 462 463 int resid; 464 /* Number of bytes requested to be 465 transferred less actual number 466 transferred (0 if not supported) */ 467 468 // struct request *request; //no use 469 /* The command we are 470 working on */ 471 472 unsigned char sense_buffer[SCSI_SENSE_BUFFERSIZE]; /* obtained by REQUEST SENSE 473 * when CHECK CONDITION is 474 * received on original command 475 * (auto-sense) */ 476 477 U32 flags; 478 479 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 480 // U32 done_late:1; //no use 481 482 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 483 void (*scsi_done) (struct scsi_cmnd *); 484 485 /*USB HOST USB HOST USB HOST USB HOST USB HOST USB HOST*/ 486 487 // Scsi_Pointer SCp; /* Scratchpad used by some host adapters */ 488 489 // unsigned char *host_scribble; //no use 490 /* The host adapter is allowed to 491 * call scsi_malloc and get some memory 492 * and hang it here. The host adapter 493 * is also expected to call scsi_free 494 * to release this memory. (The memory 495 * obtained by scsi_malloc is guaranteed 496 * to be at an address < 16Mb). */ 497 498 int result; /* Status code from lower level driver */ 499 500 unsigned char tag; /* SCSI-II queued command tag */ 501 // U32 pid; /* Process ID, starts at 0 */ 502 }; 503 504 typedef struct scsi_cmnd Scsi_Cmnd; 505 506 extern BOOL bSCSI_INQUIRY(U8 uPort, unsigned char uLunNum, unsigned char *pIngBuf); 507 extern BOOL bSCSI_READ_CAPACITY(U8 uPort, unsigned char uLunNum, 508 U32 *pTotalBlks, 509 U32 *pBlkSize); 510 extern BOOL bSCSI_TEST_UNIT_READY(U8 uPort, unsigned char uLunNum, BOOL CheckCBI); //GGYY 511 extern BOOL bInit_USB_Disk(U8 uPort); 512 extern BOOL bSCSI_Read_10(U8 uPort, 513 unsigned char uLunNum, 514 U32 u32BlockAddr, 515 U32 u32BlockNum, 516 unsigned char *u8Buffer); 517 518 extern BOOL bSCSI_Write_10(U8 uPort, 519 unsigned char uLunNum, 520 U32 u32BlockAddr, 521 U32 u32BlockNum, 522 unsigned char *u8Buffer); 523 524 extern BOOL bSCSI_Read_10_512(U8 uPort, 525 unsigned char uLunNum, 526 U32 u32BlockAddr, 527 U32 u32BlockNum, 528 unsigned char *u8Buffer); 529 530 extern BOOL bSCSI_Write_10_512(U8 uPort, 531 unsigned char uLunNum, 532 U32 u32BlockAddr, 533 U32 u32BlockNum, 534 unsigned char *u8Buffer); 535 536 extern BOOL bIsDevValid(U8 uPort, unsigned char LunNum); 537 extern unsigned char u8GetDevType(U8 uPort, unsigned char LunNum); 538 extern void vRemove_DISK_LUNs(U8 uPort); 539 #endif 540 541