ReactOS
0.4.15-dev-2095-g7caf9e9
|
#include "wdf.h"
#include "ntddmmc.h"
#include "ntddcdvd.h"
#include "ntddcdrm.h"
#include "ntdddisk.h"
#include "ntddtape.h"
#include "ntddscsi.h"
#include "ntddvol.h"
#include "specstrings.h"
#include "cdromp.h"
#include <initguid.h>
#include <storswtr.h>
Go to the source code of this file.
Classes | |
struct | _ERROR_RECOVERY_DATA |
struct | _CDROM_DRIVER_EXTENSION |
struct | _CDROM_MMC_EXTENSION |
struct | _CDROM_SCRATCH_READ_WRITE_CONTEXT |
struct | _CDROM_SCRATCH_CONTEXT |
struct | _CDROM_IOCTL_CONTEXT |
struct | _CDROM_READ_WRITE_CONTEXT |
struct | _CDROM_DATA |
struct | _CDROM_POWER_OPTIONS |
struct | _CDROM_POWER_CONTEXT |
struct | _CDROM_DEVICE_EXTENSION |
struct | _CDROM_REQUEST_CONTEXT |
struct | _COMPLETION_CONTEXT |
#define CDROM_HACK_INVALID_FLAGS (~CDROM_HACK_VALID_FLAGS) |
#define CDROM_INTERPRET_SENSE_INFO2_MAXIMUM_HISTORY_COUNT 30000 |
#define DEBUG_COMP_ID DPFLTR_CDROM_ID |
#define EXCLUSIVE_OWNER | ( | _CdData, | |
_FileObject | |||
) | (_CdData->ExclusiveOwner == _FileObject) |
#define FREE_POOL | ( | _PoolPtr | ) |
#define IOCTL_MCN_SYNC_FAKE_IOCTL IOCTL_DISK_UPDATE_DRIVE_SIZE |
#define IS_SCSIOP_READ | ( | opCode | ) |
#define IS_SCSIOP_READWRITE | ( | opCode | ) | (IS_SCSIOP_READ(opCode) || IS_SCSIOP_WRITE(opCode)) |
#define IS_SCSIOP_WRITE | ( | opCode | ) |
#define SECONDS_TO_100NS_UNITS | ( | x | ) | (((LONGLONG)x) * UNIT_100NS_PER_SECOND) |
#define WPP_CONTROL_GUIDS WPP_CONTROL_GUIDS_NORMAL_FLAGS(WPP_GUID_CDROM) |
#define WPP_GUID_CDROM (A4196372, C3C4, 42d5, 87BF, 7EDB2E9BCC27) |
typedef struct _CDROM_DATA CDROM_DATA |
typedef struct _CDROM_DATA * PCDROM_DATA |
typedef struct _CDROM_IOCTL_CONTEXT * PCDROM_IOCTL_CONTEXT |
typedef struct _CDROM_MMC_EXTENSION * PCDROM_MMC_EXTENSION |
typedef struct _CDROM_POWER_CONTEXT * PCDROM_POWER_CONTEXT |
typedef struct _CDROM_POWER_OPTIONS * PCDROM_POWER_OPTIONS |
typedef struct _COMPLETION_CONTEXT * PCOMPLETION_CONTEXT |
typedef struct _ERROR_RECOVERY_DATA * PERROR_RECOVERY_DATA |
typedef SYNC_HANDLER* PSYNC_HANDLER |
Enumerator | |
---|---|
CdRomDeviceInterface | |
MountedDeviceInterface |
Definition at line 767 of file cdrom.h.
Enumerator | |
---|---|
PowerDownDeviceInitial | |
PowerDownDeviceLocked | |
PowerDownDeviceQuiesced | |
PowerDownDeviceFlushed | |
PowerDownDeviceStopped | |
PowerDownDeviceOff | |
PowerDownDeviceUnlocked |
Definition at line 407 of file cdrom.h.
Enumerator | |
---|---|
PowerUpDeviceInitial | |
PowerUpDeviceLocked | |
PowerUpDeviceOn | |
PowerUpDeviceStarted | |
PowerUpDeviceUnlocked |
Definition at line 419 of file cdrom.h.
_In_reads_bytes_ | ( | Length | ) |
_IRQL_requires_max_ | ( | DISPATCH_LEVEL | ) |
_IRQL_requires_max_ | ( | PASSIVE_LEVEL | ) |
Definition at line 64 of file Messaging.c.
_IRQL_requires_max_ | ( | APC_LEVEL | ) |
Definition at line 197 of file cddata.c.
FORCEINLINE _Ret_range_ | ( | 0 | , |
MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS | |||
) |
C_ASSERT | ( | (MAXULONG - sizeof(SRB_HISTORY))/30000 >=sizeof(SRB_HISTORY_ITEM) | ) |
FORCEINLINE ULONG CountOfSetBitsUChar | ( | UCHAR | _X | ) |
Definition at line 1500 of file cdrom.h.
Referenced by ClasspInitializeGesn(), and ClasspInterpretGesnData().
FORCEINLINE ULONG CountOfSetBitsULong | ( | ULONG | _X | ) |
Definition at line 1502 of file cdrom.h.
FORCEINLINE ULONG CountOfSetBitsULong32 | ( | ULONG32 | _X | ) |
Definition at line 1504 of file cdrom.h.
FORCEINLINE ULONG CountOfSetBitsULong64 | ( | ULONG64 | _X | ) |
Definition at line 1506 of file cdrom.h.
FORCEINLINE ULONG CountOfSetBitsUlongPtr | ( | ULONG_PTR | _X | ) |
Definition at line 1508 of file cdrom.h.
NTSTATUS DeviceErrorHandlerForHitachiGD2000 | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_In_ PSCSI_REQUEST_BLOCK | Srb, | ||
_Inout_ PNTSTATUS | Status, | ||
_Inout_ PBOOLEAN | Retry | ||
) |
Definition at line 361 of file sense.c.
NTSTATUS DeviceErrorHandlerForMmc | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_In_ PSCSI_REQUEST_BLOCK | Srb, | ||
_Inout_ PNTSTATUS | Status, | ||
_Inout_ PBOOLEAN | Retry | ||
) |
Definition at line 87 of file sense.c.
Definition at line 4180 of file cdrom.c.
Referenced by IoctlWorkItemRoutine(), ReadWriteWorkItemRoutine(), and SequentialQueueEvtIoReadWrite().
VOID DevicePerfIncrementErrorCount | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension | ) |
Definition at line 1378 of file common.c.
Referenced by SenseInfoInterpretBySrbStatus().
Definition at line 1179 of file common.c.
Referenced by DeviceAsynchronousCompletion(), DeviceReleaseQueueCompletion(), and RequestSenseInfoInterpret().
VOID DeviceSendIoctlAsynchronously | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_In_ ULONG | IoControlCode, | ||
_In_ PDEVICE_OBJECT | TargetDeviceObject | ||
) |
Definition at line 1030 of file common.c.
Referenced by DeviceEvtD0Entry().
VOID DeviceSendNotification | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_In_ const GUID * | Guid, | ||
_In_ ULONG | ExtraDataSize, | ||
_In_opt_ PVOID | ExtraData | ||
) |
Definition at line 799 of file common.c.
Referenced by DeviceInternalSetMediaChangeState(), SenseInfoInterpretByAdditionalSenseCode(), and SenseInfoInterpretForZPODD().
Definition at line 877 of file common.c.
Referenced by DeviceErrorHandlerForHitachiGD2000(), and SenseInfoInterpretByAdditionalSenseCode().
VOID DeviceSetMediaChangeStateEx | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_In_ MEDIA_CHANGE_DETECTION_STATE | NewState, | ||
_Inout_opt_ PMEDIA_CHANGE_DETECTION_STATE | OldState | ||
) |
Definition at line 751 of file autorun.c.
Referenced by DeviceEvtSelfManagedIoInit(), and SenseInfoInterpretByAdditionalSenseCode().
NTSTATUS DeviceZPODDGetPowerupReason | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_Out_ PSTORAGE_IDLE_POWERUP_REASON | PowerupReason | ||
) |
Definition at line 608 of file zpodd.c.
Referenced by DeviceEvtD0Entry().
FORCEINLINE VOID FREE_PORT_ALLOCATED_SENSE_BUFFER | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_In_ PSCSI_REQUEST_BLOCK | Srb | ||
) |
Definition at line 839 of file cdrom.h.
Referenced by ClassAsynchronousCompletion(), ClassIoComplete(), ClassIoCompleteAssociated(), and DeviceAsynchronousCompletion().
FORCEINLINE BOOLEAN IsVolumeMounted | ( | _In_ PDEVICE_OBJECT | DeviceObject | ) |
Definition at line 1514 of file cdrom.h.
Referenced by SenseInfoInterpretByAdditionalSenseCode(), and SenseInfoInterpretBySenseKey().
FORCEINLINE BOOLEAN PORT_ALLOCATED_SENSE | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_In_ PSCSI_REQUEST_BLOCK | Srb | ||
) |
Definition at line 826 of file cdrom.h.
Referenced by ClassAsynchronousCompletion(), ClassIoComplete(), ClassIoCompleteAssociated(), and DeviceAsynchronousCompletion().
Definition at line 111 of file common.c.
Referenced by _IRQL_requires_max_(), DeviceReleaseQueueCompletion(), and ScratchBuffer_BeginUseX().
VOID RequestCompletion | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_In_ WDFREQUEST | Request, | ||
_In_ NTSTATUS | Status, | ||
_In_ ULONG_PTR | Information | ||
) |
Definition at line 3439 of file common.c.
Referenced by CreateQueueEvtIoDefault(), DeviceEvtIoInCallerContext(), ReadWriteWorkItemRoutine(), RequestDispatchProcessDirectly(), RequestDispatchSpecialIoctls(), RequestDispatchSyncWithSequentialQueue(), RequestDispatchToSequentialQueue(), RequestDispatchUnknownRequests(), RequestHandleQueryPropertyDeviceUniqueId(), RequestHandleQueryPropertyWriteCache(), RequestHandleReadWrite(), RequestProcessInternalDeviceControl(), RequestSynchronizeProcessWithSerialQueue(), ScratchBuffer_ReadWriteCompletionRoutine(), ScratchBuffer_ReadWriteEvtRequestCancel(), ScratchBuffer_ReadWriteTimerRoutine(), SequentialQueueEvtCanceledOnQueue(), SequentialQueueEvtIoDeviceControl(), and SequentialQueueEvtIoReadWrite().
NTSTATUS RequestDuidGetDeviceIdProperty | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_In_ WDFREQUEST | Request, | ||
_In_ WDF_REQUEST_PARAMETERS | RequestParameters, | ||
_Out_ size_t * | DataLength | ||
) |
Definition at line 2797 of file common.c.
Referenced by RequestHandleQueryPropertyDeviceUniqueId().
NTSTATUS RequestDuidGetDeviceProperty | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_In_ WDFREQUEST | Request, | ||
_In_ WDF_REQUEST_PARAMETERS | RequestParameters, | ||
_Out_ size_t * | DataLength | ||
) |
Definition at line 2888 of file common.c.
Referenced by RequestHandleQueryPropertyDeviceUniqueId().
FORCEINLINE UCHAR RequestGetCurrentStackLocationFlags | ( | _In_ WDFREQUEST | Request | ) |
Definition at line 1554 of file cdrom.h.
Referenced by RequestDispatchProcessDirectly(), RequestDispatchSpecialIoctls(), RequestDispatchSyncWithSequentialQueue(), RequestDispatchToSequentialQueue(), and RequestIsRealtimeStreaming().
NTSTATUS RequestIsIoctlBlockedByExclusiveAccess | ( | _In_ WDFREQUEST | Request, |
_Out_ PBOOLEAN | IsBlocked | ||
) |
Definition at line 4058 of file cdrom.c.
Referenced by DeviceEvtIoInCallerContext(), RequestSynchronizeProcessWithSerialQueue(), and SequentialQueueEvtIoDeviceControl().
VOID RequestProcessInternalDeviceControl | ( | _In_ WDFREQUEST | Request, |
_In_ PCDROM_DEVICE_EXTENSION | DeviceExtension | ||
) |
Definition at line 3154 of file cdrom.c.
Referenced by DeviceEvtIoInCallerContext().
NTSTATUS RequestSend | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_In_ WDFREQUEST | Request, | ||
_In_ WDFIOTARGET | IoTarget, | ||
_In_ ULONG | Flags, | ||
_Out_opt_ PBOOLEAN | RequestSent | ||
) |
Definition at line 3793 of file common.c.
Referenced by _IRQL_requires_max_(), DeviceReleaseQueue(), DeviceSendStartUnit(), RequestProcessInternalDeviceControl(), and ScratchBuffer_SendSrb().
BOOLEAN RequestSenseInfoInterpret | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_In_ WDFREQUEST | Request, | ||
_In_ PSCSI_REQUEST_BLOCK | Srb, | ||
_In_ ULONG | RetriedCount, | ||
_Out_ NTSTATUS * | Status, | ||
_Out_opt_ _Deref_out_range_(0, MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) LONGLONG * | RetryIntervalIn100ns | ||
) |
Definition at line 2467 of file sense.c.
Referenced by _IRQL_requires_max_(), and RequestSenseInfoInterpretForScratchBuffer().
BOOLEAN RequestSenseInfoInterpretForScratchBuffer | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension, |
_In_ ULONG | RetriedCount, | ||
_Out_ NTSTATUS * | Status, | ||
_Out_ _Deref_out_range_(0, MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) LONGLONG * | RetryIntervalIn100ns | ||
) |
Definition at line 2564 of file sense.c.
Referenced by RequestIssueShutdownFlush(), and ScratchBuffer_ReadWriteCompletionRoutine().
NTSTATUS RequestSetContextFields | ( | _In_ WDFREQUEST | Request, |
_In_ PSYNC_HANDLER | Handler | ||
) |
Definition at line 2748 of file common.c.
Referenced by RequestDispatchSpecialIoctls(), RequestDispatchSyncWithSequentialQueue(), and RequestDispatchUnknownRequests().
Definition at line 64 of file common.c.
Referenced by DeviceEvtIoInCallerContext().
Definition at line 79 of file common.c.
Referenced by RequestSend().
VOID RequestSetupMcnSyncIrp | ( | _In_ PCDROM_DEVICE_EXTENSION | DeviceExtension | ) |
Definition at line 2749 of file autorun.c.
Referenced by RequestDispatchSpecialIoctls(), and RequestSetupMcnSyncIrp().
NTSTATUS RequestSynchronizeProcessWithSerialQueue | ( | _In_ WDFDEVICE | Device, |
_In_ WDFREQUEST | Request | ||
) |
Definition at line 3893 of file cdrom.c.
Referenced by RequestDispatchSpecialIoctls(), RequestDispatchSyncWithSequentialQueue(), and RequestDispatchUnknownRequests().
VOID NTAPI SequentialQueueEvtIoReadWrite | ( | _In_ WDFQUEUE | Queue, |
_In_ WDFREQUEST | Request, | ||
_In_ size_t | Length | ||
) |
Definition at line 3215 of file cdrom.c.
Referenced by DriverEvtDeviceAdd().
Definition at line 1569 of file cdrom.h.
Referenced by DeviceScratchSyncCache(), RequestHandleQueryPropertyWriteCache(), and RequestIssueShutdownFlush().
FORCEINLINE BOOLEAN ValidChar | ( | UCHAR | Ch | ) |
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID BufferAddress |
Definition at line 989 of file cdrom.h.
Referenced by _Success_(), ClassSendSrbSynchronous(), DECLARE_INTERFACE_(), SatisfyPacketRecvRequest(), ScsiClassSendSrbAsynchronous(), ScsiClassSendSrbSynchronous(), SendComplete(), and TryToSatisfyRecvRequestFromBuffer().