-/*++\r
+/** @file\r
+ Copyright (c) 2006, Intel Corporation \r
+ All rights reserved. This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
+**/\r
\r
- atapi.c\r
- \r
-Abstract: \r
- \r
+#include "idebus.h"\r
\r
-Revision History\r
---*/\r
+/**\r
+ This function is used to get the current status of the media residing\r
+ in the LS-120 drive or ZIP drive. The media status is returned in the \r
+ Error Status.\r
\r
-#include "idebus.h"\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
+\r
+ @retval EFI_SUCCESS\r
+ The media status is achieved successfully and the media\r
+ can be read/written.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ Get Media Status Command is failed.\r
+ \r
+ @retval EFI_NO_MEDIA\r
+ There is no media in the drive.\r
+ \r
+ @retval EFI_WRITE_PROTECTED\r
+ The media is writing protected.\r
\r
+ @note\r
+ This function must be called after the LS120EnableMediaStatus() \r
+ with second parameter set to TRUE \r
+ (means enable media status notification) is called.\r
+\r
+**/\r
STATIC\r
EFI_STATUS\r
LS120GetMediaStatus (\r
IN IDE_BLK_IO_DEV *IdeDev\r
)\r
-/*++\r
- Name:\r
- LS120GetMediaStatus\r
-\r
- Purpose: \r
- This function is used to get the current status of the media residing\r
- in the LS-120 drive or ZIP drive. The media status is returned in the \r
- Error Status.\r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
-\r
- Returns: \r
- EFI_SUCCESS\r
- The media status is achieved successfully and the media\r
- can be read/written. \r
- \r
- EFI_DEVICE_ERROR\r
- Get Media Status Command is failed.\r
-\r
- EFI_NO_MEDIA\r
- There is no media in the drive.\r
-\r
- EFI_WRITE_PROTECTED\r
- The media is writing protected. \r
-\r
- Notes: \r
- This function must be called after the LS120EnableMediaStatus() \r
- with second parameter set to TRUE \r
- (means enable media status notification) is called.\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
{\r
UINT8 DeviceSelect;\r
UINT8 StatusValue;\r
}\r
}\r
\r
+/**\r
+ This function is used to send Enable Media Status Notification Command\r
+ or Disable Media Status Notification Command.\r
+\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
+\r
+ @param[in] Enable\r
+ a flag that indicates whether enable or disable media\r
+ status notification.\r
+\r
+ @retval EFI_SUCCESS\r
+ If command completes successfully.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ If command failed.\r
+\r
+**/\r
STATIC\r
EFI_STATUS\r
LS120EnableMediaStatus (\r
IN IDE_BLK_IO_DEV *IdeDev,\r
IN BOOLEAN Enable\r
)\r
-/*++\r
- Name:\r
- LS120EnableMediaStatus\r
-\r
- Purpose: \r
- This function is used to send Enable Media Status Notification Command\r
- or Disable Media Status Notification Command.\r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
-\r
- BOOLEAN IN Enable\r
- a flag that indicates whether enable or disable media\r
- status notification.\r
-\r
- Returns: \r
- EFI_SUCCESS\r
- If command completes successfully.\r
-\r
- EFI_DEVICE_ERROR\r
- If command failed.\r
-\r
-\r
- Notes: \r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
-// TODO: Enable - add argument and description to function comment\r
{\r
UINT8 DeviceSelect;\r
EFI_STATUS Status;\r
return EFI_SUCCESS;\r
}\r
\r
+/**\r
+ This function is called by DiscoverIdeDevice() during its device\r
+ identification.\r
+\r
+ Its main purpose is to get enough information for the device media\r
+ to fill in the Media data structure of the Block I/O Protocol interface.\r
+\r
+ There are 5 steps to reach such objective:\r
+\r
+ 1. Sends out the ATAPI Identify Command to the specified device. \r
+ Only ATAPI device responses to this command. If the command succeeds,\r
+ it returns the Identify data structure which filled with information \r
+ about the device. Since the ATAPI device contains removable media, \r
+ the only meaningful information is the device module name.\r
+\r
+ 2. Sends out ATAPI Inquiry Packet Command to the specified device.\r
+ This command will return inquiry data of the device, which contains\r
+ the device type information.\r
+\r
+ 3. Allocate sense data space for future use. We don't detect the media\r
+ presence here to improvement boot performance, especially when CD \r
+ media is present. The media detection will be performed just before\r
+ each BLK_IO read/write\r
+\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
+\r
+ @retval EFI_SUCCESS\r
+ Identify ATAPI device successfully.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ ATAPI Identify Device Command failed or device type\r
+ is not supported by this IDE driver.\r
+\r
+ @note\r
+ Parameter "IdeDev" will be updated in this function.\r
+\r
+ TODO: EFI_OUT_OF_RESOURCES - add return value to function comment\r
+ TODO: EFI_OUT_OF_RESOURCES - add return value to function comment\r
+**/\r
EFI_STATUS\r
ATAPIIdentify (\r
IN IDE_BLK_IO_DEV *IdeDev\r
)\r
-/*++\r
- Name:\r
- ATAPIIdentify\r
-\r
-\r
- Purpose: \r
- This function is called by DiscoverIdeDevice() during its device\r
- identification.\r
-\r
- Its main purpose is to get enough information for the device media\r
- to fill in the Media data structure of the Block I/O Protocol interface.\r
-\r
- There are 5 steps to reach such objective:\r
-\r
- 1. Sends out the ATAPI Identify Command to the specified device. \r
- Only ATAPI device responses to this command. If the command succeeds,\r
- it returns the Identify data structure which filled with information \r
- about the device. Since the ATAPI device contains removable media, \r
- the only meaningful information is the device module name.\r
-\r
- 2. Sends out ATAPI Inquiry Packet Command to the specified device.\r
- This command will return inquiry data of the device, which contains\r
- the device type information.\r
-\r
- 3. Allocate sense data space for future use. We don't detect the media\r
- presence here to improvement boot performance, especially when CD \r
- media is present. The media detection will be performed just before\r
- each BLK_IO read/write\r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
-\r
- Returns: \r
- EFI_SUCCESS\r
- Identify ATAPI device successfully.\r
-\r
- EFI_DEVICE_ERROR\r
- ATAPI Identify Device Command failed or device type \r
- is not supported by this IDE driver.\r
-\r
- Notes:\r
- Parameter "IdeDev" will be updated in this function.\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
-// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment\r
-// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment\r
{\r
EFI_IDENTIFY_DATA *AtapiIdentifyPointer;\r
UINT8 DeviceSelect;\r
return EFI_SUCCESS;\r
}\r
\r
+/**\r
+ Sends out ATAPI Inquiry Packet Command to the specified device.\r
+ This command will return INQUIRY data of the device.\r
+\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
+\r
+ @retval EFI_SUCCESS\r
+ Inquiry command completes successfully.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ Inquiry command failed.\r
+\r
+ @note\r
+ Parameter "IdeDev" will be updated in this function.\r
+\r
+**/\r
EFI_STATUS\r
AtapiInquiry (\r
IN IDE_BLK_IO_DEV *IdeDev\r
)\r
-/*++\r
- Name:\r
- AtapiInquiry\r
-\r
- Purpose: \r
- Sends out ATAPI Inquiry Packet Command to the specified device.\r
- This command will return INQUIRY data of the device.\r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
-\r
- Returns: \r
- EFI_SUCCESS\r
- Inquiry command completes successfully.\r
-\r
- EFI_DEVICE_ERROR\r
- Inquiry command failed.\r
- Notes:\r
- Parameter "IdeDev" will be updated in this function.\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
{\r
ATAPI_PACKET_COMMAND Packet;\r
EFI_STATUS Status;\r
return EFI_SUCCESS;\r
}\r
\r
+/**\r
+ This function is used to send out ATAPI commands conforms to the \r
+ Packet Command with PIO Data In Protocol.\r
+\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
+\r
+ @param[in] *Packet\r
+ pointer pointing to ATAPI_PACKET_COMMAND data structure\r
+ which contains the contents of the command. \r
+\r
+ @param[in] *Buffer\r
+ buffer contained data transferred from device to host.\r
+\r
+ @param[in] ByteCount\r
+ data size in byte unit of the buffer.\r
+\r
+ @param[in] TimeOut\r
+ this parameter is used to specify the timeout \r
+ value for the PioReadWriteData() function. \r
+\r
+ @retval EFI_SUCCESS\r
+ send out the ATAPI packet command successfully\r
+ and device sends data successfully.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ the device failed to send data.\r
+\r
+**/\r
EFI_STATUS\r
AtapiPacketCommandIn (\r
IN IDE_BLK_IO_DEV *IdeDev,\r
IN UINT32 ByteCount,\r
IN UINTN TimeOut\r
)\r
-/*++\r
- Name:\r
- AtapiPacketCommandIn\r
-\r
- Purpose: \r
- This function is used to send out ATAPI commands conforms to the \r
- Packet Command with PIO Data In Protocol.\r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
-\r
- ATAPI_PACKET_COMMAND IN *Packet\r
- pointer pointing to ATAPI_PACKET_COMMAND data structure\r
- which contains the contents of the command. \r
- \r
- UINT16 IN *Buffer\r
- buffer contained data transferred from device to host.\r
-\r
- UINT32 IN ByteCount\r
- data size in byte unit of the buffer.\r
-\r
- UINTN IN TimeOut\r
- this parameter is used to specify the timeout \r
- value for the PioReadWriteData() function. \r
-\r
- Returns: \r
- EFI_SUCCESS\r
- send out the ATAPI packet command successfully \r
- and device sends data successfully.\r
-\r
- EFI_DEVICE_ERROR\r
- the device failed to send data. \r
-\r
- Notes:\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
-// TODO: Packet - add argument and description to function comment\r
-// TODO: Buffer - add argument and description to function comment\r
-// TODO: ByteCount - add argument and description to function comment\r
-// TODO: TimeOut - add argument and description to function comment\r
{\r
UINT16 *CommandIndex;\r
EFI_STATUS Status;\r
return PioReadWriteData (IdeDev, Buffer, ByteCount, 1, TimeOut);\r
}\r
\r
+/**\r
+ This function is used to send out ATAPI commands conforms to the \r
+ Packet Command with PIO Data Out Protocol.\r
+\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
+\r
+ @param[in] *Packet\r
+ pointer pointing to ATAPI_PACKET_COMMAND data structure\r
+ which contains the contents of the command.\r
+\r
+ @param[in] *Buffer\r
+ buffer contained data transferred from host to device.\r
+\r
+ @param[in] ByteCount\r
+ data size in byte unit of the buffer.\r
+\r
+ @param[in] TimeOut\r
+ this parameter is used to specify the timeout \r
+ value for the PioReadWriteData() function. \r
+\r
+ @retval EFI_SUCCESS\r
+ send out the ATAPI packet command successfully\r
+ and device received data successfully.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ the device failed to send data.\r
+\r
+**/\r
EFI_STATUS\r
AtapiPacketCommandOut (\r
IN IDE_BLK_IO_DEV *IdeDev,\r
IN UINT32 ByteCount,\r
IN UINTN TimeOut\r
)\r
-/*++\r
- Name:\r
- AtapiPacketCommandOut\r
-\r
- Purpose: \r
- This function is used to send out ATAPI commands conforms to the \r
- Packet Command with PIO Data Out Protocol.\r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
-\r
- ATAPI_PACKET_COMMAND IN *Packet\r
- pointer pointing to ATAPI_PACKET_COMMAND data structure\r
- which contains the contents of the command.\r
-\r
- VOID IN *Buffer\r
- buffer contained data transferred from host to device.\r
-\r
- UINT32 IN ByteCount\r
- data size in byte unit of the buffer.\r
-\r
- UINTN IN TimeOut\r
- this parameter is used to specify the timeout \r
- value for the PioReadWriteData() function. \r
-\r
- Returns: \r
- EFI_SUCCESS\r
- send out the ATAPI packet command successfully \r
- and device received data successfully.\r
-\r
- EFI_DEVICE_ERROR\r
- the device failed to send data. \r
-\r
- Notes:\r
- \r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
-// TODO: Packet - add argument and description to function comment\r
-// TODO: Buffer - add argument and description to function comment\r
-// TODO: ByteCount - add argument and description to function comment\r
-// TODO: TimeOut - add argument and description to function comment\r
{\r
UINT16 *CommandIndex;\r
EFI_STATUS Status;\r
return PioReadWriteData (IdeDev, Buffer, ByteCount, 0, TimeOut);\r
}\r
\r
+/**\r
+ This function is called by either AtapiPacketCommandIn() or \r
+ AtapiPacketCommandOut(). It is used to transfer data between\r
+ host and device. The data direction is specified by the fourth\r
+ parameter.\r
+\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
+\r
+ @param[in] *Buffer\r
+ buffer contained data transferred between host and device.\r
+\r
+ @param[in] ByteCount\r
+ data size in byte unit of the buffer.\r
+\r
+ @param[in] Read\r
+ flag used to determine the data transfer direction.\r
+ Read equals 1, means data transferred from device to host;\r
+ Read equals 0, means data transferred from host to device.\r
+\r
+ @param[in] TimeOut\r
+ timeout value for wait DRQ ready before each data \r
+ stream's transfer.\r
+\r
+ @retval EFI_SUCCESS\r
+ data is transferred successfully.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ the device failed to transfer data.\r
+\r
+**/\r
EFI_STATUS\r
PioReadWriteData (\r
IN IDE_BLK_IO_DEV *IdeDev,\r
IN BOOLEAN Read,\r
IN UINTN TimeOut\r
)\r
-/*++\r
- Name:\r
- PioReadWriteData\r
-\r
- Purpose: \r
- This function is called by either AtapiPacketCommandIn() or \r
- AtapiPacketCommandOut(). It is used to transfer data between\r
- host and device. The data direction is specified by the fourth\r
- parameter.\r
-\r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
-\r
- VOID IN *Buffer\r
- buffer contained data transferred between host and device.\r
-\r
- UINT32 IN ByteCount\r
- data size in byte unit of the buffer.\r
-\r
- BOOLEAN IN Read\r
- flag used to determine the data transfer direction.\r
- Read equals 1, means data transferred from device to host;\r
- Read equals 0, means data transferred from host to device.\r
-\r
- UINTN IN TimeOut\r
- timeout value for wait DRQ ready before each data \r
- stream's transfer.\r
-\r
- Returns: \r
- EFI_SUCCESS\r
- data is transferred successfully. \r
-\r
- EFI_DEVICE_ERROR\r
- the device failed to transfer data. \r
-\r
- Notes:\r
-\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
-// TODO: Buffer - add argument and description to function comment\r
-// TODO: ByteCount - add argument and description to function comment\r
-// TODO: Read - add argument and description to function comment\r
-// TODO: TimeOut - add argument and description to function comment\r
{\r
//\r
// required transfer data in word unit.\r
return CheckErrorStatus (IdeDev);\r
}\r
\r
+/**\r
+ Sends out ATAPI Test Unit Ready Packet Command to the specified device\r
+ to find out whether device is accessible.\r
+\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
+\r
+ @retval EFI_SUCCESS\r
+ device is accessible.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ device is not accessible.\r
+\r
+**/\r
EFI_STATUS\r
AtapiTestUnitReady (\r
IN IDE_BLK_IO_DEV *IdeDev\r
)\r
-/*++\r
- Name:\r
- AtapiTestUnitReady\r
-\r
- Purpose: \r
- Sends out ATAPI Test Unit Ready Packet Command to the specified device\r
- to find out whether device is accessible.\r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
-\r
- Returns: \r
- EFI_SUCCESS\r
- device is accessible.\r
-\r
- EFI_DEVICE_ERROR\r
- device is not accessible.\r
-\r
- Notes:\r
-\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
{\r
ATAPI_PACKET_COMMAND Packet;\r
EFI_STATUS Status;\r
return Status;\r
}\r
\r
-EFI_STATUS\r
-AtapiRequestSense (\r
- IN IDE_BLK_IO_DEV *IdeDev,\r
- OUT UINTN *SenseCounts\r
- )\r
-/*++\r
- Name:\r
- AtapiRequestSense\r
-\r
- Purpose: \r
- Sends out ATAPI Request Sense Packet Command to the specified device.\r
- This command will return all the current Sense data in the device. \r
- This function will pack all the Sense data in one single buffer.\r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
+/**\r
+ Sends out ATAPI Request Sense Packet Command to the specified device.\r
+ This command will return all the current Sense data in the device. \r
+ This function will pack all the Sense data in one single buffer.\r
\r
- UINT16 OUT **SenseBuffers\r
- allocated in this function, and freed by the calling function.\r
- This buffer is used to accommodate all the sense data returned \r
- by the device.\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
\r
- UINTN OUT *BufUnit\r
- record the unit size of the sense data block in the SenseBuffers,\r
+ @param[out] **SenseBuffers\r
+ allocated in this function, and freed by the calling function.\r
+ This buffer is used to accommodate all the sense data returned \r
+ by the device.\r
\r
- UINTN OUT *BufNumbers\r
- record the number of units in the SenseBuffers.\r
+ @param[out] *BufUnit\r
+ record the unit size of the sense data block in the SenseBuffers,\r
\r
- Returns: \r
- EFI_SUCCESS\r
- Request Sense command completes successfully.\r
+ @param[out] *BufNumbers\r
+ record the number of units in the SenseBuffers.\r
\r
- EFI_DEVICE_ERROR\r
- Request Sense command failed.\r
-\r
- Notes:\r
+ @retval EFI_SUCCESS\r
+ Request Sense command completes successfully.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ Request Sense command failed.\r
\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
-// TODO: SenseCounts - add argument and description to function comment\r
+**/\r
+EFI_STATUS\r
+AtapiRequestSense (\r
+ IN IDE_BLK_IO_DEV *IdeDev,\r
+ OUT UINTN *SenseCounts\r
+ )\r
{\r
EFI_STATUS Status;\r
REQUEST_SENSE_DATA *Sense;\r
return EFI_SUCCESS;\r
}\r
\r
+/**\r
+ Sends out ATAPI Read Capacity Packet Command to the specified device.\r
+ This command will return the information regarding the capacity of the\r
+ media in the device.\r
+\r
+ Current device status will impact device's response to the Read Capacity\r
+ Command. For example, if the device once reset, the Read Capacity\r
+ Command will fail. The Sense data record the current device status, so \r
+ if the Read Capacity Command failed, the Sense data must be requested\r
+ and be analyzed to determine if the Read Capacity Command should retry.\r
+\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
+\r
+ @retval EFI_SUCCESS\r
+ Read Capacity Command finally completes successfully.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ Read Capacity Command failed because of device error.\r
+\r
+ @note\r
+ parameter "IdeDev" will be updated in this function.\r
+\r
+ TODO: EFI_NOT_READY - add return value to function comment\r
+**/\r
EFI_STATUS\r
AtapiReadCapacity (\r
IN IDE_BLK_IO_DEV *IdeDev\r
)\r
-/*++\r
- Name:\r
- AtapiReadCapacity\r
-\r
- Purpose: \r
- Sends out ATAPI Read Capacity Packet Command to the specified device.\r
- This command will return the information regarding the capacity of the\r
- media in the device.\r
-\r
- Current device status will impact device's response to the Read Capacity\r
- Command. For example, if the device once reset, the Read Capacity\r
- Command will fail. The Sense data record the current device status, so \r
- if the Read Capacity Command failed, the Sense data must be requested\r
- and be analyzed to determine if the Read Capacity Command should retry.\r
-\r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
-\r
- Returns: \r
- EFI_SUCCESS\r
- Read Capacity Command finally completes successfully.\r
-\r
- EFI_DEVICE_ERROR\r
- Read Capacity Command failed because of device error.\r
-\r
- Notes:\r
- parameter "IdeDev" will be updated in this function.\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
-// TODO: EFI_NOT_READY - add return value to function comment\r
{\r
//\r
// status returned by Read Capacity Packet Command\r
}\r
}\r
\r
+/**\r
+ Used before read/write blocks from/to ATAPI device media. \r
+ Since ATAPI device media is removable, it is necessary to detect\r
+ whether media is present and get current present media's\r
+ information, and if media has been changed, Block I/O Protocol\r
+ need to be reinstalled.\r
+\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
+\r
+ @param[out] *MediaChange\r
+ return value that indicates if the media of the device has been\r
+ changed.\r
+\r
+ @retval EFI_SUCCESS\r
+ media found successfully.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ any error encounters during media detection.\r
+ \r
+ @retval EFI_NO_MEDIA\r
+ media not found.\r
+\r
+ @note\r
+ parameter IdeDev may be updated in this function.\r
+\r
+**/\r
EFI_STATUS\r
AtapiDetectMedia (\r
IN IDE_BLK_IO_DEV *IdeDev,\r
OUT BOOLEAN *MediaChange\r
)\r
-/*++\r
- Name:\r
- AtapiDetectMedia\r
-\r
- Purpose: \r
- Used before read/write blocks from/to ATAPI device media. \r
- Since ATAPI device media is removable, it is necessary to detect\r
- whether media is present and get current present media's\r
- information, and if media has been changed, Block I/O Protocol\r
- need to be reinstalled.\r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
-\r
- BOOLEAN OUT *MediaChange\r
- return value that indicates if the media of the device has been\r
- changed.\r
-\r
- Returns: \r
- EFI_SUCCESS\r
- media found successfully.\r
-\r
- EFI_DEVICE_ERROR\r
- any error encounters during media detection.\r
- \r
- EFI_NO_MEDIA\r
- media not found.\r
-\r
- Notes:\r
- parameter IdeDev may be updated in this function.\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
-// TODO: MediaChange - add argument and description to function comment\r
{\r
EFI_STATUS Status;\r
EFI_STATUS ReadCapacityStatus;\r
\r
}\r
\r
+/**\r
+ This function is called by the AtapiBlkIoReadBlocks() to perform\r
+ read from media in block unit.\r
+\r
+ The main command used to access media here is READ(10) Command. \r
+ READ(10) Command requests that the ATAPI device media transfer \r
+ specified data to the host. Data is transferred in block(sector) \r
+ unit. The maximum number of blocks that can be transferred once is\r
+ 65536. This is the main difference between READ(10) and READ(12) \r
+ Command. The maximum number of blocks in READ(12) is 2 power 32.\r
+\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
+\r
+ @param[in] *Buffer\r
+ A pointer to the destination buffer for the data. \r
+\r
+ @param[in] Lba\r
+ The starting logical block address to read from \r
+ on the device media.\r
+\r
+ @param[in] NumberOfBlocks\r
+ The number of transfer data blocks.\r
+\r
+ @return status is fully dependent on the return status\r
+ of AtapiPacketCommandIn() function.\r
+\r
+**/\r
EFI_STATUS\r
AtapiReadSectors (\r
IN IDE_BLK_IO_DEV *IdeDev,\r
IN EFI_LBA Lba,\r
IN UINTN NumberOfBlocks\r
)\r
-/*++\r
- Name:\r
- AtapiReadSectors\r
-\r
- Purpose: \r
- This function is called by the AtapiBlkIoReadBlocks() to perform\r
- read from media in block unit.\r
-\r
- The main command used to access media here is READ(10) Command. \r
- READ(10) Command requests that the ATAPI device media transfer \r
- specified data to the host. Data is transferred in block(sector) \r
- unit. The maximum number of blocks that can be transferred once is\r
- 65536. This is the main difference between READ(10) and READ(12) \r
- Command. The maximum number of blocks in READ(12) is 2 power 32.\r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
-\r
- VOID IN *Buffer\r
- A pointer to the destination buffer for the data. \r
-\r
- EFI_LBA IN Lba\r
- The starting logical block address to read from \r
- on the device media.\r
-\r
- UINTN IN NumberOfBlocks\r
- The number of transfer data blocks.\r
-\r
- Returns: \r
- return status is fully dependent on the return status\r
- of AtapiPacketCommandIn() function.\r
-\r
- Notes:\r
-\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
-// TODO: Buffer - add argument and description to function comment\r
-// TODO: Lba - add argument and description to function comment\r
-// TODO: NumberOfBlocks - add argument and description to function comment\r
{\r
\r
ATAPI_PACKET_COMMAND Packet;\r
return Status;\r
}\r
\r
+/**\r
+ This function is called by the AtapiBlkIoWriteBlocks() to perform\r
+ write onto media in block unit.\r
+ The main command used to access media here is Write(10) Command. \r
+ Write(10) Command requests that the ATAPI device media transfer \r
+ specified data to the host. Data is transferred in block (sector) \r
+ unit. The maximum number of blocks that can be transferred once is\r
+ 65536. \r
+\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
+\r
+ @param[in] *Buffer\r
+ A pointer to the source buffer for the data. \r
+\r
+ @param[in] Lba\r
+ The starting logical block address to write onto \r
+ the device media.\r
+\r
+ @param[in] NumberOfBlocks\r
+ The number of transfer data blocks.\r
+\r
+ @return status is fully dependent on the return status\r
+ of AtapiPacketCommandOut() function.\r
+\r
+**/\r
EFI_STATUS\r
AtapiWriteSectors (\r
IN IDE_BLK_IO_DEV *IdeDev,\r
IN EFI_LBA Lba,\r
IN UINTN NumberOfBlocks\r
)\r
-/*++\r
- Name:\r
- AtapiWriteSectors\r
-\r
- Purpose: \r
- This function is called by the AtapiBlkIoWriteBlocks() to perform\r
- write onto media in block unit.\r
- The main command used to access media here is Write(10) Command. \r
- Write(10) Command requests that the ATAPI device media transfer \r
- specified data to the host. Data is transferred in block (sector) \r
- unit. The maximum number of blocks that can be transferred once is\r
- 65536. \r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
-\r
- VOID IN *Buffer\r
- A pointer to the source buffer for the data. \r
-\r
- EFI_LBA IN Lba\r
- The starting logical block address to write onto \r
- the device media.\r
-\r
- UINTN IN NumberOfBlocks\r
- The number of transfer data blocks.\r
-\r
- Returns: \r
- return status is fully dependent on the return status\r
- of AtapiPacketCommandOut() function.\r
-\r
- Notes:\r
-\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
-// TODO: Buffer - add argument and description to function comment\r
-// TODO: Lba - add argument and description to function comment\r
-// TODO: NumberOfBlocks - add argument and description to function comment\r
{\r
\r
ATAPI_PACKET_COMMAND Packet;\r
return Status;\r
}\r
\r
+/**\r
+ This function is used to implement the Soft Reset on the specified\r
+ ATAPI device. Different from the AtaSoftReset(), here reset is a ATA\r
+ Soft Reset Command special for ATAPI device, and it only take effects\r
+ on the specified ATAPI device, not on the whole IDE bus.\r
+ Since the ATAPI soft reset is needed when device is in exceptional\r
+ condition (such as BSY bit is always set ), I think the Soft Reset\r
+ command should be sent without waiting for the BSY clear and DRDY\r
+ set.\r
+ This function is called by IdeBlkIoReset(), \r
+ a interface function of Block I/O protocol.\r
+\r
+ @param[in] *IdeDev\r
+ pointer pointing to IDE_BLK_IO_DEV data structure, used\r
+ to record all the information of the IDE device.\r
+\r
+ @retval EFI_SUCCESS\r
+ Soft reset completes successfully.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ Any step during the reset process is failed.\r
+\r
+**/\r
EFI_STATUS\r
AtapiSoftReset (\r
IN IDE_BLK_IO_DEV *IdeDev\r
)\r
-/*++\r
- Name:\r
- AtapiSoftReset\r
-\r
- Purpose: \r
- This function is used to implement the Soft Reset on the specified\r
- ATAPI device. Different from the AtaSoftReset(), here reset is a ATA\r
- Soft Reset Command special for ATAPI device, and it only take effects\r
- on the specified ATAPI device, not on the whole IDE bus.\r
- Since the ATAPI soft reset is needed when device is in exceptional\r
- condition (such as BSY bit is always set ), I think the Soft Reset\r
- command should be sent without waiting for the BSY clear and DRDY\r
- set.\r
- This function is called by IdeBlkIoReset(), \r
- a interface function of Block I/O protocol.\r
-\r
- \r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeDev\r
- pointer pointing to IDE_BLK_IO_DEV data structure, used\r
- to record all the information of the IDE device.\r
-\r
- Returns: \r
- EFI_SUCCESS\r
- Soft reset completes successfully.\r
-\r
- EFI_DEVICE_ERROR\r
- Any step during the reset process is failed.\r
-\r
- Notes:\r
-\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeDev - add argument and description to function comment\r
{\r
UINT8 Command;\r
UINT8 DeviceSelect;\r
return EFI_SUCCESS;\r
}\r
\r
+/**\r
+ This function is the ATAPI implementation for ReadBlocks in the\r
+ Block I/O Protocol interface.\r
+\r
+ @param[in] *IdeBlkIoDev\r
+ Indicates the calling context.\r
+\r
+ @param[in] MediaId\r
+ The media id that the read request is for.\r
+\r
+ @param[in] LBA\r
+ The starting logical block address to read from \r
+ on the device.\r
+\r
+ @param[in] BufferSize\r
+ The size of the Buffer in bytes. This must be a\r
+ multiple of the intrinsic block size of the device.\r
+\r
+ @param[out] *Buffer\r
+ A pointer to the destination buffer for the data. \r
+ The caller is responsible for either having implicit\r
+ or explicit ownership of the memory that data is read into.\r
+\r
+ @retval EFI_SUCCESS\r
+ Read Blocks successfully.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ Read Blocks failed.\r
+ \r
+ @retval EFI_NO_MEDIA\r
+ There is no media in the device.\r
+ \r
+ @retval EFI_MEDIA_CHANGED\r
+ The MediaId is not for the current media.\r
+ \r
+ @retval EFI_BAD_BUFFER_SIZE\r
+ The BufferSize parameter is not a multiple of the\r
+ intrinsic block size of the device.\r
+ \r
+ @retval EFI_INVALID_PARAMETER\r
+ The read request contains LBAs that are not valid,\r
+ or the data buffer is not valid.\r
+\r
+**/\r
EFI_STATUS\r
AtapiBlkIoReadBlocks (\r
IN IDE_BLK_IO_DEV *IdeBlkIoDevice,\r
IN UINTN BufferSize,\r
OUT VOID *Buffer\r
)\r
-/*++\r
- Name:\r
- AtapiBlkIoReadBlocks\r
-\r
- Purpose: \r
- This function is the ATAPI implementation for ReadBlocks in the\r
- Block I/O Protocol interface.\r
-\r
- Parameters:\r
- IDE_BLK_IO_DEV IN *IdeBlkIoDev\r
- Indicates the calling context.\r
-\r
- UINT32 IN MediaId\r
- The media id that the read request is for.\r
-\r
- EFI_LBA IN LBA\r
- The starting logical block address to read from \r
- on the device.\r
-\r
- UINTN IN BufferSize\r
- The size of the Buffer in bytes. This must be a\r
- multiple of the intrinsic block size of the device.\r
-\r
- VOID OUT *Buffer\r
- A pointer to the destination buffer for the data. \r
- The caller is responsible for either having implicit\r
- or explicit ownership of the memory that data is read into.\r
-\r
- Returns: \r
- EFI_SUCCESS \r
- Read Blocks successfully.\r
-\r
- EFI_DEVICE_ERROR\r
- Read Blocks failed.\r
-\r
- EFI_NO_MEDIA\r
- There is no media in the device.\r
-\r
- EFI_MEDIA_CHANGED\r
- The MediaId is not for the current media.\r
-\r
- EFI_BAD_BUFFER_SIZE\r
- The BufferSize parameter is not a multiple of the \r
- intrinsic block size of the device.\r
-\r
- EFI_INVALID_PARAMETER\r
- The read request contains LBAs that are not valid,\r
- or the data buffer is not valid.\r
-\r
- Notes:\r
-\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeBlkIoDevice - add argument and description to function comment\r
-// TODO: MediaId - add argument and description to function comment\r
-// TODO: LBA - add argument and description to function comment\r
-// TODO: BufferSize - add argument and description to function comment\r
-// TODO: Buffer - add argument and description to function comment\r
{\r
EFI_BLOCK_IO_MEDIA *Media;\r
UINTN BlockSize;\r
\r
}\r
\r
+/**\r
+ This function is the ATAPI implementation for WriteBlocks in the\r
+ Block I/O Protocol interface.\r
+\r
+ @param[in] *This\r
+ Indicates the calling context.\r
+\r
+ @param[in] MediaId\r
+ The media id that the write request is for.\r
+\r
+ @param[in] LBA\r
+ The starting logical block address to write onto \r
+ the device.\r
+\r
+ @param[in] BufferSize\r
+ The size of the Buffer in bytes. This must be a\r
+ multiple of the intrinsic block size of the device.\r
+\r
+ @param[out] *Buffer\r
+ A pointer to the source buffer for the data. \r
+ The caller is responsible for either having implicit\r
+ or explicit ownership of the memory that data is \r
+ written from.\r
+\r
+ @retval EFI_SUCCESS\r
+ Write Blocks successfully.\r
+ \r
+ @retval EFI_DEVICE_ERROR\r
+ Write Blocks failed.\r
+ \r
+ @retval EFI_NO_MEDIA\r
+ There is no media in the device.\r
+ \r
+ @retval EFI_MEDIA_CHANGE\r
+ The MediaId is not for the current media.\r
+ \r
+ @retval EFI_BAD_BUFFER_SIZE\r
+ The BufferSize parameter is not a multiple of the\r
+ intrinsic block size of the device.\r
+ \r
+ @retval EFI_INVALID_PARAMETER\r
+ The write request contains LBAs that are not valid,\r
+ or the data buffer is not valid.\r
+\r
+ TODO: EFI_MEDIA_CHANGED - add return value to function comment\r
+ TODO: EFI_WRITE_PROTECTED - add return value to function comment\r
+**/\r
EFI_STATUS\r
AtapiBlkIoWriteBlocks (\r
IN IDE_BLK_IO_DEV *IdeBlkIoDevice,\r
IN UINTN BufferSize,\r
OUT VOID *Buffer\r
)\r
-/*++\r
- Name:\r
- AtapiBlkIoWriteBlocks\r
-\r
- Purpose: \r
- This function is the ATAPI implementation for WriteBlocks in the\r
- Block I/O Protocol interface.\r
-\r
- Parameters:\r
- EFI_BLOCK_IO IN *This\r
- Indicates the calling context.\r
-\r
- UINT32 IN MediaId\r
- The media id that the write request is for.\r
-\r
- EFI_LBA IN LBA\r
- The starting logical block address to write onto \r
- the device.\r
-\r
- UINTN IN BufferSize\r
- The size of the Buffer in bytes. This must be a\r
- multiple of the intrinsic block size of the device.\r
-\r
- VOID OUT *Buffer\r
- A pointer to the source buffer for the data. \r
- The caller is responsible for either having implicit\r
- or explicit ownership of the memory that data is \r
- written from.\r
-\r
- Returns: \r
- EFI_SUCCESS \r
- Write Blocks successfully.\r
-\r
- EFI_DEVICE_ERROR\r
- Write Blocks failed.\r
-\r
- EFI_NO_MEDIA\r
- There is no media in the device.\r
-\r
- EFI_MEDIA_CHANGE\r
- The MediaId is not for the current media.\r
-\r
- EFI_BAD_BUFFER_SIZE\r
- The BufferSize parameter is not a multiple of the \r
- intrinsic block size of the device.\r
-\r
- EFI_INVALID_PARAMETER\r
- The write request contains LBAs that are not valid,\r
- or the data buffer is not valid. \r
-\r
- Notes:\r
-\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: IdeBlkIoDevice - add argument and description to function comment\r
-// TODO: MediaId - add argument and description to function comment\r
-// TODO: LBA - add argument and description to function comment\r
-// TODO: BufferSize - add argument and description to function comment\r
-// TODO: Buffer - add argument and description to function comment\r
-// TODO: EFI_MEDIA_CHANGED - add return value to function comment\r
-// TODO: EFI_WRITE_PROTECTED - add return value to function comment\r
{\r
\r
EFI_BLOCK_IO_MEDIA *Media;\r
// which are used to parse sense key returned by the device.\r
//\r
\r
-BOOLEAN\r
-IsNoMedia (\r
- IN REQUEST_SENSE_DATA *SenseData,\r
- IN UINTN SenseCounts\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
TODO: Add function description\r
\r
-Arguments:\r
-\r
- SenseData - TODO: add argument description\r
- SenseCounts - TODO: add argument description\r
-\r
-Returns:\r
+ @param SenseData TODO: add argument description\r
+ @param SenseCounts TODO: add argument description\r
\r
TODO: add return values\r
\r
---*/\r
+**/\r
+BOOLEAN\r
+IsNoMedia (\r
+ IN REQUEST_SENSE_DATA *SenseData,\r
+ IN UINTN SenseCounts\r
+ )\r
{\r
REQUEST_SENSE_DATA *SensePointer;\r
UINTN Index;\r
return NoMedia;\r
}\r
\r
+/**\r
+ Test if the device meets a media error after media changed\r
+\r
+ @param[in] *SenseData\r
+ pointer pointing to ATAPI device sense data list.\r
+ @param[in] SenseCounts\r
+ sense data number of the list \r
+\r
+ @retval TRUE Device meets a media error\r
+ @retval FALSE No media error\r
+\r
+**/\r
BOOLEAN\r
IsMediaError (\r
IN REQUEST_SENSE_DATA *SenseData,\r
IN UINTN SenseCounts\r
)\r
-/*++\r
- Name:\r
- IsMediaError\r
-\r
- Purpose: \r
- Test if the device meets a media error after media changed\r
-\r
- Parameters:\r
- EQUEST_SENSE_DATA IN *SenseData\r
- pointer pointing to ATAPI device sense data list.\r
- UINTN IN SenseCounts\r
- sense data number of the list \r
-\r
- Returns: \r
- TRUE\r
- Device meets a media error\r
-\r
- FALSE\r
- No media error\r
---*/\r
-// TODO: function comment is missing 'Routine Description:'\r
-// TODO: function comment is missing 'Arguments:'\r
-// TODO: SenseData - add argument and description to function comment\r
-// TODO: SenseCounts - add argument and description to function comment\r
{\r
REQUEST_SENSE_DATA *SensePointer;\r
UINTN Index;\r
return IsError;\r
}\r
\r
-BOOLEAN\r
-IsMediaChange (\r
- IN REQUEST_SENSE_DATA *SenseData,\r
- IN UINTN SenseCounts\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
TODO: Add function description\r
\r
-Arguments:\r
-\r
- SenseData - TODO: add argument description\r
- SenseCounts - TODO: add argument description\r
-\r
-Returns:\r
+ @param SenseData TODO: add argument description\r
+ @param SenseCounts TODO: add argument description\r
\r
TODO: add return values\r
\r
---*/\r
+**/\r
+BOOLEAN\r
+IsMediaChange (\r
+ IN REQUEST_SENSE_DATA *SenseData,\r
+ IN UINTN SenseCounts\r
+ )\r
{\r
REQUEST_SENSE_DATA *SensePointer;\r
UINTN Index;\r
return IsMediaChange;\r
}\r
\r
+/**\r
+ TODO: Add function description\r
+\r
+ @param SenseData TODO: add argument description\r
+ @param SenseCounts TODO: add argument description\r
+ @param NeedRetry TODO: add argument description\r
+\r
+ TODO: add return values\r
+\r
+**/\r
BOOLEAN\r
IsDriveReady (\r
IN REQUEST_SENSE_DATA *SenseData,\r
IN UINTN SenseCounts,\r
OUT BOOLEAN *NeedRetry\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- TODO: Add function description\r
-\r
-Arguments:\r
-\r
- SenseData - TODO: add argument description\r
- SenseCounts - TODO: add argument description\r
- NeedRetry - TODO: add argument description\r
-\r
-Returns:\r
-\r
- TODO: add return values\r
-\r
---*/\r
{\r
REQUEST_SENSE_DATA *SensePointer;\r
UINTN Index;\r
return IsReady;\r
}\r
\r
-BOOLEAN\r
-HaveSenseKey (\r
- IN REQUEST_SENSE_DATA *SenseData,\r
- IN UINTN SenseCounts\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
TODO: Add function description\r
\r
-Arguments:\r
-\r
- SenseData - TODO: add argument description\r
- SenseCounts - TODO: add argument description\r
-\r
-Returns:\r
+ @param SenseData TODO: add argument description\r
+ @param SenseCounts TODO: add argument description\r
\r
TODO: add return values\r
\r
---*/\r
+**/\r
+BOOLEAN\r
+HaveSenseKey (\r
+ IN REQUEST_SENSE_DATA *SenseData,\r
+ IN UINTN SenseCounts\r
+ )\r
{\r
BOOLEAN Have;\r
\r
return Have;\r
}\r
\r
+/**\r
+ TODO: Add function description\r
+\r
+ @param IdeDev TODO: add argument description\r
+ @param WriteProtected TODO: add argument description\r
+\r
+ @retval EFI_DEVICE_ERROR TODO: Add description for return value\r
+ @retval EFI_DEVICE_ERROR TODO: Add description for return value\r
+ @retval EFI_SUCCESS TODO: Add description for return value\r
+\r
+**/\r
EFI_STATUS\r
IsLS120orZipWriteProtected (\r
IN IDE_BLK_IO_DEV *IdeDev,\r
OUT BOOLEAN *WriteProtected\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- TODO: Add function description\r
-\r
-Arguments:\r
-\r
- IdeDev - TODO: add argument description\r
- WriteProtected - TODO: add argument description\r
-\r
-Returns:\r
-\r
- EFI_DEVICE_ERROR - TODO: Add description for return value\r
- EFI_DEVICE_ERROR - TODO: Add description for return value\r
- EFI_SUCCESS - TODO: Add description for return value\r
-\r
---*/\r
{\r
EFI_STATUS Status;\r
\r