Reactos
at master 122 lines 3.0 kB view raw
1/*++ 2 3Copyright (C) Microsoft Corporation. All rights reserved. 4 5Module Name: 6 7 mmc.h 8 9Abstract: 10 11 Functions for MMC area. 12 13Author: 14 15Environment: 16 17 kernel mode only 18 19Notes: 20 21 22Revision History: 23 24--*/ 25 26#ifndef __MMC_H__ 27#define __MMC_H__ 28 29_IRQL_requires_max_(APC_LEVEL) 30VOID 31DeviceDeallocateMmcResources( 32 _In_ WDFDEVICE Device 33 ); 34 35_IRQL_requires_max_(PASSIVE_LEVEL) 36NTSTATUS 37DeviceAllocateMmcResources( 38 _In_ WDFDEVICE Device 39 ); 40 41_IRQL_requires_max_(PASSIVE_LEVEL) 42NTSTATUS 43DeviceUpdateMmcCapabilities( 44 _In_ WDFDEVICE Device 45 ); 46 47_IRQL_requires_max_(PASSIVE_LEVEL) 48NTSTATUS 49DeviceGetConfigurationWithAlloc( 50 _In_ WDFDEVICE Device, 51 _Outptr_result_bytebuffer_all_(*BytesReturned) 52 PGET_CONFIGURATION_HEADER * Buffer, 53 _Out_ PULONG BytesReturned, 54 FEATURE_NUMBER const StartingFeature, 55 ULONG const RequestedType 56 ); 57 58_IRQL_requires_max_(PASSIVE_LEVEL) 59NTSTATUS 60DeviceGetConfiguration( 61 _In_ WDFDEVICE Device, 62 _Out_writes_bytes_to_(BufferSize, *ValidBytes) 63 PGET_CONFIGURATION_HEADER Buffer, 64 _In_ ULONG const BufferSize, 65 _Out_ PULONG ValidBytes, 66 _In_ FEATURE_NUMBER const StartingFeature, 67 _In_ ULONG const RequestedType 68 ); 69 70_IRQL_requires_max_(APC_LEVEL) 71VOID 72DeviceUpdateMmcWriteCapability( 73 _In_reads_bytes_(BufferSize) 74 PGET_CONFIGURATION_HEADER Buffer, 75 ULONG const BufferSize, 76 BOOLEAN const CurrentOnly, // TRUE == can drive write now, FALSE == can drive ever write 77 _Out_ PBOOLEAN Writable, 78 _Out_ PFEATURE_NUMBER ValidationSchema, 79 _Out_ PULONG BlockingFactor 80 ); 81 82_IRQL_requires_max_(APC_LEVEL) 83PVOID 84MmcDataFindFeaturePage( 85 _In_reads_bytes_(Length) 86 PGET_CONFIGURATION_HEADER FeatureBuffer, 87 ULONG const Length, 88 FEATURE_NUMBER const Feature 89 ); 90 91_IRQL_requires_max_(APC_LEVEL) 92VOID 93MmcDataFindProfileInProfiles( 94 _In_ FEATURE_DATA_PROFILE_LIST const* ProfileHeader, 95 _In_ FEATURE_PROFILE_TYPE const ProfileToFind, 96 _In_ BOOLEAN const CurrentOnly, 97 _Out_ PBOOLEAN Found 98 ); 99 100_IRQL_requires_max_(APC_LEVEL) 101_Ret_range_(-1,MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) 102LONGLONG 103DeviceRetryTimeGuessBasedOnProfile( 104 FEATURE_PROFILE_TYPE const Profile 105 ); 106 107_IRQL_requires_max_(APC_LEVEL) 108_Ret_range_(-1,MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) 109LONGLONG 110DeviceRetryTimeDetectionBasedOnModePage2A( 111 _In_ PCDROM_DEVICE_EXTENSION DeviceExtension 112 ); 113 114_IRQL_requires_max_(APC_LEVEL) 115_Ret_range_(-1,MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) 116LONGLONG 117DeviceRetryTimeDetectionBasedOnGetPerformance( 118 _In_ PCDROM_DEVICE_EXTENSION DeviceExtension, 119 _In_ BOOLEAN UseLegacyNominalPerformance 120 ); 121 122#endif // __MMC_H__