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

View File

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

View File

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

View File

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

View File

@ -96,11 +96,6 @@ UsbGetReportRequest (
IN UINT8 *Report IN UINT8 *Report
); );
typedef enum {
EfiUsbEndpointHalt,
EfiUsbDeviceRemoteWakeup
} EFI_USB_STANDARD_FEATURE_SELECTOR;
EFI_STATUS EFI_STATUS
UsbGetDescriptor ( UsbGetDescriptor (
IN EFI_USB_IO_PROTOCOL *UsbIo, IN EFI_USB_IO_PROTOCOL *UsbIo,
@ -186,17 +181,6 @@ UsbGetStatus (
OUT UINT32 *Status 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 // Clear endpoint stall
// //

View File

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

View File

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

View File

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