Sync code with MdePkg spec for Scsi library class and CustomDecompress library class.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3636 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2007-08-14 07:58:32 +00:00
parent ed72357a70
commit d35be2a434
8 changed files with 32 additions and 51 deletions

View File

@ -851,8 +851,7 @@ Returns:
@param[in, out] AlgorithmGuidTable The decompress method guid list.
@param[in, out] NumberOfAlgorithms The number of decompress methods.
@retval RETURN_SUCCESS Get all algorithmes list successfully.
@retval RETURN_INVALID_PARAMETER Input paramter error.
@retval RETURN_SUCCESS Get all algorithmes list successfully.
@retval RETURN_OUT_OF_RESOURCES Source is not enough.
**/
@ -863,18 +862,14 @@ CustomDecompressGetAlgorithms (
IN OUT UINT32 *NumberOfAlgorithms
)
{
if (NumberOfAlgorithms == NULL) {
return RETURN_INVALID_PARAMETER;
}
ASSERT (NumberOfAlgorithms != NULL);
if (*NumberOfAlgorithms < 1) {
*NumberOfAlgorithms = 1;
return RETURN_OUT_OF_RESOURCES;
}
if (AlgorithmGuidTable == NULL) {
return RETURN_INVALID_PARAMETER;
}
ASSERT (AlgorithmGuidTable != NULL);
AlgorithmGuidTable [0] = &gTianoCustomDecompressGuid;
*NumberOfAlgorithms = 1;

View File

@ -1075,7 +1075,7 @@ Returns:
InquiryDataLength = sizeof (EFI_SCSI_INQUIRY_DATA);
SenseDataLength = sizeof (EFI_SCSI_SENSE_DATA);
Status = SubmitInquiryCommand (
Status = ScsiInquiryCommand (
&ScsiIoDevice->ScsiIo,
EfiScsiStallSeconds (1),
(VOID *) &SenseData,

View File

@ -920,7 +920,7 @@ Returns:
InquiryDataLength = sizeof (EFI_SCSI_INQUIRY_DATA);
SenseDataLength = 0;
Status = SubmitInquiryCommand (
Status = ScsiInquiryCommand (
ScsiDiskDevice->ScsiIo,
EfiScsiStallSeconds (1),
NULL,
@ -981,9 +981,9 @@ Returns:
}
//
// if goes here, meant SubmitInquiryCommand() failed.
// if goes here, meant ScsiInquiryCommand() failed.
// if ScsiDiskRequestSenseKeys() succeeds at last,
// better retry SubmitInquiryCommand(). (by setting *NeedRetry = TRUE)
// better retry ScsiInquiryCommand(). (by setting *NeedRetry = TRUE)
//
MaxRetry = 3;
for (Index = 0; Index < MaxRetry; Index++) {
@ -1057,7 +1057,7 @@ ScsiDiskTestUnitReady (
//
// Parameter 3 and 4: do not require sense data, retrieve it when needed.
//
Status = SubmitTestUnitReadyCommand (
Status = ScsiTestUnitReadyCommand (
ScsiDiskDevice->ScsiIo,
EfiScsiStallSeconds (1),
NULL,
@ -1275,7 +1275,7 @@ Returns:
//
// submit Read Capacity Command. in this call,not request sense data
//
CommandStatus = SubmitReadCapacityCommand (
CommandStatus = ScsiReadCapacityCommand (
ScsiDiskDevice->ScsiIo,
EfiScsiStallSeconds (1),
NULL,
@ -1337,9 +1337,9 @@ Returns:
}
//
// if goes here, meant SubmitReadCapacityCommand() failed.
// if goes here, meant ScsiReadCapacityCommand() failed.
// if ScsiDiskRequestSenseKeys() succeeds at last,
// better retry SubmitReadCapacityCommand(). (by setting *NeedRetry = TRUE)
// better retry ScsiReadCapacityCommand(). (by setting *NeedRetry = TRUE)
//
MaxRetry = 3;
for (Index = 0; Index < MaxRetry; Index++) {
@ -1514,7 +1514,7 @@ ScsiDiskRequestSenseKeys (
for (SenseReq = TRUE; SenseReq;) {
Status = SubmitRequestSenseCommand (
Status = ScsiRequestSenseCommand (
ScsiDiskDevice->ScsiIo,
EfiScsiStallSeconds (2),
PtrSenseData,
@ -1894,7 +1894,7 @@ Returns:
*NeedRetry = FALSE;
*NumberOfSenseKeys = 0;
SenseDataLength = 0;
Status = SubmitRead10Command (
Status = ScsiRead10Command (
ScsiDiskDevice->ScsiIo,
Timeout,
NULL,
@ -1953,7 +1953,7 @@ Returns:
*NeedRetry = FALSE;
*NumberOfSenseKeys = 0;
SenseDataLength = 0;
Status = SubmitWrite10Command (
Status = ScsiWrite10Command (
ScsiDiskDevice->ScsiIo,
Timeout,
NULL,

View File

@ -61,7 +61,7 @@
**/
EFI_STATUS
SubmitTestUnitReadyCommand (
ScsiTestUnitReadyCommand (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
OUT VOID *SenseData,
@ -103,7 +103,7 @@ SubmitTestUnitReadyCommand (
**/
EFI_STATUS
SubmitInquiryCommand (
ScsiInquiryCommand (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,
@ -150,7 +150,7 @@ SubmitInquiryCommand (
**/
EFI_STATUS
SubmitModeSense10Command (
ScsiModeSense10Command (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,
@ -202,7 +202,7 @@ SubmitModeSense10Command (
**/
EFI_STATUS
SubmitRequestSenseCommand (
ScsiRequestSenseCommand (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,
@ -244,7 +244,7 @@ SubmitRequestSenseCommand (
**/
EFI_STATUS
SubmitReadCapacityCommand (
ScsiReadCapacityCommand (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,
@ -290,7 +290,7 @@ SubmitReadCapacityCommand (
**/
EFI_STATUS
SubmitRead10Command (
ScsiRead10Command (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,
@ -337,7 +337,7 @@ SubmitRead10Command (
**/
EFI_STATUS
SubmitWrite10Command (
ScsiWrite10Command (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,

View File

@ -96,11 +96,6 @@ UsbGetReportRequest (
IN UINT8 *Report
);
typedef enum {
EfiUsbEndpointHalt,
EfiUsbDeviceRemoteWakeup
} EFI_USB_STANDARD_FEATURE_SELECTOR;
EFI_STATUS
UsbGetDescriptor (
IN EFI_USB_IO_PROTOCOL *UsbIo,
@ -186,17 +181,6 @@ UsbGetStatus (
OUT UINT32 *Status
);
EFI_STATUS
EFIAPI
UsbGetHubDescriptor (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT16 Value,
IN UINT16 Index,
IN UINT16 DescriptorLength,
OUT VOID *Descriptor,
OUT UINT32 *Status
);
//
// Clear endpoint stall
//

View File

@ -57,7 +57,7 @@ CustomDecompressGetInfo (
RETURN_STATUS
EFIAPI
CustomDecompress (
IN const GUID *DecompressGuid,
IN CONST GUID *DecompressGuid,
IN CONST VOID *Source,
IN OUT VOID *Destination,
IN OUT VOID *Scratch
@ -81,6 +81,8 @@ CustomDecompressGetAlgorithms (
IN OUT UINT32 *NumberOfAlgorithms
)
{
ASSERT (NumberOfAlgorithms != NULL);
*NumberOfAlgorithms = 0;
return RETURN_SUCCESS;
}

View File

@ -49,7 +49,7 @@
**/
EFI_STATUS
SubmitTestUnitReadyCommand (
ScsiTestUnitReadyCommand (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
OUT VOID *SenseData,
@ -129,7 +129,7 @@ SubmitTestUnitReadyCommand (
**/
EFI_STATUS
SubmitInquiryCommand (
ScsiInquiryCommand (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,
@ -220,7 +220,7 @@ SubmitInquiryCommand (
**/
EFI_STATUS
SubmitModeSense10Command (
ScsiModeSense10Command (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,
@ -312,7 +312,7 @@ SubmitModeSense10Command (
**/
EFI_STATUS
SubmitRequestSenseCommand (
ScsiRequestSenseCommand (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,
@ -392,7 +392,7 @@ SubmitRequestSenseCommand (
**/
EFI_STATUS
SubmitReadCapacityCommand (
ScsiReadCapacityCommand (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,
@ -484,7 +484,7 @@ SubmitReadCapacityCommand (
**/
EFI_STATUS
SubmitRead10Command (
ScsiRead10Command (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,
@ -575,7 +575,7 @@ SubmitRead10Command (
**/
EFI_STATUS
SubmitWrite10Command (
ScsiWrite10Command (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,

View File

@ -564,7 +564,7 @@ UsbClearEndpointHalt (
Result = UsbClearFeature (
UsbIo,
USB_TARGET_ENDPOINT,
EfiUsbEndpointHalt,
USB_FEATURE_ENDPOINT_HALT,
EndpointDescriptor.EndpointAddress,
Status
);