mirror of https://github.com/acidanthera/audk.git
1) fix one goto issue in IScsiProto.c
2) add Md5.h in [Sources.common] of inf 3) change mIScsiPrivateGuid to gIScsiPrivateGuid git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7042 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
727501bb17
commit
5af5b3fd84
|
@ -23,7 +23,7 @@ EFI_DRIVER_BINDING_PROTOCOL gIScsiDriverBinding = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
EFI_GUID mIScsiPrivateGuid = ISCSI_PRIVATE_GUID;
|
EFI_GUID gIScsiPrivateGuid = ISCSI_PRIVATE_GUID;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -63,7 +63,7 @@ IScsiDriverBindingSupported (
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
&mIScsiPrivateGuid,
|
&gIScsiPrivateGuid,
|
||||||
NULL,
|
NULL,
|
||||||
This->DriverBindingHandle,
|
This->DriverBindingHandle,
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
|
@ -195,7 +195,7 @@ IScsiDriverBindingStart (
|
||||||
//
|
//
|
||||||
Status = gBS->InstallProtocolInterface (
|
Status = gBS->InstallProtocolInterface (
|
||||||
&ControllerHandle,
|
&ControllerHandle,
|
||||||
&mIScsiPrivateGuid,
|
&gIScsiPrivateGuid,
|
||||||
EFI_NATIVE_INTERFACE,
|
EFI_NATIVE_INTERFACE,
|
||||||
&Private->IScsiIdentifier
|
&Private->IScsiIdentifier
|
||||||
);
|
);
|
||||||
|
@ -299,7 +299,7 @@ IScsiDriverBindingStop (
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
IScsiController,
|
IScsiController,
|
||||||
&mIScsiPrivateGuid,
|
&gIScsiPrivateGuid,
|
||||||
(VOID **)&IScsiIdentifier,
|
(VOID **)&IScsiIdentifier,
|
||||||
This->DriverBindingHandle,
|
This->DriverBindingHandle,
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
|
@ -316,7 +316,7 @@ IScsiDriverBindingStop (
|
||||||
//
|
//
|
||||||
gBS->UninstallProtocolInterface (
|
gBS->UninstallProtocolInterface (
|
||||||
IScsiController,
|
IScsiController,
|
||||||
&mIScsiPrivateGuid,
|
&gIScsiPrivateGuid,
|
||||||
&Private->IScsiIdentifier
|
&Private->IScsiIdentifier
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,7 @@ extern EFI_COMPONENT_NAME_PROTOCOL gIScsiComponentName;
|
||||||
|
|
||||||
extern EFI_ISCSI_INITIATOR_NAME_PROTOCOL gIScsiInitiatorName;
|
extern EFI_ISCSI_INITIATOR_NAME_PROTOCOL gIScsiInitiatorName;
|
||||||
|
|
||||||
|
extern EFI_GUID gIScsiPrivateGuid;
|
||||||
extern EFI_GUID mIScsiPrivateGuid;
|
|
||||||
|
|
||||||
typedef struct _ISCSI_PRIVATE_PROTOCOL {
|
typedef struct _ISCSI_PRIVATE_PROTOCOL {
|
||||||
UINT32 Reserved;
|
UINT32 Reserved;
|
||||||
|
|
|
@ -41,6 +41,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
IScsiDhcp.h
|
IScsiDhcp.h
|
||||||
IScsiCommon.h
|
IScsiCommon.h
|
||||||
IScsiCHAP.h
|
IScsiCHAP.h
|
||||||
|
Md5.h
|
||||||
IScsiTcp4Io.c
|
IScsiTcp4Io.c
|
||||||
IScsiProto.c
|
IScsiProto.c
|
||||||
IScsiMisc.c
|
IScsiMisc.c
|
||||||
|
|
|
@ -140,7 +140,7 @@ IScsiFillInitiatorSection (
|
||||||
//
|
//
|
||||||
// Get the identifier from the handle.
|
// Get the identifier from the handle.
|
||||||
//
|
//
|
||||||
Status = gBS->HandleProtocol (Handle, &mIScsiPrivateGuid, (VOID **) &IScsiIdentifier);
|
Status = gBS->HandleProtocol (Handle, &gIScsiPrivateGuid, (VOID **) &IScsiIdentifier);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
return ;
|
return ;
|
||||||
|
@ -302,7 +302,7 @@ IScsiFillNICAndTargetSections (
|
||||||
SectionOffset = &Control->NIC0Offset;
|
SectionOffset = &Control->NIC0Offset;
|
||||||
|
|
||||||
for (Index = 0; Index < HandleCount; Index++) {
|
for (Index = 0; Index < HandleCount; Index++) {
|
||||||
Status = gBS->HandleProtocol (Handles[Index], &mIScsiPrivateGuid, (VOID **)&IScsiIdentifier);
|
Status = gBS->HandleProtocol (Handles[Index], &gIScsiPrivateGuid, (VOID **)&IScsiIdentifier);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
return ;
|
return ;
|
||||||
|
@ -495,7 +495,7 @@ IScsiPublishIbft (
|
||||||
//
|
//
|
||||||
Status = gBS->LocateHandleBuffer (
|
Status = gBS->LocateHandleBuffer (
|
||||||
ByProtocol,
|
ByProtocol,
|
||||||
&mIScsiPrivateGuid,
|
&gIScsiPrivateGuid,
|
||||||
NULL,
|
NULL,
|
||||||
&HandleCount,
|
&HandleCount,
|
||||||
&HandleBuffer
|
&HandleBuffer
|
||||||
|
|
|
@ -971,9 +971,14 @@ IScsiReceivePdu (
|
||||||
Len = ISCSI_GET_DATASEG_LEN (Header);
|
Len = ISCSI_GET_DATASEG_LEN (Header);
|
||||||
if (Len == 0) {
|
if (Len == 0) {
|
||||||
//
|
//
|
||||||
// No data segment.
|
// No data segment.Form the pdu from a list of pdu segments.
|
||||||
//
|
//
|
||||||
goto FORM_PDU;
|
*Pdu = NetbufFromBufList (NbufList, 0, 0, IScsiFreeNbufList, NbufList);
|
||||||
|
if (*Pdu == NULL) {
|
||||||
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
|
goto ON_EXIT;
|
||||||
|
}
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Get the length of the padding bytes of the data segment.
|
// Get the length of the padding bytes of the data segment.
|
||||||
|
@ -1067,7 +1072,6 @@ IScsiReceivePdu (
|
||||||
NetbufTrim (DataSeg, PadLen, NET_BUF_TAIL);
|
NetbufTrim (DataSeg, PadLen, NET_BUF_TAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
FORM_PDU:
|
|
||||||
//
|
//
|
||||||
// Form the pdu from a list of pdu segments.
|
// Form the pdu from a list of pdu segments.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue