mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
update for passing the ICC compiler
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4498 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
900faff93e
commit
07a7038c78
@ -119,7 +119,6 @@ Returns:
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
ISCSI_SESSION *Session;
|
ISCSI_SESSION *Session;
|
||||||
ISCSI_SESSION_CONFIG_DATA *ConfigData;
|
|
||||||
ISCSI_CHAP_AUTH_DATA *AuthData;
|
ISCSI_CHAP_AUTH_DATA *AuthData;
|
||||||
CHAR8 *Value;
|
CHAR8 *Value;
|
||||||
UINT8 *Data;
|
UINT8 *Data;
|
||||||
@ -137,7 +136,6 @@ Returns:
|
|||||||
ASSERT (Conn->RspQue.BufNum != 0);
|
ASSERT (Conn->RspQue.BufNum != 0);
|
||||||
|
|
||||||
Session = Conn->Session;
|
Session = Conn->Session;
|
||||||
ConfigData = &Session->ConfigData;
|
|
||||||
AuthData = &Session->AuthData;
|
AuthData = &Session->AuthData;
|
||||||
|
|
||||||
Len = Conn->RspQue.BufSize;
|
Len = Conn->RspQue.BufSize;
|
||||||
@ -153,7 +151,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Build the key-value list from the data segment of the Login Response.
|
// Build the key-value list from the data segment of the Login Response.
|
||||||
//
|
//
|
||||||
KeyValueList = IScsiBuildKeyValueList (Data, Len);
|
KeyValueList = IScsiBuildKeyValueList ((CHAR8*)Data, Len);
|
||||||
if (KeyValueList == NULL) {
|
if (KeyValueList == NULL) {
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
@ -319,7 +317,6 @@ Returns:
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
ISCSI_SESSION *Session;
|
ISCSI_SESSION *Session;
|
||||||
ISCSI_LOGIN_REQUEST *LoginReq;
|
ISCSI_LOGIN_REQUEST *LoginReq;
|
||||||
ISCSI_SESSION_CONFIG_DATA *ConfigData;
|
|
||||||
ISCSI_CHAP_AUTH_DATA *AuthData;
|
ISCSI_CHAP_AUTH_DATA *AuthData;
|
||||||
CHAR8 *Value;
|
CHAR8 *Value;
|
||||||
CHAR8 ValueStr[256];
|
CHAR8 ValueStr[256];
|
||||||
@ -331,7 +328,6 @@ Returns:
|
|||||||
ASSERT (Conn->CurrentStage == ISCSI_SECURITY_NEGOTIATION);
|
ASSERT (Conn->CurrentStage == ISCSI_SECURITY_NEGOTIATION);
|
||||||
|
|
||||||
Session = Conn->Session;
|
Session = Conn->Session;
|
||||||
ConfigData = &Session->ConfigData;
|
|
||||||
AuthData = &Session->AuthData;
|
AuthData = &Session->AuthData;
|
||||||
LoginReq = (ISCSI_LOGIN_REQUEST *) NetbufGetByte (Pdu, 0, 0);
|
LoginReq = (ISCSI_LOGIN_REQUEST *) NetbufGetByte (Pdu, 0, 0);
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
@ -387,7 +383,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// CHAP_N=<N>
|
// CHAP_N=<N>
|
||||||
//
|
//
|
||||||
IScsiAddKeyValuePair (Pdu, ISCSI_KEY_CHAP_NAME, (UINT8 *) &AuthData->AuthConfig.CHAPName);
|
IScsiAddKeyValuePair (Pdu, ISCSI_KEY_CHAP_NAME, (CHAR8 *) &AuthData->AuthConfig.CHAPName);
|
||||||
//
|
//
|
||||||
// CHAP_R=<R>
|
// CHAP_R=<R>
|
||||||
//
|
//
|
||||||
|
@ -21,19 +21,12 @@ Abstract:
|
|||||||
#ifndef _ISCSI_CONFIG_H_
|
#ifndef _ISCSI_CONFIG_H_
|
||||||
#define _ISCSI_CONFIG_H_
|
#define _ISCSI_CONFIG_H_
|
||||||
|
|
||||||
//#include "Tiano.h"
|
|
||||||
//#include "EfiDriverLib.h"
|
|
||||||
//#include "Base.h"
|
|
||||||
#include <Library/FrameworkHiiLib.h>
|
#include <Library/FrameworkHiiLib.h>
|
||||||
#include <Protocol/FrameworkFormBrowser.h>
|
#include <Protocol/FrameworkFormBrowser.h>
|
||||||
#include <Protocol/FrameworkFormCallback.h>
|
#include <Protocol/FrameworkFormCallback.h>
|
||||||
#include <Library/FrameworkIfrSupportLib.h>
|
#include <Library/FrameworkIfrSupportLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
//#include "EfiPrintLib.h"
|
|
||||||
//#include EFI_PROTOCOL_DEFINITION (Hii)
|
|
||||||
//#include EFI_PROTOCOL_DEFINITION (FormBrowser)
|
|
||||||
//#include EFI_PROTOCOL_DEFINITION (FormCallback)
|
|
||||||
|
|
||||||
#include <Library/NetLib.h>
|
#include <Library/NetLib.h>
|
||||||
#include "IScsiConfigNVDataStruc.h"
|
#include "IScsiConfigNVDataStruc.h"
|
||||||
|
@ -230,9 +230,9 @@ Returns:
|
|||||||
|
|
||||||
Status = This->Parse (This, Packet, &OptionCount, NULL);
|
Status = This->Parse (This, Packet, &OptionCount, NULL);
|
||||||
if (Status != EFI_BUFFER_TOO_SMALL) {
|
if (Status != EFI_BUFFER_TOO_SMALL) {
|
||||||
return EFI_NOT_READY;
|
return EFI_NOT_READY;
|
||||||
}
|
}
|
||||||
|
|
||||||
OptionList = NetAllocatePool (OptionCount * sizeof (EFI_DHCP4_PACKET_OPTION *));
|
OptionList = NetAllocatePool (OptionCount * sizeof (EFI_DHCP4_PACKET_OPTION *));
|
||||||
if (OptionList == NULL) {
|
if (OptionList == NULL) {
|
||||||
return EFI_NOT_READY;
|
return EFI_NOT_READY;
|
||||||
@ -437,7 +437,7 @@ Returns:
|
|||||||
// Ask the server to reply with Netmask, Router, DNS and RootPath options.
|
// Ask the server to reply with Netmask, Router, DNS and RootPath options.
|
||||||
//
|
//
|
||||||
ParaList->OpCode = DHCP4_TAG_PARA_LIST;
|
ParaList->OpCode = DHCP4_TAG_PARA_LIST;
|
||||||
ParaList->Length = ConfigData->NvData.TargetInfoFromDhcp ? 4 : 3;
|
ParaList->Length = (UINT8)(ConfigData->NvData.TargetInfoFromDhcp ? 4 : 3);
|
||||||
ParaList->Data[0] = DHCP4_TAG_NETMASK;
|
ParaList->Data[0] = DHCP4_TAG_NETMASK;
|
||||||
ParaList->Data[1] = DHCP4_TAG_ROUTER;
|
ParaList->Data[1] = DHCP4_TAG_ROUTER;
|
||||||
ParaList->Data[2] = DHCP4_TAG_DNS;
|
ParaList->Data[2] = DHCP4_TAG_DNS;
|
||||||
|
@ -20,9 +20,7 @@ Abstract:
|
|||||||
#ifndef _ISCSI_DHCP_H_
|
#ifndef _ISCSI_DHCP_H_
|
||||||
#define _ISCSI_DHCP_H_
|
#define _ISCSI_DHCP_H_
|
||||||
|
|
||||||
//#include "Tiano.h"
|
#include <Protocol/Dhcp4.h>
|
||||||
//#include EFI_PROTOCOL_CONSUMER (Dhcp4)
|
|
||||||
#include "protocol\Dhcp4.h"
|
|
||||||
|
|
||||||
#define DHCP4_TAG_PARA_LIST 55
|
#define DHCP4_TAG_PARA_LIST 55
|
||||||
#define DHCP4_TAG_NETMASK 1
|
#define DHCP4_TAG_NETMASK 1
|
||||||
|
@ -101,7 +101,7 @@ Returns:
|
|||||||
// Need expand the control section if more than 2 NIC/Target sections
|
// Need expand the control section if more than 2 NIC/Target sections
|
||||||
// exist.
|
// exist.
|
||||||
//
|
//
|
||||||
Control->Header.Length += (UINT16) (NumOffset - 4) * sizeof (UINT16);
|
Control->Header.Length = (UINT16)(Control->Header.Length + (NumOffset - 4) * sizeof (UINT16));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Get the identifier from the handle.
|
// Get the identifier from the handle.
|
||||||
//
|
//
|
||||||
Status = gBS->HandleProtocol (Handle, &mIScsiPrivateGuid, &IScsiIdentifier);
|
Status = gBS->HandleProtocol (Handle, &mIScsiPrivateGuid, (void **)&IScsiIdentifier);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
return ;
|
return ;
|
||||||
@ -278,7 +278,7 @@ Returns:
|
|||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
&gEfiDevicePathProtocolGuid,
|
&gEfiDevicePathProtocolGuid,
|
||||||
&DevicePath
|
(void **)&DevicePath
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return 0;
|
return 0;
|
||||||
@ -293,7 +293,7 @@ Returns:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (PciIoHandle, &gEfiPciIoProtocolGuid, &PciIo);
|
Status = gBS->HandleProtocol (PciIoHandle, &gEfiPciIoProtocolGuid, (void **)&PciIo);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -333,7 +333,7 @@ Returns:
|
|||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
&gEfiSimpleNetworkProtocolGuid,
|
&gEfiSimpleNetworkProtocolGuid,
|
||||||
&Snp
|
(void **)&Snp
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
@ -392,7 +392,7 @@ Returns:
|
|||||||
SectionOffset = &Control->NIC0Offset;
|
SectionOffset = &Control->NIC0Offset;
|
||||||
|
|
||||||
for (Index = 0; Index < HandleCount; Index++) {
|
for (Index = 0; Index < HandleCount; Index++) {
|
||||||
Status = gBS->HandleProtocol (Handles[Index], &mIScsiPrivateGuid, &IScsiIdentifier);
|
Status = gBS->HandleProtocol (Handles[Index], &mIScsiPrivateGuid, (void **)&IScsiIdentifier);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
return ;
|
return ;
|
||||||
@ -552,7 +552,7 @@ Returns:
|
|||||||
EFI_ACPI_TABLE_VERSION Version;
|
EFI_ACPI_TABLE_VERSION Version;
|
||||||
UINT32 Signature;
|
UINT32 Signature;
|
||||||
|
|
||||||
Status = gBS->LocateProtocol (&gEfiAcpiSupportProtocolGuid, NULL, &AcpiSupport);
|
Status = gBS->LocateProtocol (&gEfiAcpiSupportProtocolGuid, NULL, (void **)&AcpiSupport);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
@ -563,7 +563,7 @@ Returns:
|
|||||||
Status = AcpiSupport->GetAcpiTable (
|
Status = AcpiSupport->GetAcpiTable (
|
||||||
AcpiSupport,
|
AcpiSupport,
|
||||||
Index,
|
Index,
|
||||||
&Table,
|
(void **)&Table,
|
||||||
&Version,
|
&Version,
|
||||||
&TableHandle
|
&TableHandle
|
||||||
);
|
);
|
||||||
@ -613,7 +613,7 @@ Returns:
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
Heap = (CHAR8 *) Table + IBFT_HEAP_OFFSET;
|
Heap = (UINT8 *) Table + IBFT_HEAP_OFFSET;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Fill in the various section of the iSCSI Boot Firmware Table.
|
// Fill in the various section of the iSCSI Boot Firmware Table.
|
||||||
|
@ -37,7 +37,7 @@ Abstract:
|
|||||||
|
|
||||||
#define ISCSI_SESSION_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'S', 'N')
|
#define ISCSI_SESSION_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'S', 'N')
|
||||||
|
|
||||||
typedef struct _ISCSI_SESSION {
|
struct _ISCSI_SESSION {
|
||||||
UINT32 Signature;
|
UINT32 Signature;
|
||||||
|
|
||||||
ISCSI_SESSION_CONFIG_DATA ConfigData;
|
ISCSI_SESSION_CONFIG_DATA ConfigData;
|
||||||
@ -77,11 +77,11 @@ typedef struct _ISCSI_SESSION {
|
|||||||
BOOLEAN DataPDUInOrder;
|
BOOLEAN DataPDUInOrder;
|
||||||
BOOLEAN DataSequenceInOrder;
|
BOOLEAN DataSequenceInOrder;
|
||||||
UINT8 ErrorRecoveryLevel;
|
UINT8 ErrorRecoveryLevel;
|
||||||
} ISCSI_SESSION;
|
};
|
||||||
|
|
||||||
#define ISCSI_CONNECTION_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'C', 'N')
|
#define ISCSI_CONNECTION_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'C', 'N')
|
||||||
|
|
||||||
typedef struct _ISCSI_CONNECTION {
|
struct _ISCSI_CONNECTION {
|
||||||
UINT32 Signature;
|
UINT32 Signature;
|
||||||
NET_LIST_ENTRY Link;
|
NET_LIST_ENTRY Link;
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ typedef struct _ISCSI_CONNECTION {
|
|||||||
UINT32 MaxRecvDataSegmentLength;
|
UINT32 MaxRecvDataSegmentLength;
|
||||||
ISCSI_DIGEST_TYPE HeaderDigest;
|
ISCSI_DIGEST_TYPE HeaderDigest;
|
||||||
ISCSI_DIGEST_TYPE DataDigest;
|
ISCSI_DIGEST_TYPE DataDigest;
|
||||||
} ISCSI_CONNECTION;
|
};
|
||||||
|
|
||||||
#define ISCSI_DRIVER_DATA_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'D', 'A')
|
#define ISCSI_DRIVER_DATA_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'D', 'A')
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ typedef struct _ISCSI_CONNECTION {
|
|||||||
ISCSI_DRIVER_DATA_SIGNATURE \
|
ISCSI_DRIVER_DATA_SIGNATURE \
|
||||||
)
|
)
|
||||||
|
|
||||||
typedef struct _ISCSI_DRIVER_DATA {
|
struct _ISCSI_DRIVER_DATA {
|
||||||
UINT32 Signature;
|
UINT32 Signature;
|
||||||
EFI_HANDLE Image;
|
EFI_HANDLE Image;
|
||||||
EFI_HANDLE Controller;
|
EFI_HANDLE Controller;
|
||||||
@ -156,6 +156,6 @@ typedef struct _ISCSI_DRIVER_DATA {
|
|||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||||
|
|
||||||
ISCSI_SESSION Session;
|
ISCSI_SESSION Session;
|
||||||
} ISCSI_DRIVER_DATA;
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -167,7 +167,7 @@ Returns:
|
|||||||
Len++;
|
Len++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 32 - Len;
|
return (UINT8)(32 - Len);
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -196,6 +196,7 @@ Returns:
|
|||||||
UINT32 Index;
|
UINT32 Index;
|
||||||
CHAR8 *LunUnitStr[4];
|
CHAR8 *LunUnitStr[4];
|
||||||
CHAR8 Digit;
|
CHAR8 Digit;
|
||||||
|
UINTN Temp;
|
||||||
|
|
||||||
NetZeroMem (Lun, 8);
|
NetZeroMem (Lun, 8);
|
||||||
NetZeroMem (LunUnitStr, sizeof (LunUnitStr));
|
NetZeroMem (LunUnitStr, sizeof (LunUnitStr));
|
||||||
@ -203,7 +204,7 @@ Returns:
|
|||||||
Index = 0;
|
Index = 0;
|
||||||
LunUnitStr[0] = Str;
|
LunUnitStr[0] = Str;
|
||||||
|
|
||||||
if (!IsHexDigit (&Digit, *Str)) {
|
if (!IsHexDigit ((UINT8 *)&Digit, *Str)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,13 +220,13 @@ Returns:
|
|||||||
Index++;
|
Index++;
|
||||||
|
|
||||||
if (*(Str + 1) != '\0') {
|
if (*(Str + 1) != '\0') {
|
||||||
if (!IsHexDigit (&Digit, *(Str + 1))) {
|
if (!IsHexDigit ((UINT8 *)&Digit, *(Str + 1))) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
LunUnitStr[Index] = Str + 1;
|
LunUnitStr[Index] = Str + 1;
|
||||||
}
|
}
|
||||||
} else if (!IsHexDigit (&Digit, *Str)) {
|
} else if (!IsHexDigit ((UINT8 *)&Digit, *Str)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,7 +238,8 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
*((UINT16 *) &Lun[Index * 2]) = HTONS (AsciiStrHexToUintn (LunUnitStr[Index]));
|
Temp = AsciiStrHexToUintn (LunUnitStr[Index]);
|
||||||
|
*((UINT16 *) &Lun[Index * 2]) = HTONS (Temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
@ -470,7 +472,7 @@ Returns:
|
|||||||
UINT32 Index;
|
UINT32 Index;
|
||||||
|
|
||||||
for (Index = 0; Index < Len; Index++) {
|
for (Index = 0; Index < Len; Index++) {
|
||||||
Str[3 * Index] = NibbleToHexChar (Mac->Addr[Index] >> 4);
|
Str[3 * Index] = NibbleToHexChar ((UINT8)(Mac->Addr[Index] >> 4));
|
||||||
Str[3 * Index + 1] = NibbleToHexChar (Mac->Addr[Index]);
|
Str[3 * Index + 1] = NibbleToHexChar (Mac->Addr[Index]);
|
||||||
Str[3 * Index + 2] = L'-';
|
Str[3 * Index + 2] = L'-';
|
||||||
}
|
}
|
||||||
@ -600,7 +602,7 @@ Returns:
|
|||||||
} else {
|
} else {
|
||||||
Byte = BinBuffer[*BinLength - 1 - Index / 2];
|
Byte = BinBuffer[*BinLength - 1 - Index / 2];
|
||||||
Byte &= 0x0F;
|
Byte &= 0x0F;
|
||||||
Byte |= Digit << 4;
|
Byte = (UINT8)(Byte | (Digit << 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
BinBuffer[*BinLength - 1 - Index / 2] = Byte;
|
BinBuffer[*BinLength - 1 - Index / 2] = Byte;
|
||||||
@ -809,7 +811,7 @@ Returns:
|
|||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
Private->Controller,
|
Private->Controller,
|
||||||
&gEfiSimpleNetworkProtocolGuid,
|
&gEfiSimpleNetworkProtocolGuid,
|
||||||
&Snp
|
(void **)&Snp
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
@ -905,7 +907,7 @@ Returns:
|
|||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
Tcp4Io->Handle,
|
Tcp4Io->Handle,
|
||||||
&gEfiDevicePathProtocolGuid,
|
&gEfiDevicePathProtocolGuid,
|
||||||
&DevicePath
|
(void **)&DevicePath
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -923,7 +925,7 @@ Returns:
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
DPathNode->Ipv4.LocalPort = 0;
|
DPathNode->Ipv4.LocalPort = 0;
|
||||||
DPathNode->Ipv4.StaticIpAddress = !Session->ConfigData.NvData.InitiatorInfoFromDhcp;
|
DPathNode->Ipv4.StaticIpAddress = (BOOLEAN)(!Session->ConfigData.NvData.InitiatorInfoFromDhcp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,13 +39,13 @@ typedef struct _ISCSI_SESSION_CONFIG_NVDATA {
|
|||||||
} ISCSI_SESSION_CONFIG_NVDATA;
|
} ISCSI_SESSION_CONFIG_NVDATA;
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
typedef struct _ISCSI_SESSION_CONFIG_DATA {
|
struct _ISCSI_SESSION_CONFIG_DATA {
|
||||||
ISCSI_SESSION_CONFIG_NVDATA NvData;
|
ISCSI_SESSION_CONFIG_NVDATA NvData;
|
||||||
|
|
||||||
EFI_IPv4_ADDRESS PrimaryDns;
|
EFI_IPv4_ADDRESS PrimaryDns;
|
||||||
EFI_IPv4_ADDRESS SecondaryDns;
|
EFI_IPv4_ADDRESS SecondaryDns;
|
||||||
EFI_IPv4_ADDRESS DhcpServer;
|
EFI_IPv4_ADDRESS DhcpServer;
|
||||||
} ISCSI_SESSION_CONFIG_DATA;
|
};
|
||||||
|
|
||||||
UINT8
|
UINT8
|
||||||
IScsiGetSubnetMaskPrefixLength (
|
IScsiGetSubnetMaskPrefixLength (
|
||||||
|
@ -546,7 +546,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Allocate the space for the key-value pair.
|
// Allocate the space for the key-value pair.
|
||||||
//
|
//
|
||||||
Data = NetbufAllocSpace (Pdu, TotalLen, NET_BUF_TAIL);
|
Data = (CHAR8 *) NetbufAllocSpace (Pdu, TotalLen, NET_BUF_TAIL);
|
||||||
if (Data == NULL) {
|
if (Data == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
@ -668,7 +668,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Check whether we will issue the stage transition signal?
|
// Check whether we will issue the stage transition signal?
|
||||||
//
|
//
|
||||||
Conn->TransitInitiated = ISCSI_FLAG_ON (LoginReq, ISCSI_LOGIN_REQ_PDU_FLAG_TRANSIT);
|
Conn->TransitInitiated = (BOOLEAN)ISCSI_FLAG_ON (LoginReq, ISCSI_LOGIN_REQ_PDU_FLAG_TRANSIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Nbuf;
|
return Nbuf;
|
||||||
@ -746,7 +746,7 @@ Returns:
|
|||||||
// Process the TargetAddress key-value strings in the data segment to update the
|
// Process the TargetAddress key-value strings in the data segment to update the
|
||||||
// target address info.
|
// target address info.
|
||||||
//
|
//
|
||||||
Status = IScsiUpdateTargetAddress (Session, DataSeg, DataSegLen);
|
Status = IScsiUpdateTargetAddress (Session, (CHAR8 *)DataSeg, DataSegLen);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
@ -765,11 +765,11 @@ Returns:
|
|||||||
//
|
//
|
||||||
// The status is sucess, extract the wanted fields from the header segment.
|
// The status is sucess, extract the wanted fields from the header segment.
|
||||||
//
|
//
|
||||||
Transit = ISCSI_FLAG_ON (LoginRsp, ISCSI_LOGIN_RSP_PDU_FLAG_TRANSIT);
|
Transit = (BOOLEAN)ISCSI_FLAG_ON (LoginRsp, ISCSI_LOGIN_RSP_PDU_FLAG_TRANSIT);
|
||||||
Continue = ISCSI_FLAG_ON (LoginRsp, ISCSI_LOGIN_RSP_PDU_FLAG_CONTINUE);
|
Continue = (BOOLEAN)ISCSI_FLAG_ON (LoginRsp, ISCSI_LOGIN_RSP_PDU_FLAG_CONTINUE);
|
||||||
|
|
||||||
CurrentStage = ISCSI_GET_CURRENT_STAGE (LoginRsp);
|
CurrentStage = (UINT8)ISCSI_GET_CURRENT_STAGE (LoginRsp);
|
||||||
NextStage = ISCSI_GET_NEXT_STAGE (LoginRsp);
|
NextStage = (UINT8)ISCSI_GET_NEXT_STAGE (LoginRsp);
|
||||||
|
|
||||||
LoginRsp->InitiatorTaskTag = NTOHL (LoginRsp->InitiatorTaskTag);
|
LoginRsp->InitiatorTaskTag = NTOHL (LoginRsp->InitiatorTaskTag);
|
||||||
|
|
||||||
@ -1283,7 +1283,7 @@ Returns:
|
|||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
NetbufQueCopy (&Conn->RspQue, 0, Len, Data);
|
NetbufQueCopy (&Conn->RspQue, 0, Len, (UINT8 *)Data);
|
||||||
|
|
||||||
Status = EFI_PROTOCOL_ERROR;
|
Status = EFI_PROTOCOL_ERROR;
|
||||||
|
|
||||||
@ -1352,7 +1352,7 @@ Returns:
|
|||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
Session->InitialR2T = Session->InitialR2T || (BOOLEAN) (AsciiStrCmp (Value, "Yes") == 0);
|
Session->InitialR2T = (BOOLEAN)(Session->InitialR2T || (AsciiStrCmp (Value, "Yes") == 0));
|
||||||
|
|
||||||
//
|
//
|
||||||
// ImmediateData, result function is AND.
|
// ImmediateData, result function is AND.
|
||||||
@ -1362,7 +1362,7 @@ Returns:
|
|||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
Session->ImmediateData = Session->ImmediateData && (BOOLEAN) (AsciiStrCmp (Value, "Yes") == 0);
|
Session->ImmediateData = (BOOLEAN)(Session->ImmediateData && (AsciiStrCmp (Value, "Yes") == 0));
|
||||||
|
|
||||||
//
|
//
|
||||||
// MaxRecvDataSegmentLength, result function is Mininum.
|
// MaxRecvDataSegmentLength, result function is Mininum.
|
||||||
@ -1422,7 +1422,7 @@ Returns:
|
|||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
Session->DataPDUInOrder = Session->DataPDUInOrder || (BOOLEAN) (AsciiStrCmp (Value, "Yes") == 0);
|
Session->DataPDUInOrder = (BOOLEAN)(Session->DataPDUInOrder || (AsciiStrCmp (Value, "Yes") == 0));
|
||||||
|
|
||||||
//
|
//
|
||||||
// DataSequenceInorder, result function is OR.
|
// DataSequenceInorder, result function is OR.
|
||||||
@ -1432,7 +1432,7 @@ Returns:
|
|||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
Session->DataSequenceInOrder = Session->DataSequenceInOrder || (BOOLEAN) (AsciiStrCmp (Value, "Yes") == 0);
|
Session->DataSequenceInOrder = (BOOLEAN)(Session->DataSequenceInOrder || (AsciiStrCmp (Value, "Yes") == 0));
|
||||||
|
|
||||||
//
|
//
|
||||||
// DefaultTime2Wait, result function is Maximum.
|
// DefaultTime2Wait, result function is Maximum.
|
||||||
@ -1799,7 +1799,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Convert the upper-case characters to lower-case ones
|
// Convert the upper-case characters to lower-case ones
|
||||||
//
|
//
|
||||||
Name[Index] = Name[Index] - 'A' + 'a';
|
Name[Index] = (CHAR8)(Name[Index] - 'A' + 'a');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NET_IS_LOWER_CASE_CHAR (Name[Index]) &&
|
if (!NET_IS_LOWER_CASE_CHAR (Name[Index]) &&
|
||||||
@ -2048,7 +2048,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// The CDB exceeds 16 bytes, an extended CDB AHS is required.
|
// The CDB exceeds 16 bytes, an extended CDB AHS is required.
|
||||||
//
|
//
|
||||||
AHSLength += ISCSI_ROUNDUP (Packet->CdbLength - 16) + sizeof (ISCSI_ADDITIONAL_HEADER);
|
AHSLength = (UINT8)(AHSLength + (ISCSI_ROUNDUP (Packet->CdbLength - 16) + sizeof (ISCSI_ADDITIONAL_HEADER)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Length = sizeof (SCSI_COMMAND) + AHSLength;
|
Length = sizeof (SCSI_COMMAND) + AHSLength;
|
||||||
@ -2769,6 +2769,7 @@ Returns:
|
|||||||
UINT8 *Data;
|
UINT8 *Data;
|
||||||
ISCSI_IN_BUFFER_CONTEXT InBufferContext;
|
ISCSI_IN_BUFFER_CONTEXT InBufferContext;
|
||||||
UINT64 Timeout;
|
UINT64 Timeout;
|
||||||
|
UINT8 *Buffer;
|
||||||
|
|
||||||
Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (PassThru);
|
Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (PassThru);
|
||||||
Session = &Private->Session;
|
Session = &Private->Session;
|
||||||
@ -2814,7 +2815,8 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
XferContext = &Tcb->XferContext;
|
XferContext = &Tcb->XferContext;
|
||||||
XferContext->Offset = ISCSI_GET_DATASEG_LEN (NetbufGetByte (Pdu, 0, NULL));
|
Buffer = NetbufGetByte (Pdu, 0, NULL);
|
||||||
|
XferContext->Offset = ISCSI_GET_DATASEG_LEN (Buffer);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Transmit the SCSI Command PDU.
|
// Transmit the SCSI Command PDU.
|
||||||
|
@ -119,8 +119,8 @@ typedef enum {
|
|||||||
#define ISCSI_IMMEDIATE_ON(PduHdr) ((PduHdr)->OpCode & ISCSI_REQ_IMMEDIATE)
|
#define ISCSI_IMMEDIATE_ON(PduHdr) ((PduHdr)->OpCode & ISCSI_REQ_IMMEDIATE)
|
||||||
#define ISCSI_SET_FLAG(PduHdr, Flag) (((ISCSI_BASIC_HEADER *) (PduHdr))->Flags |= (Flag))
|
#define ISCSI_SET_FLAG(PduHdr, Flag) (((ISCSI_BASIC_HEADER *) (PduHdr))->Flags |= (Flag))
|
||||||
#define ISCSI_CLEAR_FLAG(PduHdr, Flag) (((ISCSI_BASIC_HEADER *) (PduHdr))->Flags &= ~(Flag))
|
#define ISCSI_CLEAR_FLAG(PduHdr, Flag) (((ISCSI_BASIC_HEADER *) (PduHdr))->Flags &= ~(Flag))
|
||||||
#define ISCSI_FLAG_ON(PduHdr, Flag) ((((ISCSI_BASIC_HEADER *) (PduHdr))->Flags & (Flag)) == (Flag))
|
#define ISCSI_FLAG_ON(PduHdr, Flag) ((((ISCSI_BASIC_HEADER *) (PduHdr))->Flags & (Flag)) == (BOOLEAN)(Flag))
|
||||||
#define ISCSI_SET_STAGES(PduHdr, Cur, Nxt) ((PduHdr)->Flags |= ((Cur) << 2 | (Nxt)))
|
#define ISCSI_SET_STAGES(PduHdr, Cur, Nxt) ((PduHdr)->Flags = (UINT8)(((PduHdr)->Flags)|(((Cur) << 2) | (Nxt))))
|
||||||
#define ISCSI_GET_CURRENT_STAGE(PduHdr) (((PduHdr)->Flags >> 2) & 0x3)
|
#define ISCSI_GET_CURRENT_STAGE(PduHdr) (((PduHdr)->Flags >> 2) & 0x3)
|
||||||
#define ISCSI_GET_NEXT_STAGE(PduHdr) (((PduHdr)->Flags) & 0x3)
|
#define ISCSI_GET_NEXT_STAGE(PduHdr) (((PduHdr)->Flags) & 0x3)
|
||||||
|
|
||||||
@ -129,9 +129,9 @@ typedef enum {
|
|||||||
|
|
||||||
#define HTON24(Dst, Src) \
|
#define HTON24(Dst, Src) \
|
||||||
do { \
|
do { \
|
||||||
(Dst)[0] = (UINT8) ((Src) >> 16) & 0xFF; \
|
(Dst)[0] = (UINT8)(((Src) >> 16) & 0xFF); \
|
||||||
(Dst)[1] = (UINT8) ((Src) >> 8) & 0xFF; \
|
(Dst)[1] = (UINT8)(((Src) >> 8) & 0xFF); \
|
||||||
(Dst)[2] = (UINT8) (Src) & 0xFF; \
|
(Dst)[2] = (UINT8)((Src) & 0xFF); \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
#define NTOH24(src) (((src)[0] << 16) | ((src)[1] << 8) | ((src)[2]))
|
#define NTOH24(src) (((src)[0] << 16) | ((src)[1] << 8) | ((src)[2]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user