mirror of https://github.com/acidanthera/audk.git
fixed icc build bug
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4609 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
e19c2c4a5f
commit
69b0882d3e
|
@ -119,7 +119,6 @@ Returns:
|
|||
{
|
||||
EFI_STATUS Status;
|
||||
ISCSI_SESSION *Session;
|
||||
ISCSI_SESSION_CONFIG_DATA *ConfigData;
|
||||
ISCSI_CHAP_AUTH_DATA *AuthData;
|
||||
CHAR8 *Value;
|
||||
UINT8 *Data;
|
||||
|
@ -137,7 +136,6 @@ Returns:
|
|||
ASSERT (Conn->RspQue.BufNum != 0);
|
||||
|
||||
Session = Conn->Session;
|
||||
ConfigData = &Session->ConfigData;
|
||||
AuthData = &Session->AuthData;
|
||||
|
||||
Len = Conn->RspQue.BufSize;
|
||||
|
@ -153,7 +151,7 @@ Returns:
|
|||
//
|
||||
// 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) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto ON_EXIT;
|
||||
|
@ -319,7 +317,6 @@ Returns:
|
|||
EFI_STATUS Status;
|
||||
ISCSI_SESSION *Session;
|
||||
ISCSI_LOGIN_REQUEST *LoginReq;
|
||||
ISCSI_SESSION_CONFIG_DATA *ConfigData;
|
||||
ISCSI_CHAP_AUTH_DATA *AuthData;
|
||||
CHAR8 *Value;
|
||||
CHAR8 ValueStr[256];
|
||||
|
@ -331,7 +328,6 @@ Returns:
|
|||
ASSERT (Conn->CurrentStage == ISCSI_SECURITY_NEGOTIATION);
|
||||
|
||||
Session = Conn->Session;
|
||||
ConfigData = &Session->ConfigData;
|
||||
AuthData = &Session->AuthData;
|
||||
LoginReq = (ISCSI_LOGIN_REQUEST *) NetbufGetByte (Pdu, 0, 0);
|
||||
Status = EFI_SUCCESS;
|
||||
|
@ -387,7 +383,7 @@ Returns:
|
|||
//
|
||||
// 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>
|
||||
//
|
||||
|
|
|
@ -866,7 +866,7 @@ Returns:
|
|||
ConfigFormEntry->PortTitleToken,
|
||||
ConfigFormEntry->PortTitleHelpToken,
|
||||
EFI_IFR_FLAG_CALLBACK,
|
||||
KEY_DEVICE_ENTRY_BASE + FormIndex,
|
||||
(UINT16)(KEY_DEVICE_ENTRY_BASE + FormIndex),
|
||||
&UpdateData
|
||||
);
|
||||
|
||||
|
@ -913,7 +913,7 @@ Returns:
|
|||
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
|
||||
ISCSI_FORM_CALLBACK_INFO *CallbackInfo;
|
||||
|
||||
Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, &HiiDatabase);
|
||||
Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **)&HiiDatabase);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
@ -931,7 +931,7 @@ Returns:
|
|||
CallbackInfo->ConfigAccess.RouteConfig = IScsiFormRouteConfig;
|
||||
CallbackInfo->ConfigAccess.Callback = IScsiFormCallback;
|
||||
|
||||
Status = gBS->LocateProtocol (&gEfiHiiConfigRoutingProtocolGuid, NULL, &CallbackInfo->ConfigRouting);
|
||||
Status = gBS->LocateProtocol (&gEfiHiiConfigRoutingProtocolGuid, NULL, (VOID **)&CallbackInfo->ConfigRouting);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -21,18 +21,10 @@ Abstract:
|
|||
#ifndef _ISCSI_CONFIG_H_
|
||||
#define _ISCSI_CONFIG_H_
|
||||
|
||||
//#include "Tiano.h"
|
||||
//#include "EfiDriverLib.h"
|
||||
//#include "Base.h"
|
||||
#include <Library/HiiLib.h>
|
||||
#include <Library/IfrSupportLib.h>
|
||||
#include <Library/DebugLib.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 "IScsiConfigNVDataStruc.h"
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ Returns:
|
|||
|
||||
Status = This->Parse (This, Packet, &OptionCount, NULL);
|
||||
if (Status != EFI_BUFFER_TOO_SMALL) {
|
||||
return EFI_NOT_READY;
|
||||
return EFI_NOT_READY;
|
||||
}
|
||||
|
||||
OptionList = NetAllocatePool (OptionCount * sizeof (EFI_DHCP4_PACKET_OPTION *));
|
||||
|
@ -437,7 +437,7 @@ Returns:
|
|||
// Ask the server to reply with Netmask, Router, DNS and RootPath options.
|
||||
//
|
||||
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[1] = DHCP4_TAG_ROUTER;
|
||||
ParaList->Data[2] = DHCP4_TAG_DNS;
|
||||
|
|
|
@ -20,9 +20,7 @@ Abstract:
|
|||
#ifndef _ISCSI_DHCP_H_
|
||||
#define _ISCSI_DHCP_H_
|
||||
|
||||
//#include "Tiano.h"
|
||||
//#include EFI_PROTOCOL_CONSUMER (Dhcp4)
|
||||
#include "protocol\Dhcp4.h"
|
||||
#include <protocol/Dhcp4.h>
|
||||
|
||||
#define DHCP4_TAG_PARA_LIST 55
|
||||
#define DHCP4_TAG_NETMASK 1
|
||||
|
|
|
@ -101,7 +101,7 @@ Returns:
|
|||
// Need expand the control section if more than 2 NIC/Target sections
|
||||
// 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.
|
||||
//
|
||||
Status = gBS->HandleProtocol (Handle, &mIScsiPrivateGuid, &IScsiIdentifier);
|
||||
Status = gBS->HandleProtocol (Handle, &mIScsiPrivateGuid, (VOID **) &IScsiIdentifier);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ASSERT (FALSE);
|
||||
return ;
|
||||
|
@ -278,7 +278,7 @@ Returns:
|
|||
Status = gBS->HandleProtocol (
|
||||
Controller,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
&DevicePath
|
||||
(VOID **)&DevicePath
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return 0;
|
||||
|
@ -293,7 +293,7 @@ Returns:
|
|||
return 0;
|
||||
}
|
||||
|
||||
Status = gBS->HandleProtocol (PciIoHandle, &gEfiPciIoProtocolGuid, &PciIo);
|
||||
Status = gBS->HandleProtocol (PciIoHandle, &gEfiPciIoProtocolGuid, (VOID **)&PciIo);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ Returns:
|
|||
Status = gBS->HandleProtocol (
|
||||
Controller,
|
||||
&gEfiSimpleNetworkProtocolGuid,
|
||||
&Snp
|
||||
(VOID **) &Snp
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
|
@ -392,7 +392,7 @@ Returns:
|
|||
SectionOffset = &Control->NIC0Offset;
|
||||
|
||||
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)) {
|
||||
ASSERT (FALSE);
|
||||
return ;
|
||||
|
@ -552,7 +552,7 @@ Returns:
|
|||
EFI_ACPI_TABLE_VERSION Version;
|
||||
UINT32 Signature;
|
||||
|
||||
Status = gBS->LocateProtocol (&gEfiAcpiSupportProtocolGuid, NULL, &AcpiSupport);
|
||||
Status = gBS->LocateProtocol (&gEfiAcpiSupportProtocolGuid, NULL, (VOID **)&AcpiSupport);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return ;
|
||||
}
|
||||
|
@ -563,7 +563,7 @@ Returns:
|
|||
Status = AcpiSupport->GetAcpiTable (
|
||||
AcpiSupport,
|
||||
Index,
|
||||
&Table,
|
||||
(VOID **)&Table,
|
||||
&Version,
|
||||
&TableHandle
|
||||
);
|
||||
|
@ -613,7 +613,7 @@ Returns:
|
|||
return ;
|
||||
}
|
||||
|
||||
Heap = (CHAR8 *) Table + IBFT_HEAP_OFFSET;
|
||||
Heap = (UINT8 *) Table + IBFT_HEAP_OFFSET;
|
||||
|
||||
//
|
||||
// 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')
|
||||
|
||||
typedef struct _ISCSI_SESSION {
|
||||
struct _ISCSI_SESSION {
|
||||
UINT32 Signature;
|
||||
|
||||
ISCSI_SESSION_CONFIG_DATA ConfigData;
|
||||
|
@ -77,11 +77,11 @@ typedef struct _ISCSI_SESSION {
|
|||
BOOLEAN DataPDUInOrder;
|
||||
BOOLEAN DataSequenceInOrder;
|
||||
UINT8 ErrorRecoveryLevel;
|
||||
} ISCSI_SESSION;
|
||||
};
|
||||
|
||||
#define ISCSI_CONNECTION_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'C', 'N')
|
||||
|
||||
typedef struct _ISCSI_CONNECTION {
|
||||
struct _ISCSI_CONNECTION {
|
||||
UINT32 Signature;
|
||||
NET_LIST_ENTRY Link;
|
||||
|
||||
|
@ -116,7 +116,7 @@ typedef struct _ISCSI_CONNECTION {
|
|||
UINT32 MaxRecvDataSegmentLength;
|
||||
ISCSI_DIGEST_TYPE HeaderDigest;
|
||||
ISCSI_DIGEST_TYPE DataDigest;
|
||||
} ISCSI_CONNECTION;
|
||||
};
|
||||
|
||||
#define ISCSI_DRIVER_DATA_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'D', 'A')
|
||||
|
||||
|
@ -142,7 +142,7 @@ typedef struct _ISCSI_CONNECTION {
|
|||
ISCSI_DRIVER_DATA_SIGNATURE \
|
||||
)
|
||||
|
||||
typedef struct _ISCSI_DRIVER_DATA {
|
||||
struct _ISCSI_DRIVER_DATA {
|
||||
UINT32 Signature;
|
||||
EFI_HANDLE Image;
|
||||
EFI_HANDLE Controller;
|
||||
|
@ -156,6 +156,6 @@ typedef struct _ISCSI_DRIVER_DATA {
|
|||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
|
||||
ISCSI_SESSION Session;
|
||||
} ISCSI_DRIVER_DATA;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -167,7 +167,7 @@ Returns:
|
|||
Len++;
|
||||
}
|
||||
|
||||
return 32 - Len;
|
||||
return (UINT8) (32 - Len);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
|
@ -196,6 +196,7 @@ Returns:
|
|||
UINT32 Index;
|
||||
CHAR8 *LunUnitStr[4];
|
||||
CHAR8 Digit;
|
||||
UINTN Temp;
|
||||
|
||||
NetZeroMem (Lun, 8);
|
||||
NetZeroMem (LunUnitStr, sizeof (LunUnitStr));
|
||||
|
@ -203,7 +204,7 @@ Returns:
|
|||
Index = 0;
|
||||
LunUnitStr[0] = Str;
|
||||
|
||||
if (!IsHexDigit (&Digit, *Str)) {
|
||||
if (!IsHexDigit ((UINT8 *) &Digit, *Str)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
@ -219,13 +220,13 @@ Returns:
|
|||
Index++;
|
||||
|
||||
if (*(Str + 1) != '\0') {
|
||||
if (!IsHexDigit (&Digit, *(Str + 1))) {
|
||||
if (!IsHexDigit ((UINT8 *) &Digit, *(Str + 1))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
LunUnitStr[Index] = Str + 1;
|
||||
}
|
||||
} else if (!IsHexDigit (&Digit, *Str)) {
|
||||
} else if (!IsHexDigit ((UINT8 *) &Digit, *Str)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
@ -237,7 +238,8 @@ Returns:
|
|||
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;
|
||||
|
@ -470,7 +472,7 @@ Returns:
|
|||
UINT32 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 + 2] = L'-';
|
||||
}
|
||||
|
@ -600,7 +602,7 @@ Returns:
|
|||
} else {
|
||||
Byte = BinBuffer[*BinLength - 1 - Index / 2];
|
||||
Byte &= 0x0F;
|
||||
Byte |= Digit << 4;
|
||||
Byte = (UINT8) (Byte | (Digit << 4));
|
||||
}
|
||||
|
||||
BinBuffer[*BinLength - 1 - Index / 2] = Byte;
|
||||
|
@ -809,7 +811,7 @@ Returns:
|
|||
Status = gBS->HandleProtocol (
|
||||
Private->Controller,
|
||||
&gEfiSimpleNetworkProtocolGuid,
|
||||
&Snp
|
||||
(VOID **)&Snp
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
|
@ -905,7 +907,7 @@ Returns:
|
|||
Status = gBS->HandleProtocol (
|
||||
Tcp4Io->Handle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
&DevicePath
|
||||
(VOID **)&DevicePath
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return NULL;
|
||||
|
@ -923,7 +925,7 @@ Returns:
|
|||
) {
|
||||
|
||||
DPathNode->Ipv4.LocalPort = 0;
|
||||
DPathNode->Ipv4.StaticIpAddress = !Session->ConfigData.NvData.InitiatorInfoFromDhcp;
|
||||
DPathNode->Ipv4.StaticIpAddress = (BOOLEAN) (!Session->ConfigData.NvData.InitiatorInfoFromDhcp);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -546,7 +546,7 @@ Returns:
|
|||
//
|
||||
// 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) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
@ -668,7 +668,7 @@ Returns:
|
|||
//
|
||||
// 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;
|
||||
|
@ -746,7 +746,7 @@ Returns:
|
|||
// Process the TargetAddress key-value strings in the data segment to update the
|
||||
// target address info.
|
||||
//
|
||||
Status = IScsiUpdateTargetAddress (Session, DataSeg, DataSegLen);
|
||||
Status = IScsiUpdateTargetAddress (Session, (CHAR8 *)DataSeg, DataSegLen);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
@ -765,11 +765,11 @@ Returns:
|
|||
//
|
||||
// The status is sucess, extract the wanted fields from the header segment.
|
||||
//
|
||||
Transit = ISCSI_FLAG_ON (LoginRsp, ISCSI_LOGIN_RSP_PDU_FLAG_TRANSIT);
|
||||
Continue = ISCSI_FLAG_ON (LoginRsp, ISCSI_LOGIN_RSP_PDU_FLAG_CONTINUE);
|
||||
Transit = (BOOLEAN) ISCSI_FLAG_ON (LoginRsp, ISCSI_LOGIN_RSP_PDU_FLAG_TRANSIT);
|
||||
Continue = (BOOLEAN) ISCSI_FLAG_ON (LoginRsp, ISCSI_LOGIN_RSP_PDU_FLAG_CONTINUE);
|
||||
|
||||
CurrentStage = ISCSI_GET_CURRENT_STAGE (LoginRsp);
|
||||
NextStage = ISCSI_GET_NEXT_STAGE (LoginRsp);
|
||||
CurrentStage = (UINT8) ISCSI_GET_CURRENT_STAGE (LoginRsp);
|
||||
NextStage = (UINT8) ISCSI_GET_NEXT_STAGE (LoginRsp);
|
||||
|
||||
LoginRsp->InitiatorTaskTag = NTOHL (LoginRsp->InitiatorTaskTag);
|
||||
|
||||
|
@ -1283,7 +1283,7 @@ Returns:
|
|||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
NetbufQueCopy (&Conn->RspQue, 0, Len, Data);
|
||||
NetbufQueCopy (&Conn->RspQue, 0, Len, (UINT8 *) Data);
|
||||
|
||||
Status = EFI_PROTOCOL_ERROR;
|
||||
|
||||
|
@ -1352,7 +1352,7 @@ Returns:
|
|||
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.
|
||||
|
@ -1362,7 +1362,7 @@ Returns:
|
|||
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.
|
||||
|
@ -1422,7 +1422,7 @@ Returns:
|
|||
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.
|
||||
|
@ -1432,7 +1432,7 @@ Returns:
|
|||
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.
|
||||
|
@ -1799,7 +1799,7 @@ Returns:
|
|||
//
|
||||
// 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]) &&
|
||||
|
@ -2048,7 +2048,7 @@ Returns:
|
|||
//
|
||||
// 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;
|
||||
|
@ -2769,6 +2769,7 @@ Returns:
|
|||
UINT8 *Data;
|
||||
ISCSI_IN_BUFFER_CONTEXT InBufferContext;
|
||||
UINT64 Timeout;
|
||||
UINT8 *Buffer;
|
||||
|
||||
Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (PassThru);
|
||||
Session = &Private->Session;
|
||||
|
@ -2814,7 +2815,8 @@ Returns:
|
|||
}
|
||||
|
||||
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.
|
||||
|
|
|
@ -117,10 +117,10 @@ typedef enum {
|
|||
#define ISCSI_GET_OPCODE(PduHdr) ((((ISCSI_BASIC_HEADER *) (PduHdr))->OpCode) & ISCSI_OPCODE_MASK)
|
||||
#define ISCSI_CHECK_OPCODE(PduHdr, Op) ((((PduHdr)->OpCode) & ISCSI_OPCODE_MASK) == (Op))
|
||||
#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 |= (BOOLEAN)(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_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_NEXT_STAGE(PduHdr) (((PduHdr)->Flags) & 0x3)
|
||||
|
||||
|
@ -129,9 +129,9 @@ typedef enum {
|
|||
|
||||
#define HTON24(Dst, Src) \
|
||||
do { \
|
||||
(Dst)[0] = (UINT8) ((Src) >> 16) & 0xFF; \
|
||||
(Dst)[1] = (UINT8) ((Src) >> 8) & 0xFF; \
|
||||
(Dst)[2] = (UINT8) (Src) & 0xFF; \
|
||||
(Dst)[0] = (UINT8) (((Src) >> 16) & 0xFF); \
|
||||
(Dst)[1] = (UINT8) (((Src) >> 8) & 0xFF); \
|
||||
(Dst)[2] = (UINT8) ((Src) & 0xFF); \
|
||||
} while (0);
|
||||
|
||||
#define NTOH24(src) (((src)[0] << 16) | ((src)[1] << 8) | ((src)[2]))
|
||||
|
|
Loading…
Reference in New Issue