From 963dbb30018c6420a9b27778e05e5eed74b23173 Mon Sep 17 00:00:00 2001 From: ywu21 Date: Fri, 12 Dec 2008 07:03:44 +0000 Subject: [PATCH] 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 --- .../Universal/Network/IScsiDxe/IScsiCHAP.c | 6 +-- .../Universal/Network/IScsiDxe/IScsiCHAP.h | 2 +- .../Universal/Network/IScsiDxe/IScsiConfig.c | 10 ++--- .../Universal/Network/IScsiDxe/IScsiConfig.h | 31 ++++++++++++-- .../Universal/Network/IScsiDxe/IScsiDhcp.c | 37 +++++++--------- .../Universal/Network/IScsiDxe/IScsiDhcp.h | 2 +- .../Universal/Network/IScsiDxe/IScsiDriver.c | 6 +-- .../Universal/Network/IScsiDxe/IScsiDriver.h | 4 +- .../Universal/Network/IScsiDxe/IScsiIbft.c | 2 +- .../Universal/Network/IScsiDxe/IScsiIbft.h | 2 +- .../Network/IScsiDxe/IScsiInitiatorName.c | 4 +- .../Universal/Network/IScsiDxe/IScsiMisc.c | 12 +++--- .../Universal/Network/IScsiDxe/IScsiMisc.h | 10 ++--- .../Universal/Network/IScsiDxe/IScsiProto.c | 42 +++++++++---------- .../Universal/Network/IScsiDxe/IScsiProto.h | 30 ++++++------- .../Universal/Network/IScsiDxe/IScsiTcp4Io.c | 6 +-- .../Universal/Network/IScsiDxe/IScsiTcp4Io.h | 6 +-- MdeModulePkg/Universal/Network/IScsiDxe/Md5.c | 4 +- MdeModulePkg/Universal/Network/IScsiDxe/Md5.h | 4 +- 19 files changed, 118 insertions(+), 102 deletions(-) diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c index ad68cd9d4c..4df7123b54 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c @@ -30,7 +30,7 @@ EFI_GUID mIScsiCHAPAuthInfoGuid = ISCSI_CHAP_AUTH_INFO_GUID; @retval EFI_SUCCESS The expected hash value was caculatedly successfully. @retval EFI_PROTOCOL_ERROR The length of the secret should be at least the length of the hash value for the hashing algorithm chosen. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiCHAPCalculateResponse ( @@ -82,7 +82,7 @@ IScsiCHAPCalculateResponse ( @retval EFI_SUCCESS The response from target passed authentication. @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 IScsiCHAPAuthTarget ( @@ -123,7 +123,7 @@ IScsiCHAPAuthTarget ( @retval EFI_SUCCESS The Login Response passed the CHAP validation. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_PROTOCOL_ERROR Some kind of protocol error happend. - @retval Others Some unexpected error happend. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiCHAPOnRspReceived ( diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h index 7bb01c5a6b..ca8338d504 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h @@ -88,7 +88,7 @@ typedef struct _ISCSI_CHAP_AUTH_DATA { @retval EFI_SUCCESS The Login Response passed the CHAP validation. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_PROTOCOL_ERROR Some kind of protocol error happend. - @retval Others Some unexpected error happend. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiCHAPOnRspReceived ( diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c index b097673166..5b6c3bcee3 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c @@ -58,7 +58,7 @@ PopUpInvalidNotify ( Update the list of iSCSI devices the iSCSI driver is controlling. @retval EFI_SUCCESS The callback successfully handled the action. - @retval Others Some unexpected errors happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiUpdateDeviceList ( @@ -460,7 +460,7 @@ IScsiFormRouteConfig ( @retval EFI_UNSUPPORTED The specified Action is not supported by the callback.Currently not implemented. @retval EFI_INVALID_PARAMETERS Passing in wrong parameter. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS EFIAPI @@ -737,7 +737,7 @@ IScsiFormCallback ( @retval EFI_SUCCESS The iSCSI configuration form is updated. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. - @retval Others Some unexpected errors happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiConfigUpdateForm ( @@ -891,11 +891,11 @@ IScsiConfigUpdateForm ( @retval EFI_SUCCESS The iSCSI configuration form is initialized. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiConfigFormInit ( - IN EFI_HANDLE DriverBindingHandle + VOID ) { EFI_STATUS Status; diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h index e4f2645d31..eb6e0e3853 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h @@ -32,6 +32,31 @@ extern UINT8 IScsiDxeStrings[]; #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) \ CR ( \ Callback, \ @@ -87,7 +112,7 @@ typedef struct _ISCSI_FORM_CALLBACK_INFO { @retval EFI_SUCCESS The iSCSI configuration form is updated. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. - @retval Others Some unexpected errors happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiConfigUpdateForm ( @@ -103,11 +128,11 @@ IScsiConfigUpdateForm ( @retval EFI_SUCCESS The iSCSI configuration form is initialized. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiConfigFormInit ( - IN EFI_HANDLE DriverBindingHandle + VOID ); /** diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c index f02423475e..85b5dbf745 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c @@ -96,24 +96,18 @@ IScsiDhcpExtractRootPath ( goto ON_EXIT; } - for (FieldIndex = RP_FIELD_IDX_SERVERNAME; FieldIndex != RP_FIELD_IDX_TARGETNAME; FieldIndex = RP_FIELD_IDX_TARGETNAME) { - if (Fields[FieldIndex].Str == NULL) { - Status = EFI_INVALID_PARAMETER; - goto ON_EXIT; - } - } - - FieldIndex = RP_FIELD_IDX_PROTOCOL; - if (Fields[RP_FIELD_IDX_PROTOCOL].Len > 1) { + if ((Fields[RP_FIELD_IDX_SERVERNAME].Str == NULL) || + (Fields[RP_FIELD_IDX_TARGETNAME].Str == NULL) || + (Fields[RP_FIELD_IDX_PROTOCOL].Len > 1) + ) { + Status = EFI_INVALID_PARAMETER; goto ON_EXIT; } - // // Get the IP address of the target. // - FieldIndex = RP_FIELD_IDX_SERVERNAME; - Field = &Fields[FieldIndex]; + Field = &Fields[RP_FIELD_IDX_SERVERNAME]; Status = IScsiAsciiStrToIp (Field->Str, &ConfigNvData->TargetIp); if (EFI_ERROR (Status)) { goto ON_EXIT; @@ -121,8 +115,7 @@ IScsiDhcpExtractRootPath ( // // Check the protocol type. // - FieldIndex = RP_FIELD_IDX_PROTOCOL; - Field = &Fields[FieldIndex]; + Field = &Fields[RP_FIELD_IDX_PROTOCOL]; if ((Field->Str != NULL) && ((*(Field->Str) - '0') != EFI_IP_PROTO_TCP)) { Status = EFI_INVALID_PARAMETER; goto ON_EXIT; @@ -130,8 +123,7 @@ IScsiDhcpExtractRootPath ( // // Get the port of the iSCSI target. // - FieldIndex = RP_FIELD_IDX_PORT; - Field = &Fields[FieldIndex]; + Field = &Fields[RP_FIELD_IDX_PORT]; if (Field->Str != NULL) { ConfigNvData->TargetPort = (UINT16) AsciiStrDecimalToUintn (Field->Str); } else { @@ -140,8 +132,7 @@ IScsiDhcpExtractRootPath ( // // Get the LUN. // - FieldIndex = RP_FIELD_IDX_LUN; - Field = &Fields[FieldIndex]; + Field = &Fields[RP_FIELD_IDX_LUN]; if (Field->Str != NULL) { Status = IScsiAsciiStrToLun (Field->Str, ConfigNvData->BootLun); if (EFI_ERROR (Status)) { @@ -153,8 +144,8 @@ IScsiDhcpExtractRootPath ( // // Get the target iSCSI Name. // - FieldIndex = RP_FIELD_IDX_TARGETNAME; - Field = &Fields[FieldIndex]; + Field = &Fields[RP_FIELD_IDX_TARGETNAME]; + if (AsciiStrLen (Field->Str) > ISCSI_NAME_MAX_SIZE - 1) { Status = EFI_INVALID_PARAMETER; goto ON_EXIT; @@ -190,7 +181,7 @@ ON_EXIT: @retval EFI_SUCCESS Either the DHCP OFFER is qualified or we're not intereseted in the Dhcp4Event. @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 IScsiDhcpSelectOffer ( @@ -261,7 +252,7 @@ IScsiDhcpSelectOffer ( @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_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 IScsiParseDhcpAck ( @@ -352,7 +343,7 @@ IScsiParseDhcpAck ( @retval EFI_SUCCESS The DNS information is got from the DHCP ACK. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiDoDhcp ( diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h index 1c7ad56767..af55c13dae 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h @@ -49,7 +49,7 @@ typedef struct _ISCSI_ROOT_PATH_FIELD { @retval EFI_SUCCESS The DNS information is got from the DHCP ACK. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiDoDhcp ( diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c index b23289ff56..2f776aa224 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c @@ -337,7 +337,7 @@ IScsiDriverBindingStop ( @param[in] ImageHandle Handle that identifies the image to be unloaded. @retval EFI_SUCCESS The image has been unloaded. - @retval Others Some unexpected errors happened. + @retval Others Other errors as indicated. **/ EFI_STATUS EFIAPI @@ -408,7 +408,7 @@ EfiIScsiUnload ( @retval EFI_SUCCESS The operation completed successfully. @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 EFIAPI @@ -472,7 +472,7 @@ IScsiDriverEntryPoint ( // // Initialize the configuration form of iSCSI. // - Status = IScsiConfigFormInit (gIScsiDriverBinding.DriverBindingHandle); + Status = IScsiConfigFormInit (); if (EFI_ERROR (Status)) { gBS->UninstallMultipleProtocolInterfaces ( ImageHandle, diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h index f8f726c340..369f159120 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h @@ -258,7 +258,7 @@ IScsiComponentNameGetControllerName ( @retval EFI_BUFFER_TOO_SMALL BufferSize is too small for the result. @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 Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS EFIAPI @@ -283,7 +283,7 @@ IScsiGetInitiatorName ( @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 (and other related protocols) - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS EFIAPI diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c index 127fe9f733..ff8c96eafe 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c @@ -189,7 +189,7 @@ IScsiMapV4ToV6Addr ( @param[in] Controller The handle of the controller. @return UINT16 The composited representation of the NIC PCI location. - @retval 0 Some unexpected error happened. + @retval 0 Other errors as indicated. **/ UINT16 IScsiGetNICPciLocation ( diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.h index a21990e3a2..e2fec0b255 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.h @@ -31,7 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ VOID IScsiPublishIbft ( - VOID + VOID ); #endif diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiInitiatorName.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiInitiatorName.c index c6b1bf3586..2084fe1779 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiInitiatorName.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiInitiatorName.c @@ -32,7 +32,7 @@ EFI_ISCSI_INITIATOR_NAME_PROTOCOL gIScsiInitiatorName = { @retval EFI_BUFFER_TOO_SMALL BufferSize is too small for the result. @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 Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS EFIAPI @@ -74,7 +74,7 @@ IScsiGetInitiatorName ( @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 (and other related protocols) - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS EFIAPI diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c index 2215fdaa2b..7a77b2a04d 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c @@ -20,7 +20,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 IScsiHexString[] = "0123456789ABCDEFa 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, - str will hold the trimmed string. + Str will hold the trimmed string. @param[in] CharC Character will be trimmed from str. **/ @@ -74,7 +74,7 @@ StrTrim ( @param[in] SubnetMask The IPv4 subnet mask. @return The prefix length of the subnet mask. - @return 0 Some unexpected error happened. + @retval 0 Other errors as indicated. **/ UINT8 IScsiGetSubnetMaskPrefixLength ( @@ -424,7 +424,7 @@ IScsiBinToHex ( @retval EFI_SUCCESS The hexadecimal string is converted into a binary 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 IScsiHexToBin ( @@ -512,7 +512,7 @@ IScsiGenRandom ( @param[in] Controller The handle of the controller. @return The iSCSI driver data created. - @return NULL Some unexpected error happened. + @retval NULL Other errors as indicated. **/ ISCSI_DRIVER_DATA * IScsiCreateDriverData ( @@ -619,7 +619,7 @@ IScsiCleanDriverData ( @retval EFI_SUCCESS The configuration of this instance is got. @retval EFI_ABORTED The operation was aborted. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiGetConfigData ( @@ -709,7 +709,7 @@ IScsiGetConfigData ( @param[in] Private The iSCSI driver data. @return The updated device path. - @return NULL Some unexpected error happened. + @retval NULL Other errors as indicated. **/ EFI_DEVICE_PATH_PROTOCOL * IScsiGetTcpConnDevicePath ( diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.h index cde79aa525..33b7b58acf 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.h @@ -50,7 +50,7 @@ struct _ISCSI_SESSION_CONFIG_DATA { @param[in] SubnetMask The IPv4 subnet mask. @return The prefix length of the subnet mask. - @return 0 Some unexpected error happened. + @retval 0 Other errors as indicated. **/ UINT8 IScsiGetSubnetMaskPrefixLength ( @@ -171,7 +171,7 @@ IScsiBinToHex ( @retval EFI_SUCCESS The hexadecimal string is converted into a binary 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 IScsiHexToBin ( @@ -199,7 +199,7 @@ IScsiGenRandom ( @param[in] Controller The handle of the controller. @return The iSCSI driver data created. - @return NULL Some unexpected error happened. + @retval NULL Other errors as indicated. **/ ISCSI_DRIVER_DATA * IScsiCreateDriverData ( @@ -224,7 +224,7 @@ IScsiCleanDriverData ( @retval EFI_SUCCESS The configuration of this instance is got. @retval EFI_ABORTED The operation was aborted. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiGetConfigData ( @@ -237,7 +237,7 @@ IScsiGetConfigData ( @param[in] Private The iSCSI driver data. @return The updated device path. - @return NULL Some unexpected error happened. + @retval NULL Other errors as indicated. **/ EFI_DEVICE_PATH_PROTOCOL * IScsiGetTcpConnDevicePath ( diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c index c3ef7818c4..f3ed2b780e 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c @@ -116,7 +116,7 @@ IScsiUpdateCmdSN ( @retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target. @retval EFI_TIMEOUT Timeout happened during the login procedure. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiConnLogin ( @@ -276,7 +276,7 @@ IScsiDestroyConnection ( @retval EFI_SUCCESS The iSCSI session login procedure finished. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiSessionLogin ( @@ -366,7 +366,7 @@ IScsiSendLoginReq ( @param[in] Conn The connection in the iSCSI login phase. @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 IScsiReceiveLoginRsp ( @@ -472,7 +472,7 @@ IScsiAddKeyValuePair ( @param[in] Conn The connection in the iSCSI login phase. @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 * IScsiPrepareLoginReq ( @@ -567,7 +567,7 @@ IScsiPrepareLoginReq ( @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_MEDIA_CHANGED Target is redirected. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiProcessLoginRsp ( @@ -776,7 +776,7 @@ IScsiProcessLoginRsp ( @retval EFI_SUCCESS The target address is updated. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_NOT_FOUND The TargetAddress key is not found. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiUpdateTargetAddress ( @@ -906,7 +906,7 @@ IScsiNbufExtFree ( @retval EFI_SUCCESS An iSCSI pdu is received. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @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 IScsiReceivePdu ( @@ -1447,7 +1447,7 @@ IScsiPadSegment ( @param[in] Len Length of the data segment. @return The key-value list. - @return NULL Some unexpected error happened. + @retval NULL Other errors as indicated. **/ LIST_ENTRY * IScsiBuildKeyValueList ( @@ -1762,7 +1762,7 @@ IScsiNewDataSegment ( @param[in] Tcb The tcb assocated with this SCSI command. @return The created iSCSI SCSI command PDU. - @return NULL Some unexpected error happened. + @retval NULL Other errors as indicated. **/ NET_BUF * IScsiNewScsiCmdPdu ( @@ -1936,7 +1936,7 @@ ON_EXIT: @param[in] Lun The LUN. @return The net buffer wrapping the Data Out PDU. - @return NULL Some unexpected error happened. + @retval NULL Other errors as indicated. **/ NET_BUF * IScsiNewDataOutPdu ( @@ -2023,7 +2023,7 @@ IScsiNewDataOutPdu ( @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 NULL Some unexpected error happened. + @retval NULL Other errors as indicated. **/ LIST_ENTRY * IScsiGenerateDataOutPduSequence ( @@ -2097,7 +2097,7 @@ ON_EXIT: @retval EFI_SUCCES The data is sent out to the LUN. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiSendDataOutPduSequence ( @@ -2149,7 +2149,7 @@ IScsiSendDataOutPduSequence ( actions are taken. @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 Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiOnDataInRcvd ( @@ -2234,7 +2234,7 @@ IScsiOnDataInRcvd ( @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 Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiOnR2TRcvd ( @@ -2298,7 +2298,7 @@ IScsiOnR2TRcvd ( @retval EFI_SUCCES The Response PDU is processed. @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 Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiOnScsiRspRcvd ( @@ -2441,9 +2441,9 @@ IScsiOnNopInRcvd ( @retval EFI_SUCCES The SCSI command is executed and the result is updated to 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 Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiExecuteScsiCommand ( @@ -2654,13 +2654,13 @@ IScsiSessionReinstatement ( /** Initialize some session parameters before login. - @param[in] Session The iSCSI session. - @param[in] Recovery Whether the request is from a fresh new start or recovery. + @param[in, out] Session The iSCSI session. + @param[in] Recovery Whether the request is from a fresh new start or recovery. **/ VOID IScsiSessionInit ( - IN ISCSI_SESSION *Session, - IN BOOLEAN Recovery + IN OUT ISCSI_SESSION *Session, + IN BOOLEAN Recovery ) { UINT32 Random; diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h index 484cb6f169..870e6ded44 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h @@ -657,7 +657,7 @@ IScsiDetatchConnection ( @retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target. @retval EFI_TIMEOUT Timeout happened during the login procedure. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiConnLogin ( @@ -695,7 +695,7 @@ IScsiDestroyConnection ( @retval EFI_SUCCESS The iSCSI session login procedure finished. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiSessionLogin ( @@ -724,7 +724,7 @@ IScsiSendLoginReq ( @param[in] Conn The connection in the iSCSI login phase. @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 IScsiReceiveLoginRsp ( @@ -759,7 +759,7 @@ IScsiAddKeyValuePair ( @param[in] Conn The connection in the iSCSI login phase. @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 * IScsiPrepareLoginReq ( @@ -775,7 +775,7 @@ IScsiPrepareLoginReq ( @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_MEDIA_CHANGED Target is redirected. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiProcessLoginRsp ( @@ -795,7 +795,7 @@ IScsiProcessLoginRsp ( @retval EFI_SUCCESS The target address is updated. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_NOT_FOUND The TargetAddress key is not found. - @retval Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiUpdateTargetAddress ( @@ -831,7 +831,7 @@ IScsiFreeNbufList ( @retval EFI_SUCCESS An iSCSI pdu is received. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @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 IScsiReceivePdu ( @@ -896,7 +896,7 @@ IScsiPadSegment ( @param[in] Len Length of the data segment. @return The key-value list. - @return NULL Some unexpected error happened. + @retval NULL Other errors as indicated. **/ LIST_ENTRY * IScsiBuildKeyValueList ( @@ -955,9 +955,9 @@ IScsiNormalizeName ( @retval EFI_SUCCES The SCSI command is executed and the result is updated to 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 Others Some unexpected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiExecuteScsiCommand ( @@ -983,15 +983,15 @@ IScsiSessionReinstatement ( /** Initialize some session parameters before login. - @param[in] Session The iSCSI session. - @param[in] Recovery Whether the request is from a fresh new start or recovery. + @param[in, out] Session The iSCSI session. + @param[in] Recovery Whether the request is from a fresh new start or recovery. **/ VOID IScsiSessionInit ( - IN ISCSI_SESSION *Session, - IN BOOLEAN Recovery + IN OUT ISCSI_SESSION *Session, + IN BOOLEAN Recovery ); - + /** Abort the iSCSI session, that is, reset all the connection and free the resources. diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c index f1520267b8..96d990f7fe 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c @@ -272,7 +272,7 @@ Tcp4IoDestroySocket ( @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 Others Some expected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS Tcp4IoConnect ( @@ -338,7 +338,7 @@ Tcp4IoReset ( @retval EFI_SUCCESS The packet is trasmitted. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. - @retval Others Some expected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS Tcp4IoTransmit ( @@ -404,7 +404,7 @@ ON_EXIT: @retval EFI_OUT_OF_RESOURCES Failed to allocate momery. @retval EFI_TIMEOUT Failed to receive the required amount of data in the specified time period. - @retval Others Some expected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS Tcp4IoReceive ( diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h index 86c2f86e04..1cc051c58a 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h @@ -82,7 +82,7 @@ Tcp4IoDestroySocket ( @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 Others Some expected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS Tcp4IoConnect ( @@ -108,7 +108,7 @@ Tcp4IoReset ( @retval EFI_SUCCESS The packet is trasmitted. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. - @retval Others Some expected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS Tcp4IoTransmit ( @@ -129,7 +129,7 @@ Tcp4IoTransmit ( @retval EFI_OUT_OF_RESOURCES Failed to allocate momery. @retval EFI_TIMEOUT Failed to receive the required amount of data in the specified time period. - @retval Others Some expected error happened. + @retval Others Other errors as indicated. **/ EFI_STATUS Tcp4IoReceive ( diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c b/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c index 202de40d1f..fae10d268f 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c @@ -285,7 +285,7 @@ MD5Init ( @param[in] DataLen The length of data. @retval EFI_SUCCESS The transform is ok. - @retval Others Some unexpected errors happened. + @retval Others Other errors as indicated. **/ EFI_STATUS MD5Update ( @@ -312,7 +312,7 @@ MD5Update ( @param[out] HashVal The final 128-bits output. @retval EFI_SUCCESS The transform is ok. - @retval Others Some unexpected errors happened. + @retval Others Other errors as indicated. **/ EFI_STATUS MD5Final ( diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h b/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h index 2804d4e189..18accea7d5 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h @@ -50,7 +50,7 @@ MD5Init ( @param[in] DataLen The length of data. @retval EFI_SUCCESS The transform is ok. - @retval Others Some unexpected errors happened. + @retval Others Other errors as indicated. **/ EFI_STATUS MD5Update ( @@ -68,7 +68,7 @@ MD5Update ( @param[out] HashVal The final 128-bits output. @retval EFI_SUCCESS The transform is ok. - @retval Others Some unexpected errors happened. + @retval Others Other errors as indicated. **/ EFI_STATUS MD5Final ( -- 2.39.2