1)update function header coding style issue

change Some unexpected error happened.    to Other errors as indicated.
2) delete unused parameter in IScsiConfigFormInit()
3) correct IN OUT mistake in IScsiSessionInit ()
4)roll back one update for Piece of code in IScsiDhcp.c around line 99 on FieldIndex 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7013 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ywu21 2008-12-12 07:03:44 +00:00
parent 96dcf1973f
commit 963dbb3001
19 changed files with 118 additions and 102 deletions

View File

@ -30,7 +30,7 @@ EFI_GUID mIScsiCHAPAuthInfoGuid = ISCSI_CHAP_AUTH_INFO_GUID;
@retval EFI_SUCCESS The expected hash value was caculatedly successfully. @retval EFI_SUCCESS The expected hash value was caculatedly successfully.
@retval EFI_PROTOCOL_ERROR The length of the secret should be at least the @retval EFI_PROTOCOL_ERROR The length of the secret should be at least the
length of the hash value for the hashing algorithm chosen. length of the hash value for the hashing algorithm chosen.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiCHAPCalculateResponse ( IScsiCHAPCalculateResponse (
@ -82,7 +82,7 @@ IScsiCHAPCalculateResponse (
@retval EFI_SUCCESS The response from target passed authentication. @retval EFI_SUCCESS The response from target passed authentication.
@retval EFI_SECURITY_VIOLATION The response from target was not expected value. @retval EFI_SECURITY_VIOLATION The response from target was not expected value.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiCHAPAuthTarget ( IScsiCHAPAuthTarget (
@ -123,7 +123,7 @@ IScsiCHAPAuthTarget (
@retval EFI_SUCCESS The Login Response passed the CHAP validation. @retval EFI_SUCCESS The Login Response passed the CHAP validation.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval EFI_PROTOCOL_ERROR Some kind of protocol error happend. @retval EFI_PROTOCOL_ERROR Some kind of protocol error happend.
@retval Others Some unexpected error happend. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiCHAPOnRspReceived ( IScsiCHAPOnRspReceived (

View File

@ -88,7 +88,7 @@ typedef struct _ISCSI_CHAP_AUTH_DATA {
@retval EFI_SUCCESS The Login Response passed the CHAP validation. @retval EFI_SUCCESS The Login Response passed the CHAP validation.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval EFI_PROTOCOL_ERROR Some kind of protocol error happend. @retval EFI_PROTOCOL_ERROR Some kind of protocol error happend.
@retval Others Some unexpected error happend. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiCHAPOnRspReceived ( IScsiCHAPOnRspReceived (

View File

@ -58,7 +58,7 @@ PopUpInvalidNotify (
Update the list of iSCSI devices the iSCSI driver is controlling. Update the list of iSCSI devices the iSCSI driver is controlling.
@retval EFI_SUCCESS The callback successfully handled the action. @retval EFI_SUCCESS The callback successfully handled the action.
@retval Others Some unexpected errors happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiUpdateDeviceList ( IScsiUpdateDeviceList (
@ -460,7 +460,7 @@ IScsiFormRouteConfig (
@retval EFI_UNSUPPORTED The specified Action is not supported by the @retval EFI_UNSUPPORTED The specified Action is not supported by the
callback.Currently not implemented. callback.Currently not implemented.
@retval EFI_INVALID_PARAMETERS Passing in wrong parameter. @retval EFI_INVALID_PARAMETERS Passing in wrong parameter.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
@ -737,7 +737,7 @@ IScsiFormCallback (
@retval EFI_SUCCESS The iSCSI configuration form is updated. @retval EFI_SUCCESS The iSCSI configuration form is updated.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Some unexpected errors happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiConfigUpdateForm ( IScsiConfigUpdateForm (
@ -891,11 +891,11 @@ IScsiConfigUpdateForm (
@retval EFI_SUCCESS The iSCSI configuration form is initialized. @retval EFI_SUCCESS The iSCSI configuration form is initialized.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiConfigFormInit ( IScsiConfigFormInit (
IN EFI_HANDLE DriverBindingHandle VOID
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;

View File

@ -32,6 +32,31 @@ extern UINT8 IScsiDxeStrings[];
#define ISCSI_FORM_CALLBACK_INFO_SIGNATURE EFI_SIGNATURE_32 ('I', 'f', 'c', 'i') #define ISCSI_FORM_CALLBACK_INFO_SIGNATURE EFI_SIGNATURE_32 ('I', 'f', 'c', 'i')
/**
If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear,
then this macro return a pointer to a data structure ISCSI_FORM_CALLBACK_INFO.
If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set,
The Signature field of the data structure ISCSI_FORM_CALLBACK_INFO
is compared to TestSignature. If the signatures match, then a pointer
to the pointer to a data structure ISCSI_FORM_CALLBACK_INFO is returned.
If the signatures do not match, then DebugAssert() is called with a description
of "CR has a bad signature" and Callback is returned.
If the data type ISCSI_FORM_CALLBACK_INFO_SIGNATURE does not contain the field
specified by Callback, then the module will not compile.
If ISCSI_FORM_CALLBACK_INFO_SIGNATURE does not contain a field called Signature,
then the module will not compile.
@param Callback Pointer to the specified field within the data
structure ISCSI_FORM_CALLBACK_INFO.
@return a pointer to the pointer to a data structure ISCSI_FORM_CALLBACK_INFO.
@return Others Some unexpected error happened.
**/
#define ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK(Callback) \ #define ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK(Callback) \
CR ( \ CR ( \
Callback, \ Callback, \
@ -87,7 +112,7 @@ typedef struct _ISCSI_FORM_CALLBACK_INFO {
@retval EFI_SUCCESS The iSCSI configuration form is updated. @retval EFI_SUCCESS The iSCSI configuration form is updated.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Some unexpected errors happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiConfigUpdateForm ( IScsiConfigUpdateForm (
@ -103,11 +128,11 @@ IScsiConfigUpdateForm (
@retval EFI_SUCCESS The iSCSI configuration form is initialized. @retval EFI_SUCCESS The iSCSI configuration form is initialized.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiConfigFormInit ( IScsiConfigFormInit (
IN EFI_HANDLE DriverBindingHandle VOID
); );
/** /**

View File

@ -96,24 +96,18 @@ IScsiDhcpExtractRootPath (
goto ON_EXIT; goto ON_EXIT;
} }
for (FieldIndex = RP_FIELD_IDX_SERVERNAME; FieldIndex != RP_FIELD_IDX_TARGETNAME; FieldIndex = RP_FIELD_IDX_TARGETNAME) { if ((Fields[RP_FIELD_IDX_SERVERNAME].Str == NULL) ||
if (Fields[FieldIndex].Str == NULL) { (Fields[RP_FIELD_IDX_TARGETNAME].Str == NULL) ||
Status = EFI_INVALID_PARAMETER; (Fields[RP_FIELD_IDX_PROTOCOL].Len > 1)
goto ON_EXIT; ) {
}
}
FieldIndex = RP_FIELD_IDX_PROTOCOL;
if (Fields[RP_FIELD_IDX_PROTOCOL].Len > 1) {
Status = EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
goto ON_EXIT; goto ON_EXIT;
} }
// //
// Get the IP address of the target. // Get the IP address of the target.
// //
FieldIndex = RP_FIELD_IDX_SERVERNAME; Field = &Fields[RP_FIELD_IDX_SERVERNAME];
Field = &Fields[FieldIndex];
Status = IScsiAsciiStrToIp (Field->Str, &ConfigNvData->TargetIp); Status = IScsiAsciiStrToIp (Field->Str, &ConfigNvData->TargetIp);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
goto ON_EXIT; goto ON_EXIT;
@ -121,8 +115,7 @@ IScsiDhcpExtractRootPath (
// //
// Check the protocol type. // Check the protocol type.
// //
FieldIndex = RP_FIELD_IDX_PROTOCOL; Field = &Fields[RP_FIELD_IDX_PROTOCOL];
Field = &Fields[FieldIndex];
if ((Field->Str != NULL) && ((*(Field->Str) - '0') != EFI_IP_PROTO_TCP)) { if ((Field->Str != NULL) && ((*(Field->Str) - '0') != EFI_IP_PROTO_TCP)) {
Status = EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
goto ON_EXIT; goto ON_EXIT;
@ -130,8 +123,7 @@ IScsiDhcpExtractRootPath (
// //
// Get the port of the iSCSI target. // Get the port of the iSCSI target.
// //
FieldIndex = RP_FIELD_IDX_PORT; Field = &Fields[RP_FIELD_IDX_PORT];
Field = &Fields[FieldIndex];
if (Field->Str != NULL) { if (Field->Str != NULL) {
ConfigNvData->TargetPort = (UINT16) AsciiStrDecimalToUintn (Field->Str); ConfigNvData->TargetPort = (UINT16) AsciiStrDecimalToUintn (Field->Str);
} else { } else {
@ -140,8 +132,7 @@ IScsiDhcpExtractRootPath (
// //
// Get the LUN. // Get the LUN.
// //
FieldIndex = RP_FIELD_IDX_LUN; Field = &Fields[RP_FIELD_IDX_LUN];
Field = &Fields[FieldIndex];
if (Field->Str != NULL) { if (Field->Str != NULL) {
Status = IScsiAsciiStrToLun (Field->Str, ConfigNvData->BootLun); Status = IScsiAsciiStrToLun (Field->Str, ConfigNvData->BootLun);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
@ -153,8 +144,8 @@ IScsiDhcpExtractRootPath (
// //
// Get the target iSCSI Name. // Get the target iSCSI Name.
// //
FieldIndex = RP_FIELD_IDX_TARGETNAME; Field = &Fields[RP_FIELD_IDX_TARGETNAME];
Field = &Fields[FieldIndex];
if (AsciiStrLen (Field->Str) > ISCSI_NAME_MAX_SIZE - 1) { if (AsciiStrLen (Field->Str) > ISCSI_NAME_MAX_SIZE - 1) {
Status = EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
goto ON_EXIT; goto ON_EXIT;
@ -190,7 +181,7 @@ ON_EXIT:
@retval EFI_SUCCESS Either the DHCP OFFER is qualified or we're not intereseted @retval EFI_SUCCESS Either the DHCP OFFER is qualified or we're not intereseted
in the Dhcp4Event. in the Dhcp4Event.
@retval EFI_NOT_READY The DHCP OFFER packet doesn't match our requirements. @retval EFI_NOT_READY The DHCP OFFER packet doesn't match our requirements.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiDhcpSelectOffer ( IScsiDhcpSelectOffer (
@ -261,7 +252,7 @@ IScsiDhcpSelectOffer (
@retval EFI_SUCCESS The DNS information is got from the DHCP ACK. @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
@retval EFI_NO_MAPPING DHCP failed to acquire address and other information. @retval EFI_NO_MAPPING DHCP failed to acquire address and other information.
@retval EFI_INVALID_PARAMETER The DHCP ACK's DNS option is mal-formatted. @retval EFI_INVALID_PARAMETER The DHCP ACK's DNS option is mal-formatted.
@retval EFI_DEVICE_ERROR Some unexpected error happened. @retval EFI_DEVICE_ERROR Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiParseDhcpAck ( IScsiParseDhcpAck (
@ -352,7 +343,7 @@ IScsiParseDhcpAck (
@retval EFI_SUCCESS The DNS information is got from the DHCP ACK. @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiDoDhcp ( IScsiDoDhcp (

View File

@ -49,7 +49,7 @@ typedef struct _ISCSI_ROOT_PATH_FIELD {
@retval EFI_SUCCESS The DNS information is got from the DHCP ACK. @retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiDoDhcp ( IScsiDoDhcp (

View File

@ -337,7 +337,7 @@ IScsiDriverBindingStop (
@param[in] ImageHandle Handle that identifies the image to be unloaded. @param[in] ImageHandle Handle that identifies the image to be unloaded.
@retval EFI_SUCCESS The image has been unloaded. @retval EFI_SUCCESS The image has been unloaded.
@retval Others Some unexpected errors happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
@ -408,7 +408,7 @@ EfiIScsiUnload (
@retval EFI_SUCCESS The operation completed successfully. @retval EFI_SUCCESS The operation completed successfully.
@retval EFI_ACCESS_DENIED EFI_ISCSI_INITIATOR_NAME_PROTOCOL was installed unexpectedly. @retval EFI_ACCESS_DENIED EFI_ISCSI_INITIATOR_NAME_PROTOCOL was installed unexpectedly.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
@ -472,7 +472,7 @@ IScsiDriverEntryPoint (
// //
// Initialize the configuration form of iSCSI. // Initialize the configuration form of iSCSI.
// //
Status = IScsiConfigFormInit (gIScsiDriverBinding.DriverBindingHandle); Status = IScsiConfigFormInit ();
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
gBS->UninstallMultipleProtocolInterfaces ( gBS->UninstallMultipleProtocolInterfaces (
ImageHandle, ImageHandle,

View File

@ -258,7 +258,7 @@ IScsiComponentNameGetControllerName (
@retval EFI_BUFFER_TOO_SMALL BufferSize is too small for the result. @retval EFI_BUFFER_TOO_SMALL BufferSize is too small for the result.
@retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL. @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL.
@retval EFI_DEVICE_ERROR The iSCSI initiator name could not be retrieved due to a hardware error. @retval EFI_DEVICE_ERROR The iSCSI initiator name could not be retrieved due to a hardware error.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
@ -283,7 +283,7 @@ IScsiGetInitiatorName (
@retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data. @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.
@retval EFI_PROTOCOL_ERROR Input iSCSI initiator name does not adhere to RFC 3720 @retval EFI_PROTOCOL_ERROR Input iSCSI initiator name does not adhere to RFC 3720
(and other related protocols) (and other related protocols)
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI

View File

@ -189,7 +189,7 @@ IScsiMapV4ToV6Addr (
@param[in] Controller The handle of the controller. @param[in] Controller The handle of the controller.
@return UINT16 The composited representation of the NIC PCI location. @return UINT16 The composited representation of the NIC PCI location.
@retval 0 Some unexpected error happened. @retval 0 Other errors as indicated.
**/ **/
UINT16 UINT16
IScsiGetNICPciLocation ( IScsiGetNICPciLocation (

View File

@ -31,7 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
VOID VOID
IScsiPublishIbft ( IScsiPublishIbft (
VOID VOID
); );
#endif #endif

View File

@ -32,7 +32,7 @@ EFI_ISCSI_INITIATOR_NAME_PROTOCOL gIScsiInitiatorName = {
@retval EFI_BUFFER_TOO_SMALL BufferSize is too small for the result. @retval EFI_BUFFER_TOO_SMALL BufferSize is too small for the result.
@retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL. @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL.
@retval EFI_DEVICE_ERROR The iSCSI initiator name could not be retrieved due to a hardware error. @retval EFI_DEVICE_ERROR The iSCSI initiator name could not be retrieved due to a hardware error.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
@ -74,7 +74,7 @@ IScsiGetInitiatorName (
@retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data. @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.
@retval EFI_PROTOCOL_ERROR Input iSCSI initiator name does not adhere to RFC 3720 @retval EFI_PROTOCOL_ERROR Input iSCSI initiator name does not adhere to RFC 3720
(and other related protocols) (and other related protocols)
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI

View File

@ -20,7 +20,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 IScsiHexString[] = "0123456789ABCDEFa
Removes (trims) specified leading and trailing characters from a string. Removes (trims) specified leading and trailing characters from a string.
@param[in, out] Str Pointer to the null-terminated string to be trimmed. On return, @param[in, out] Str Pointer to the null-terminated string to be trimmed. On return,
str will hold the trimmed string. Str will hold the trimmed string.
@param[in] CharC Character will be trimmed from str. @param[in] CharC Character will be trimmed from str.
**/ **/
@ -74,7 +74,7 @@ StrTrim (
@param[in] SubnetMask The IPv4 subnet mask. @param[in] SubnetMask The IPv4 subnet mask.
@return The prefix length of the subnet mask. @return The prefix length of the subnet mask.
@return 0 Some unexpected error happened. @retval 0 Other errors as indicated.
**/ **/
UINT8 UINT8
IScsiGetSubnetMaskPrefixLength ( IScsiGetSubnetMaskPrefixLength (
@ -424,7 +424,7 @@ IScsiBinToHex (
@retval EFI_SUCCESS The hexadecimal string is converted into a binary @retval EFI_SUCCESS The hexadecimal string is converted into a binary
encoded buffer. encoded buffer.
@retval EFI_BUFFER_TOO_SMALL The binary buffer is too small to hold the converted data.s @retval EFI_BUFFER_TOO_SMALL The binary buffer is too small to hold the converted data.
**/ **/
EFI_STATUS EFI_STATUS
IScsiHexToBin ( IScsiHexToBin (
@ -512,7 +512,7 @@ IScsiGenRandom (
@param[in] Controller The handle of the controller. @param[in] Controller The handle of the controller.
@return The iSCSI driver data created. @return The iSCSI driver data created.
@return NULL Some unexpected error happened. @retval NULL Other errors as indicated.
**/ **/
ISCSI_DRIVER_DATA * ISCSI_DRIVER_DATA *
IScsiCreateDriverData ( IScsiCreateDriverData (
@ -619,7 +619,7 @@ IScsiCleanDriverData (
@retval EFI_SUCCESS The configuration of this instance is got. @retval EFI_SUCCESS The configuration of this instance is got.
@retval EFI_ABORTED The operation was aborted. @retval EFI_ABORTED The operation was aborted.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiGetConfigData ( IScsiGetConfigData (
@ -709,7 +709,7 @@ IScsiGetConfigData (
@param[in] Private The iSCSI driver data. @param[in] Private The iSCSI driver data.
@return The updated device path. @return The updated device path.
@return NULL Some unexpected error happened. @retval NULL Other errors as indicated.
**/ **/
EFI_DEVICE_PATH_PROTOCOL * EFI_DEVICE_PATH_PROTOCOL *
IScsiGetTcpConnDevicePath ( IScsiGetTcpConnDevicePath (

View File

@ -50,7 +50,7 @@ struct _ISCSI_SESSION_CONFIG_DATA {
@param[in] SubnetMask The IPv4 subnet mask. @param[in] SubnetMask The IPv4 subnet mask.
@return The prefix length of the subnet mask. @return The prefix length of the subnet mask.
@return 0 Some unexpected error happened. @retval 0 Other errors as indicated.
**/ **/
UINT8 UINT8
IScsiGetSubnetMaskPrefixLength ( IScsiGetSubnetMaskPrefixLength (
@ -171,7 +171,7 @@ IScsiBinToHex (
@retval EFI_SUCCESS The hexadecimal string is converted into a binary @retval EFI_SUCCESS The hexadecimal string is converted into a binary
encoded buffer. encoded buffer.
@retval EFI_BUFFER_TOO_SMALL The binary buffer is too small to hold the converted data.s @retval EFI_BUFFER_TOO_SMALL The binary buffer is too small to hold the converted data.
**/ **/
EFI_STATUS EFI_STATUS
IScsiHexToBin ( IScsiHexToBin (
@ -199,7 +199,7 @@ IScsiGenRandom (
@param[in] Controller The handle of the controller. @param[in] Controller The handle of the controller.
@return The iSCSI driver data created. @return The iSCSI driver data created.
@return NULL Some unexpected error happened. @retval NULL Other errors as indicated.
**/ **/
ISCSI_DRIVER_DATA * ISCSI_DRIVER_DATA *
IScsiCreateDriverData ( IScsiCreateDriverData (
@ -224,7 +224,7 @@ IScsiCleanDriverData (
@retval EFI_SUCCESS The configuration of this instance is got. @retval EFI_SUCCESS The configuration of this instance is got.
@retval EFI_ABORTED The operation was aborted. @retval EFI_ABORTED The operation was aborted.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiGetConfigData ( IScsiGetConfigData (
@ -237,7 +237,7 @@ IScsiGetConfigData (
@param[in] Private The iSCSI driver data. @param[in] Private The iSCSI driver data.
@return The updated device path. @return The updated device path.
@return NULL Some unexpected error happened. @retval NULL Other errors as indicated.
**/ **/
EFI_DEVICE_PATH_PROTOCOL * EFI_DEVICE_PATH_PROTOCOL *
IScsiGetTcpConnDevicePath ( IScsiGetTcpConnDevicePath (

View File

@ -116,7 +116,7 @@ IScsiUpdateCmdSN (
@retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target. @retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target.
@retval EFI_TIMEOUT Timeout happened during the login procedure. @retval EFI_TIMEOUT Timeout happened during the login procedure.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiConnLogin ( IScsiConnLogin (
@ -276,7 +276,7 @@ IScsiDestroyConnection (
@retval EFI_SUCCESS The iSCSI session login procedure finished. @retval EFI_SUCCESS The iSCSI session login procedure finished.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiSessionLogin ( IScsiSessionLogin (
@ -366,7 +366,7 @@ IScsiSendLoginReq (
@param[in] Conn The connection in the iSCSI login phase. @param[in] Conn The connection in the iSCSI login phase.
@retval EFI_SUCCESS The iSCSI login response PDU is received and processed. @retval EFI_SUCCESS The iSCSI login response PDU is received and processed.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiReceiveLoginRsp ( IScsiReceiveLoginRsp (
@ -472,7 +472,7 @@ IScsiAddKeyValuePair (
@param[in] Conn The connection in the iSCSI login phase. @param[in] Conn The connection in the iSCSI login phase.
@return The pointer to the net buffer containing the iSCSI login request built. @return The pointer to the net buffer containing the iSCSI login request built.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
NET_BUF * NET_BUF *
IScsiPrepareLoginReq ( IScsiPrepareLoginReq (
@ -567,7 +567,7 @@ IScsiPrepareLoginReq (
@retval EFI_SUCCESS The iSCSI login response PDU is processed and all check are passed. @retval EFI_SUCCESS The iSCSI login response PDU is processed and all check are passed.
@retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened. @retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened.
@retval EFI_MEDIA_CHANGED Target is redirected. @retval EFI_MEDIA_CHANGED Target is redirected.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiProcessLoginRsp ( IScsiProcessLoginRsp (
@ -776,7 +776,7 @@ IScsiProcessLoginRsp (
@retval EFI_SUCCESS The target address is updated. @retval EFI_SUCCESS The target address is updated.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval EFI_NOT_FOUND The TargetAddress key is not found. @retval EFI_NOT_FOUND The TargetAddress key is not found.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiUpdateTargetAddress ( IScsiUpdateTargetAddress (
@ -906,7 +906,7 @@ IScsiNbufExtFree (
@retval EFI_SUCCESS An iSCSI pdu is received. @retval EFI_SUCCESS An iSCSI pdu is received.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened. @retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiReceivePdu ( IScsiReceivePdu (
@ -1447,7 +1447,7 @@ IScsiPadSegment (
@param[in] Len Length of the data segment. @param[in] Len Length of the data segment.
@return The key-value list. @return The key-value list.
@return NULL Some unexpected error happened. @retval NULL Other errors as indicated.
**/ **/
LIST_ENTRY * LIST_ENTRY *
IScsiBuildKeyValueList ( IScsiBuildKeyValueList (
@ -1762,7 +1762,7 @@ IScsiNewDataSegment (
@param[in] Tcb The tcb assocated with this SCSI command. @param[in] Tcb The tcb assocated with this SCSI command.
@return The created iSCSI SCSI command PDU. @return The created iSCSI SCSI command PDU.
@return NULL Some unexpected error happened. @retval NULL Other errors as indicated.
**/ **/
NET_BUF * NET_BUF *
IScsiNewScsiCmdPdu ( IScsiNewScsiCmdPdu (
@ -1936,7 +1936,7 @@ ON_EXIT:
@param[in] Lun The LUN. @param[in] Lun The LUN.
@return The net buffer wrapping the Data Out PDU. @return The net buffer wrapping the Data Out PDU.
@return NULL Some unexpected error happened. @retval NULL Other errors as indicated.
**/ **/
NET_BUF * NET_BUF *
IScsiNewDataOutPdu ( IScsiNewDataOutPdu (
@ -2023,7 +2023,7 @@ IScsiNewDataOutPdu (
@param[in] Lun The LUN the data will be sent to. @param[in] Lun The LUN the data will be sent to.
@return A list of net buffers with each of them wraps an iSCSI SCSI Data Out PDU. @return A list of net buffers with each of them wraps an iSCSI SCSI Data Out PDU.
@return NULL Some unexpected error happened. @retval NULL Other errors as indicated.
**/ **/
LIST_ENTRY * LIST_ENTRY *
IScsiGenerateDataOutPduSequence ( IScsiGenerateDataOutPduSequence (
@ -2097,7 +2097,7 @@ ON_EXIT:
@retval EFI_SUCCES The data is sent out to the LUN. @retval EFI_SUCCES The data is sent out to the LUN.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiSendDataOutPduSequence ( IScsiSendDataOutPduSequence (
@ -2149,7 +2149,7 @@ IScsiSendDataOutPduSequence (
actions are taken. actions are taken.
@retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol errror happened. @retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol errror happened.
@retval EFI_BAD_BUFFER_SIZEE The buffer was not the proper size for the request. @retval EFI_BAD_BUFFER_SIZEE The buffer was not the proper size for the request.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiOnDataInRcvd ( IScsiOnDataInRcvd (
@ -2234,7 +2234,7 @@ IScsiOnDataInRcvd (
@retval EFI_SUCCES The R2T PDU is valid and the solicited data is sent out. @retval EFI_SUCCES The R2T PDU is valid and the solicited data is sent out.
@retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol errror happened. @retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol errror happened.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiOnR2TRcvd ( IScsiOnR2TRcvd (
@ -2298,7 +2298,7 @@ IScsiOnR2TRcvd (
@retval EFI_SUCCES The Response PDU is processed. @retval EFI_SUCCES The Response PDU is processed.
@retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol errror happened. @retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol errror happened.
@retval EFI_BAD_BUFFER_SIZEE The buffer was not the proper size for the request. @retval EFI_BAD_BUFFER_SIZEE The buffer was not the proper size for the request.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiOnScsiRspRcvd ( IScsiOnScsiRspRcvd (
@ -2441,9 +2441,9 @@ IScsiOnNopInRcvd (
@retval EFI_SUCCES The SCSI command is executed and the result is updated to @retval EFI_SUCCES The SCSI command is executed and the result is updated to
the Packet. the Packet.
@retval EFI_DEVICE_ERROR Some unexpected error happened. @retval EFI_DEVICE_ERROR Session state was not as required.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiExecuteScsiCommand ( IScsiExecuteScsiCommand (
@ -2654,13 +2654,13 @@ IScsiSessionReinstatement (
/** /**
Initialize some session parameters before login. Initialize some session parameters before login.
@param[in] Session The iSCSI session. @param[in, out] Session The iSCSI session.
@param[in] Recovery Whether the request is from a fresh new start or recovery. @param[in] Recovery Whether the request is from a fresh new start or recovery.
**/ **/
VOID VOID
IScsiSessionInit ( IScsiSessionInit (
IN ISCSI_SESSION *Session, IN OUT ISCSI_SESSION *Session,
IN BOOLEAN Recovery IN BOOLEAN Recovery
) )
{ {
UINT32 Random; UINT32 Random;

View File

@ -657,7 +657,7 @@ IScsiDetatchConnection (
@retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target. @retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target.
@retval EFI_TIMEOUT Timeout happened during the login procedure. @retval EFI_TIMEOUT Timeout happened during the login procedure.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiConnLogin ( IScsiConnLogin (
@ -695,7 +695,7 @@ IScsiDestroyConnection (
@retval EFI_SUCCESS The iSCSI session login procedure finished. @retval EFI_SUCCESS The iSCSI session login procedure finished.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiSessionLogin ( IScsiSessionLogin (
@ -724,7 +724,7 @@ IScsiSendLoginReq (
@param[in] Conn The connection in the iSCSI login phase. @param[in] Conn The connection in the iSCSI login phase.
@retval EFI_SUCCESS The iSCSI login response PDU is received and processed. @retval EFI_SUCCESS The iSCSI login response PDU is received and processed.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiReceiveLoginRsp ( IScsiReceiveLoginRsp (
@ -759,7 +759,7 @@ IScsiAddKeyValuePair (
@param[in] Conn The connection in the iSCSI login phase. @param[in] Conn The connection in the iSCSI login phase.
@return The pointer to the net buffer containing the iSCSI login request built. @return The pointer to the net buffer containing the iSCSI login request built.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
NET_BUF * NET_BUF *
IScsiPrepareLoginReq ( IScsiPrepareLoginReq (
@ -775,7 +775,7 @@ IScsiPrepareLoginReq (
@retval EFI_SUCCESS The iSCSI login response PDU is processed and all check are passed. @retval EFI_SUCCESS The iSCSI login response PDU is processed and all check are passed.
@retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened. @retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened.
@retval EFI_MEDIA_CHANGED Target is redirected. @retval EFI_MEDIA_CHANGED Target is redirected.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiProcessLoginRsp ( IScsiProcessLoginRsp (
@ -795,7 +795,7 @@ IScsiProcessLoginRsp (
@retval EFI_SUCCESS The target address is updated. @retval EFI_SUCCESS The target address is updated.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval EFI_NOT_FOUND The TargetAddress key is not found. @retval EFI_NOT_FOUND The TargetAddress key is not found.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiUpdateTargetAddress ( IScsiUpdateTargetAddress (
@ -831,7 +831,7 @@ IScsiFreeNbufList (
@retval EFI_SUCCESS An iSCSI pdu is received. @retval EFI_SUCCESS An iSCSI pdu is received.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened. @retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiReceivePdu ( IScsiReceivePdu (
@ -896,7 +896,7 @@ IScsiPadSegment (
@param[in] Len Length of the data segment. @param[in] Len Length of the data segment.
@return The key-value list. @return The key-value list.
@return NULL Some unexpected error happened. @retval NULL Other errors as indicated.
**/ **/
LIST_ENTRY * LIST_ENTRY *
IScsiBuildKeyValueList ( IScsiBuildKeyValueList (
@ -955,9 +955,9 @@ IScsiNormalizeName (
@retval EFI_SUCCES The SCSI command is executed and the result is updated to @retval EFI_SUCCES The SCSI command is executed and the result is updated to
the Packet. the Packet.
@retval EFI_DEVICE_ERROR Some unexpected error happened. @retval EFI_DEVICE_ERROR Other errors as indicated.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Some unexpected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
IScsiExecuteScsiCommand ( IScsiExecuteScsiCommand (
@ -983,15 +983,15 @@ IScsiSessionReinstatement (
/** /**
Initialize some session parameters before login. Initialize some session parameters before login.
@param[in] Session The iSCSI session. @param[in, out] Session The iSCSI session.
@param[in] Recovery Whether the request is from a fresh new start or recovery. @param[in] Recovery Whether the request is from a fresh new start or recovery.
**/ **/
VOID VOID
IScsiSessionInit ( IScsiSessionInit (
IN ISCSI_SESSION *Session, IN OUT ISCSI_SESSION *Session,
IN BOOLEAN Recovery IN BOOLEAN Recovery
); );
/** /**
Abort the iSCSI session, that is, reset all the connection and free the Abort the iSCSI session, that is, reset all the connection and free the
resources. resources.

View File

@ -272,7 +272,7 @@ Tcp4IoDestroySocket (
@retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully. @retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully.
@retval EFI_TIMEOUT Failed to connect to the other endpoint of the TCP socket in the specified time period. @retval EFI_TIMEOUT Failed to connect to the other endpoint of the TCP socket in the specified time period.
@retval Others Some expected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
Tcp4IoConnect ( Tcp4IoConnect (
@ -338,7 +338,7 @@ Tcp4IoReset (
@retval EFI_SUCCESS The packet is trasmitted. @retval EFI_SUCCESS The packet is trasmitted.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Some expected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
Tcp4IoTransmit ( Tcp4IoTransmit (
@ -404,7 +404,7 @@ ON_EXIT:
@retval EFI_OUT_OF_RESOURCES Failed to allocate momery. @retval EFI_OUT_OF_RESOURCES Failed to allocate momery.
@retval EFI_TIMEOUT Failed to receive the required amount of data in the @retval EFI_TIMEOUT Failed to receive the required amount of data in the
specified time period. specified time period.
@retval Others Some expected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
Tcp4IoReceive ( Tcp4IoReceive (

View File

@ -82,7 +82,7 @@ Tcp4IoDestroySocket (
@retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully. @retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully.
@retval EFI_TIMEOUT Failed to connect to the other endpoint of the TCP socket in the specified time period. @retval EFI_TIMEOUT Failed to connect to the other endpoint of the TCP socket in the specified time period.
@retval Others Some expected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
Tcp4IoConnect ( Tcp4IoConnect (
@ -108,7 +108,7 @@ Tcp4IoReset (
@retval EFI_SUCCESS The packet is trasmitted. @retval EFI_SUCCESS The packet is trasmitted.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Some expected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
Tcp4IoTransmit ( Tcp4IoTransmit (
@ -129,7 +129,7 @@ Tcp4IoTransmit (
@retval EFI_OUT_OF_RESOURCES Failed to allocate momery. @retval EFI_OUT_OF_RESOURCES Failed to allocate momery.
@retval EFI_TIMEOUT Failed to receive the required amount of data in the @retval EFI_TIMEOUT Failed to receive the required amount of data in the
specified time period. specified time period.
@retval Others Some expected error happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
Tcp4IoReceive ( Tcp4IoReceive (

View File

@ -285,7 +285,7 @@ MD5Init (
@param[in] DataLen The length of data. @param[in] DataLen The length of data.
@retval EFI_SUCCESS The transform is ok. @retval EFI_SUCCESS The transform is ok.
@retval Others Some unexpected errors happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
MD5Update ( MD5Update (
@ -312,7 +312,7 @@ MD5Update (
@param[out] HashVal The final 128-bits output. @param[out] HashVal The final 128-bits output.
@retval EFI_SUCCESS The transform is ok. @retval EFI_SUCCESS The transform is ok.
@retval Others Some unexpected errors happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
MD5Final ( MD5Final (

View File

@ -50,7 +50,7 @@ MD5Init (
@param[in] DataLen The length of data. @param[in] DataLen The length of data.
@retval EFI_SUCCESS The transform is ok. @retval EFI_SUCCESS The transform is ok.
@retval Others Some unexpected errors happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
MD5Update ( MD5Update (
@ -68,7 +68,7 @@ MD5Update (
@param[out] HashVal The final 128-bits output. @param[out] HashVal The final 128-bits output.
@retval EFI_SUCCESS The transform is ok. @retval EFI_SUCCESS The transform is ok.
@retval Others Some unexpected errors happened. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
MD5Final ( MD5Final (