37#define FIRMWARE_ACTIVATE_TIMEOUT_VALUE 30
41 #pragma alloc_text(PAGE, ClassGetDeviceParameter)
42 #pragma alloc_text(PAGE, ClassScanForSpecial)
43 #pragma alloc_text(PAGE, ClassSetDeviceParameter)
44 #pragma alloc_text(PAGE, ClasspMyStringMatches)
45 #pragma alloc_text(PAGE, ClasspDeviceCopyOffloadProperty)
46 #pragma alloc_text(PAGE, ClasspValidateOffloadSupported)
47 #pragma alloc_text(PAGE, ClasspValidateOffloadInputParameters)
57 if (StringToMatch ==
NULL) {
74ClassGetDeviceParameter(
85 ULONG defaultParameterValue;
96 &deviceParameterHandle);
107 deviceParameterHandle,
110 status = ZwOpenKey(&deviceSubkeyHandle,
114 ZwClose(deviceParameterHandle);
133 deviceParameterHandle),
149 ZwClose(deviceParameterHandle);
161 &deviceParameterHandle);
172 deviceParameterHandle,
175 status = ZwOpenKey(&deviceSubkeyHandle,
KEY_READ, &objectAttributes);
178 ZwClose(deviceParameterHandle);
196 deviceParameterHandle),
221 ZwClose(deviceParameterHandle);
232ClassSetDeviceParameter(
251 &deviceParameterHandle);
262 deviceParameterHandle,
265 status = ZwCreateKey(&deviceSubkeyHandle,
270 ZwClose(deviceParameterHandle);
281 deviceParameterHandle),
295 ZwClose(deviceParameterHandle);
322 UCHAR nullString[] =
"";
341 if (deviceDescriptor->VendorIdOffset != 0 &&
342 deviceDescriptor->VendorIdOffset != -1) {
343 vendorId = ((
PUCHAR)deviceDescriptor);
344 vendorId += deviceDescriptor->VendorIdOffset;
346 vendorId = nullString;
348 if (deviceDescriptor->ProductIdOffset != 0 &&
349 deviceDescriptor->ProductIdOffset != -1) {
350 productId = ((
PUCHAR)deviceDescriptor);
351 productId += deviceDescriptor->ProductIdOffset;
353 productId = nullString;
355 if (deviceDescriptor->ProductRevisionOffset != 0 &&
356 deviceDescriptor->ProductRevisionOffset != -1) {
357 productRevision = ((
PUCHAR)deviceDescriptor);
358 productRevision += deviceDescriptor->ProductRevisionOffset;
360 productRevision = nullString;
377 "controller Ven: %s Prod: %s Rev: %s\n",
378 (
PCSZ)vendorId, (
PCSZ)productId, (
PCSZ)productRevision));
393 "completed callback\n"));
400 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_INIT,
"ClasspScanForSpecialByInquiry: no match found for %p\n",
442 fdoData->
Perf.SuccessfulIO = 0;
463 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_GENERAL,
"ClasspPerfIncrementErrorCount: "
464 "Too many errors; disabling tagged queuing and "
465 "synchronous data tranfers.\n"));
476 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_GENERAL,
"ClasspPerfIncrementErrorCount: "
477 "Too many errors; disabling disconnects.\n"));
504 if (fdoData->
Perf.ReEnableThreshhold == 0) {
509 if (succeeded < fdoData->Perf.ReEnableThreshhold) {
527 succeeded = fdoData->
Perf.SuccessfulIO;
530 (fdoData->
Perf.ReEnableThreshhold <= succeeded)
533 fdoData->
Perf.SuccessfulIO = 0;
544 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_GENERAL,
"ClasspPerfIncrementSuccessfulIo: "
545 "Error level 2 no longer required.\n"));
556 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_GENERAL,
"ClasspPerfIncrementSuccessfulIo: "
557 "Error level 1 no longer required.\n"));
591 #pragma warning(suppress: 6320)
596 TracePrint((
TRACE_LEVEL_WARNING, TRACE_FLAG_INIT,
"ClasspBuildDeviceMdl: MmProbeAndLockPages failed with %xh.",
status));
602 TracePrint((
TRACE_LEVEL_WARNING, TRACE_FLAG_INIT,
"ClasspBuildDeviceMdl: IoAllocateMdl failed"));
631 ClasspPerfResetCounters(
640 "Resetting all perf counters.\n"));
641 fdoData->
Perf.SuccessfulIO = 0;
714 (
PVOID *)&deviceIdDescriptor);
721 descHeader =
Irp->AssociatedIrp.SystemBuffer;
727 offset = descHeader->Size;
730 descHeader->Size += deviceIdDescriptor->Size;
732 if (queryLength < descHeader->
Size) {
744 storageDuid =
Irp->AssociatedIrp.SystemBuffer;
749 deviceIdDescriptor->Size);
751 Irp->IoStatus.Information = storageDuid->
Size;
803 if (!deviceDescriptor) {
808 descHeader =
Irp->AssociatedIrp.SystemBuffer;
814 if (deviceDescriptor->SerialNumberOffset == 0) {
822 offset = descHeader->Size;
825 descHeader->Size += deviceDescriptor->Size;
827 if (queryLength < descHeader->
Size) {
839 storageDuid =
Irp->AssociatedIrp.SystemBuffer;
844 deviceDescriptor->Size);
846 Irp->IoStatus.Information = storageDuid->
Size;
880 PDRIVE_LAYOUT_INFORMATION_EX layoutEx =
NULL;
918 descHeader =
Irp->AssociatedIrp.SystemBuffer;
924 offset = descHeader->Size;
929 if (queryLength < descHeader->
Size) {
941 storageDuid =
Irp->AssociatedIrp.SystemBuffer;
948 driveLayoutSignature->
Mbr =
TRUE;
951 &layoutEx->Mbr.Signature,
952 sizeof(layoutEx->Mbr.Signature));
959 &layoutEx->Gpt.DiskId,
960 sizeof(layoutEx->Gpt.DiskId));
965 Irp->IoStatus.Information = storageDuid->
Size;
1031 Irp->IoStatus.Information = 0;
1046 includeOptionalIds =
TRUE;
1048 includeOptionalIds =
FALSE;
1071 descHeader =
Irp->AssociatedIrp.SystemBuffer;
1112 if (!includeOptionalIds) {
1155 }
else if (infoFound) {
1163 Irp->AssociatedIrp.SystemBuffer));
1223 goto WriteCacheExit;
1232 goto WriteCacheExit;
1237 goto WriteCacheExit;
1244 goto WriteCacheExit;
1260 goto WriteCacheExit;
1267 writeCache->NVCacheEnabled =
FALSE;
1293 writeCache->FlushCacheSupported =
TRUE;
1300 writeCache->FlushCacheSupported =
FALSE;
1311 if (modeData ==
NULL) {
1312 TracePrint((
TRACE_LEVEL_WARNING, TRACE_FLAG_IOCTL,
"ClasspWriteCacheProperty: Unable to allocate mode data buffer\n"));
1314 goto WriteCacheExit;
1336 TracePrint((
TRACE_LEVEL_WARNING, TRACE_FLAG_IOCTL,
"ClasspWriteCacheProperty: Mode Sense failed\n"));
1338 goto WriteCacheExit;
1364 if (pageData ==
NULL) {
1366 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_IOCTL,
"ClasspWriteCacheProperty: Unable to find caching mode page.\n"));
1428 goto WriteCacheExit;
1453 if (pageData ==
NULL) {
1454 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_IOCTL,
"ClasspWriteCacheProperty: Unable to find caching mode page.\n"));
1493 ULONG logicalSectorSize;
1495 REVERSE_BYTES(&logicalSectorSize, &BytesPerBlockInBigEndian);
1497 if (logicalSectorSize == 0) {
1498 logicalSectorSize = 512;
1504 if (logicalSectorSize & (logicalSectorSize-1)) {
1505 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_INIT,
"FDO %ph has non-standard sector size 0x%x.",
Fdo, logicalSectorSize));
1507 logicalSectorSize &= logicalSectorSize-1;
1509 while (logicalSectorSize & (logicalSectorSize-1));
1513 return logicalSectorSize;
1523 USHORT lowestAlignedBlock;
1524 USHORT logicalBlocksPerPhysicalBlock;
1532 (
FdoExtension->DiskGeometry.BytesPerSector ==
FdoExtension->FunctionSupportInfo->ReadCapacity16Data.BytesPerLogicalSector) );
1534 logicalBlocksPerPhysicalBlock = 1 << ReadCapacity16Data->LogicalPerPhysicalExponent;
1535 lowestAlignedBlock = (ReadCapacity16Data->LowestAlignedBlock_MSB << 8) | ReadCapacity16Data->LowestAlignedBlock_LSB;
1537 if (lowestAlignedBlock > logicalBlocksPerPhysicalBlock) {
1542 lowestAlignedBlock = (logicalBlocksPerPhysicalBlock - lowestAlignedBlock) % logicalBlocksPerPhysicalBlock;
1560 "InterpretReadCapacity16Data: Device\'s LBP enabled = %d\n",
1589 ULONG dataTransferLength = 0;
1594 if (
FdoExtension->FunctionSupportInfo->ReadCapacity16Data.CommandStatus != -1) {
1596 return FdoExtension->FunctionSupportInfo->ReadCapacity16Data.CommandStatus;
1604#if defined(_ARM_) || defined(_ARM64_)
1665 allocationBufferLength,
1725 if (fdoExtension->FunctionSupportInfo->RegAccessAlignmentQueryNotSupported) {
1732 (fdoExtension->FunctionSupportInfo->LowerLayerSupport.AccessAlignmentProperty ==
Supported) ) {
1768 length = irpStack->Parameters.DeviceIoControl.OutputBufferLength;
1791 switch (fdoExtension->FunctionSupportInfo->LowerLayerSupport.AccessAlignmentProperty) {
1804 fdoExtension->FunctionSupportInfo->ReadCapacity16Data.CommandStatus =
status;
1809 fdoExtension->FunctionSupportInfo->LowerLayerSupport.AccessAlignmentProperty =
NotSupported;
1816 accessAlignment->BytesPerLogicalSector = fdoExtension->FunctionSupportInfo->ReadCapacity16Data.BytesPerLogicalSector;
1817 accessAlignment->BytesPerPhysicalSector = fdoExtension->FunctionSupportInfo->ReadCapacity16Data.BytesPerPhysicalSector;
1818 accessAlignment->BytesOffsetForSectorAlignment = fdoExtension->FunctionSupportInfo->ReadCapacity16Data.BytesOffsetForSectorAlignment;
1830 fdoExtension->FunctionSupportInfo->LowerLayerSupport.AccessAlignmentProperty =
Supported;
1851 accessAlignment->BytesPerLogicalSector = fdoExtension->FunctionSupportInfo->ReadCapacity16Data.BytesPerLogicalSector;
1852 accessAlignment->BytesPerPhysicalSector = fdoExtension->FunctionSupportInfo->ReadCapacity16Data.BytesPerPhysicalSector;
1853 accessAlignment->BytesOffsetForSectorAlignment = fdoExtension->FunctionSupportInfo->ReadCapacity16Data.BytesOffsetForSectorAlignment;
1895 if (MediumRotationRate == 0x0001) {
1899 }
else if ( (MediumRotationRate >= 0x401) &&
1900 (MediumRotationRate <= 0xFFFE) ) {
1954 "ClasspDeviceMediaTypeProperty (%p): Entering function.\n",
1967 goto __ClasspDeviceMediaTypeProperty_Exit;
1973 "ClasspDeviceMediaTypeProperty (%p): Unsupported query type %x for media type property.\n",
1978 goto __ClasspDeviceMediaTypeProperty_Exit;
1992 "ClasspDeviceMediaTypeProperty (%p): Query property for media type at incorrect IRQL.\n",
1996 goto __ClasspDeviceMediaTypeProperty_Exit;
1999 length = irpStack->Parameters.DeviceIoControl.OutputBufferLength;
2009 goto __ClasspDeviceMediaTypeProperty_Exit;
2015 goto __ClasspDeviceMediaTypeProperty_Exit;
2021 if (fdoExtension->FunctionSupportInfo->ValidInquiryPages.BlockDeviceCharacteristics ==
TRUE) {
2028 goto __ClasspDeviceMediaTypeProperty_Exit;
2033 status = fdoExtension->FunctionSupportInfo->DeviceCharacteristicsData.CommandStatus;
2038 "ClasspDeviceGetBlockDeviceCharacteristicsVPDPage (%p): VPD retrieval fails with %x.\n",
2042 goto __ClasspDeviceMediaTypeProperty_Exit;
2049 pDesc->MediumProductType = fdoExtension->FunctionSupportInfo->DeviceCharacteristicsData.MediumProductType;
2052__ClasspDeviceMediaTypeProperty_Exit:
2065 "ClasspDeviceMediaTypeProperty (%p): Exiting function with status %x.\n",
2103#if defined(_ARM_) || defined(_ARM64_)
2110 allocationBufferLength,
2144 allocationBufferLength,
2155 fdoExtension->FunctionSupportInfo->DeviceCharacteristicsData.MediumRotationRate = (
dataBuffer->MediumRotationRateMsb << 8) |
2157 fdoExtension->FunctionSupportInfo->DeviceCharacteristicsData.MediumProductType =
dataBuffer->MediumProductType;
2158 fdoExtension->FunctionSupportInfo->DeviceCharacteristicsData.NominalFormFactor =
dataBuffer->NominalFormFactor;
2195 (fdoExtension->FunctionSupportInfo->LowerLayerSupport.SeekPenaltyProperty ==
Supported) ) {
2231 length = irpStack->Parameters.DeviceIoControl.OutputBufferLength;
2251 switch (fdoExtension->FunctionSupportInfo->LowerLayerSupport.SeekPenaltyProperty) {
2261 if (fdoExtension->FunctionSupportInfo->ValidInquiryPages.BlockDeviceCharacteristics ==
TRUE) {
2269 status =
IncursSeekPenalty(fdoExtension->FunctionSupportInfo->DeviceCharacteristicsData.MediumRotationRate, &incursSeekPenalty);
2272 fdoExtension->FunctionSupportInfo->DeviceCharacteristicsData.CommandStatus =
status;
2276 fdoExtension->FunctionSupportInfo->LowerLayerSupport.SeekPenaltyProperty =
NotSupported;
2295 fdoExtension->FunctionSupportInfo->LowerLayerSupport.SeekPenaltyProperty =
Supported;
2307 status = fdoExtension->FunctionSupportInfo->DeviceCharacteristicsData.CommandStatus;
2310 status =
IncursSeekPenalty(fdoExtension->FunctionSupportInfo->DeviceCharacteristicsData.MediumRotationRate, &incursSeekPenalty);
2363 ULONG dataTransferLength = 0;
2369 if (fdoExtension->FunctionSupportInfo->LBProvisioningData.CommandStatus != -1) {
2371 return fdoExtension->FunctionSupportInfo->LBProvisioningData.CommandStatus;
2378 fdoExtension->FunctionSupportInfo->LBProvisioningData.LBPRZ =
FALSE;
2379 fdoExtension->FunctionSupportInfo->LBProvisioningData.LBPU =
FALSE;
2380 fdoExtension->FunctionSupportInfo->LBProvisioningData.ANC_SUP =
FALSE;
2381 fdoExtension->FunctionSupportInfo->LBProvisioningData.ThresholdExponent = 0;
2386 if (fdoExtension->FunctionSupportInfo->ValidInquiryPages.LBProvisioning ==
TRUE &&
2389#if defined(_ARM_) || defined(_ARM64_)
2443 cdb->CDB6INQUIRY3.EnableVitalProductData = 1;
2450 allocationBufferLength,
2470 ((dataTransferLength < 0x08) ||
2484 fdoExtension->FunctionSupportInfo->LBProvisioningData.ProvisioningType = lbProvisioning->ProvisioningType;
2485 fdoExtension->FunctionSupportInfo->LBProvisioningData.LBPRZ = lbProvisioning->LBPRZ;
2486 fdoExtension->FunctionSupportInfo->LBProvisioningData.LBPU = lbProvisioning->LBPU;
2487 fdoExtension->FunctionSupportInfo->LBProvisioningData.ANC_SUP = lbProvisioning->ANC_SUP;
2488 fdoExtension->FunctionSupportInfo->LBProvisioningData.ThresholdExponent = lbProvisioning->ThresholdExponent;
2492 "ClasspDeviceGetLBProvisioningVPDPage (%p): %s %s (rev %s) reported following parameters: \
2493 \n\t\t\tProvisioningType: %u \
2496 \n\t\t\tANC_SUP: %I64u \
2497 \n\t\t\tThresholdExponent: %u\n",
2502 lbProvisioning->ProvisioningType,
2503 lbProvisioning->LBPRZ,
2504 lbProvisioning->LBPU,
2505 lbProvisioning->ANC_SUP,
2506 lbProvisioning->ThresholdExponent));
2512 fdoExtension->FunctionSupportInfo->LBProvisioningData.CommandStatus =
status;
2534 ULONG dataTransferLength = 0;
2540 if (
FdoExtension->FunctionSupportInfo->LBProvisioningData.LBPU) {
2546 BlockLimitsData->MaxUnmapLbaCount = (
ULONG)-1;
2547 BlockLimitsData->MaxUnmapBlockDescrCount = (
ULONG)-1;
2548 BlockLimitsData->OptimalUnmapGranularity = 1;
2549 BlockLimitsData->UnmapGranularityAlignment = 0;
2550 BlockLimitsData->UGAVALID =
FALSE;
2552 BlockLimitsData->MaxUnmapLbaCount = 0;
2553 BlockLimitsData->MaxUnmapBlockDescrCount = 0;
2554 BlockLimitsData->OptimalUnmapGranularity = 0;
2555 BlockLimitsData->UnmapGranularityAlignment = 0;
2556 BlockLimitsData->UGAVALID =
FALSE;
2562 if (
FdoExtension->FunctionSupportInfo->ValidInquiryPages.BlockLimits ==
TRUE)
2564#if defined(_ARM_) || defined(_ARM64_)
2589 #pragma prefast(suppress:26015, "InitializeStorageRequestBlock ensures buffer access is bounded")
2630 allocationBufferLength,
2663 if ((dataTransferLength < 0x24) ||
2684 BlockLimitsData->UGAVALID = blockLimits->
UGAValid;
2685 if (BlockLimitsData->UGAVALID ==
TRUE) {
2687 BlockLimitsData->UnmapGranularityAlignment &= 0x7FFFFFFF;
2689 BlockLimitsData->UnmapGranularityAlignment = 0;
2694 "ClasspDeviceGetBlockLimitsVPDPage (%p): %s %s (rev %s) reported following parameters: \
2695 \n\t\t\tOptimalTransferLengthGranularity: %u \
2696 \n\t\t\tMaximumTransferLength: %u \
2697 \n\t\t\tOptimalTransferLength: %u \
2698 \n\t\t\tMaximumUnmapLBACount: %u \
2699 \n\t\t\tMaximumUnmapBlockDescriptorCount: %u \
2700 \n\t\t\tOptimalUnmapGranularity: %u \
2701 \n\t\t\tUGAValid: %u \
2702 \n\t\t\tUnmapGranularityAlignment: %u\n",
2707 BlockLimitsData->OptimalTransferLengthGranularity,
2708 BlockLimitsData->MaximumTransferLength,
2709 BlockLimitsData->OptimalTransferLength,
2710 BlockLimitsData->MaxUnmapLbaCount,
2711 BlockLimitsData->MaxUnmapBlockDescrCount,
2712 BlockLimitsData->OptimalUnmapGranularity,
2713 BlockLimitsData->UGAVALID,
2714 BlockLimitsData->UnmapGranularityAlignment));
2721 BlockLimitsData->CommandStatus =
status;
2755 (fdoExtension->FunctionSupportInfo->LowerLayerSupport.TrimProperty ==
Supported) ) {
2791 length = irpStack->Parameters.DeviceIoControl.OutputBufferLength;
2811 switch (fdoExtension->FunctionSupportInfo->LowerLayerSupport.TrimProperty) {
2822 status = fdoExtension->FunctionSupportInfo->LBProvisioningData.CommandStatus;
2827 fdoExtension->FunctionSupportInfo->LowerLayerSupport.TrimProperty =
NotSupported;
2847 fdoExtension->FunctionSupportInfo->LowerLayerSupport.TrimProperty =
Supported;
2855 status = fdoExtension->FunctionSupportInfo->LBProvisioningData.CommandStatus;
2908 ULONG generationCount;
3006 lbpDescr->
AnchorSupported = fdoExtension->FunctionSupportInfo->LBProvisioningData.ANC_SUP;
3019#if (NTDDI_VERSION >= NTDDI_WINBLUE)
3107 "ConvertDataSetRangeToUnmapBlockDescr (%p): Generating UNMAP Block Descriptors from DataSetRange: \
3108 \n\t\tStartingOffset = %I64u bytes \
3109 \n\t\tLength = %I64u bytes\n",
3151 "ConvertDataSetRangeToUnmapBlockDescr (%p): Generated UNMAP Block Descriptor: \
3152 \n\t\t\tStartingLBA = %I64u \
3153 \n\t\t\tLBACount = %I64u\n",
3201 ULONG maxBlockDescrCount;
3202 ULONG neededBlockDescrCount;
3205 BOOLEAN allDataSetRangeFullyConverted;
3207 BOOLEAN tempDataSetRangeFullyConverted;
3209 ULONG dataSetRangeIndex;
3212 ULONG blockDescrIndex;
3231 neededBlockDescrCount = 0;
3232 for (
i = 0;
i < DataSetRangesCount;
i++) {
3233 lbaCount = DataSetRanges[
i].LengthInBytes /
FdoExtension->DiskGeometry.BytesPerSector;
3239 neededBlockDescrCount += (
ULONG)((lbaCount - 1) /
MAXULONG + 1);
3248 if (
FdoExtension->FunctionSupportInfo->BlockLimitsData.MaxUnmapBlockDescrCount != 0 &&
3261 maxParameterListLength =
min(maxParameterListLength,
MAXUSHORT);
3276 if (maxBlockDescrCount == 0) {
3282 "DeviceProcessDsmTrimRequest (%p): Max Block Descriptor count is Zero\n",
3294 if (maxLbaCount == 0) {
3300 "DeviceProcessDsmTrimRequest (%p): Max LBA count is Zero\n",
3312#if defined(_ARM_) || defined(_ARM64_)
3330 blockDescrPointer = &
buffer->Descriptors[0];
3332 allDataSetRangeFullyConverted =
FALSE;
3333 needToSendCommand =
FALSE;
3334 tempDataSetRangeFullyConverted =
TRUE;
3335 dataSetRangeIndex = 0;
3338 blockDescrIndex = 0;
3342 while (!allDataSetRangeFullyConverted) {
3348 if (tempDataSetRangeFullyConverted) {
3349 tempDataSetRange.
StartingOffset = DataSetRanges[dataSetRangeIndex].StartingOffset;
3350 tempDataSetRange.
LengthInBytes = DataSetRanges[dataSetRangeIndex].LengthInBytes;
3351 dataSetRangeIndex++;
3365 allDataSetRangeFullyConverted = tempDataSetRangeFullyConverted && (dataSetRangeIndex == DataSetRangesCount);
3370 if ((blockDescrIndex == maxBlockDescrCount) ||
3371 (lbaCount == maxLbaCount) ||
3372 allDataSetRangeFullyConverted) {
3442 cdb->
UNMAP.Anchor = 0;
3443 cdb->
UNMAP.GroupNumber = 0;
3444 cdb->
UNMAP.AllocationLength[0] = (
UCHAR)(transferSize >> 8);
3445 cdb->
UNMAP.AllocationLength[1] = (
UCHAR)transferSize;
3455 "DeviceProcessDsmTrimRequest (%p): UNMAP command issued. Returned NTSTATUS: %!STATUS!.\n",
3463 blockDescrIndex = 0;
3496 ULONG dataSetRangesCount;
3500 ULONG granularityInBlocks;
3504 ULONG generationCount;
3509 (fdoExtension->FunctionSupportInfo->LowerLayerSupport.TrimProcess ==
Supported) ) {
3516 "ClasspDeviceTrimProcess (%p): Lower layer supports Trim DSM IOCTL, forwarding IOCTL.\n",
3555 switch (fdoExtension->FunctionSupportInfo->LowerLayerSupport.TrimProcess) {
3562 "ClasspDeviceTrimProcess (%p): Trim DSM IOCTL support unknown. Forwarded IOCTL and received NTSTATUS %!STATUS!.\n",
3576 if (fdoExtension->FunctionSupportInfo->ValidInquiryPages.LBProvisioning ==
TRUE) {
3577 NT_ASSERT(fdoExtension->FunctionSupportInfo->LBProvisioningData.CommandStatus != -1);
3580 if (fdoExtension->FunctionSupportInfo->ValidInquiryPages.BlockLimits ==
TRUE) {
3581 NT_ASSERT(fdoExtension->FunctionSupportInfo->BlockLimitsData.CommandStatus != -1);
3589 fdoExtension->FunctionSupportInfo->LowerLayerSupport.TrimProcess =
Supported;
3603 if (fdoExtension->DiskGeometry.BytesPerSector == 0) {
3605 if(!
NT_SUCCESS(
status) || fdoExtension->DiskGeometry.BytesPerSector == 0) {
3632 granularityInBlocks = 1;
3636 "ClasspDeviceTrimProcess (%p): Optimal Unmap Granularity not provided, defaulted to 1.\n",
3646 granularityAlignmentInBytes = 0;
3650 "ClasspDeviceTrimProcess (%p): Unmap Granularity Alignment not provided, defaulted to 0.\n",
3663 dataSetRanges = &entireDataSetRange;
3664 dataSetRangesCount = 1;
3676 for (
i = 0;
i < dataSetRangesCount;
i++)
3678 if ((dataSetRanges[
i].
StartingOffset % fdoExtension->DiskGeometry.BytesPerSector != 0) ||
3679 (dataSetRanges[
i].
LengthInBytes % fdoExtension->DiskGeometry.BytesPerSector != 0) ||
3681 (dataSetRanges[
i].LengthInBytes == 0) ||
3686 "ClasspDeviceTrimProcess (%p): Invalid dataset range. StartingOffset = %I64x, LengthInBytes = %I64x\n",
3689 dataSetRanges[
i].LengthInBytes));
3708 if (fdoExtension->FunctionSupportInfo->ValidInquiryPages.LBProvisioning &&
3709 !fdoExtension->FunctionSupportInfo->LBProvisioningData.LBPRZ) {
3713 "ClasspDeviceTrimProcess (%p): Device does not support file level TRIM.\n",
3726 granularityInBlocks,
3736 "ClasspDeviceTrimProcess (%p): Device does not support UNMAP.\n",
3743 fdoExtension->FunctionSupportInfo->LowerLayerSupport.TrimProcess =
NotSupported;
3760 Irp->IoStatus.Information = 0;
3804 if (LBAStatusHeader ==
NULL || LBAStatusSize == 0)
3827 "GetLBAStatus (%p): sending command with StartingLBA = 0x%I64x, AllocationLength = 0x%I64x, ConsolidateableBlocksOnly = %u\n",
3831 ConsolidateableBlocksOnly));
3852 "GetLBAStatus (%p): command returned NT Status: %!STATUS!\n",
3917 ULONG dsmOutputLength;
3921 ULONG retryCountMax;
3923 ULONG generationCount1;
3924 ULONG generationCount2;
3925 BOOLEAN blockLimitsDataMayHaveChanged;
3930 ULONG outputVersion;
3936 if (dsmOutput ==
NULL ||
3937 dsmAttributes ==
NULL)
3947 ULONG unmapGranularityAlignment = 0;
3948 if (fdoExtension->FunctionSupportInfo->BlockLimitsData.UGAVALID) {
3949 unmapGranularityAlignment = fdoExtension->FunctionSupportInfo->BlockLimitsData.UnmapGranularityAlignment;
3951 startingOffset = unmapGranularityAlignment;
3964 startingOffset = dataSetRanges[0].StartingOffset;
3965 lengthInBytes = dataSetRanges[0].LengthInBytes;
3974#if (NTDDI_VERSION >= NTDDI_WINBLUE)
3978 if ((parameters->
Version == DEVICE_DATA_SET_LBP_STATE_PARAMETERS_VERSION_V1) &&
4009 consolidateableBlocksOnly =
TRUE;
4017 for (retryCount = 0; retryCount < retryCountMax; retryCount++) {
4019 dsmOutputLength = irpStack->Parameters.DeviceIoControl.OutputBufferLength;
4027 consolidateableBlocksOnly,
4029 &blockLimitsDataMayHaveChanged);
4031 if (!
NT_SUCCESS(getLBAWorkerStatus) && !blockLimitsDataMayHaveChanged) {
4033 finalStatus = getLBAWorkerStatus;
4050 if (generationCount1 == generationCount2) {
4055 finalStatus = getLBAWorkerStatus;
4065 generationCount1 = generationCount2;
4072 Irp->IoStatus.Status = finalStatus;
4154 ULONG requiredOutputLength;
4155 ULONG outputLength = *DsmOutputLength;
4157 ULONG blocksPerSlab;
4160 ULONG alignmentInBlocks = 0;
4161 ULONG maxBufferSize;
4166 ULONG totalProcessedSlabs = 0;
4170 ULONG lbaStatusSize;
4177 *BlockLimitsDataMayHaveChanged =
FALSE;
4192 if (!fdoExtension->FunctionSupportInfo->LBProvisioningData.LBPU)
4215 if (BlockLimitsData->UGAVALID ==
TRUE) {
4216 alignmentInBlocks = BlockLimitsData->UnmapGranularityAlignment;
4226 if (LengthInBytes == 0 ||
4232 "ClasspDeviceGetLBAStatusWorker (%p): Invalid range, length is %I64u bytes, starting offset is %I64u bytes, Unmap alignment is %I64u bytes, and disk size is %I64u bytes\n",
4247 blocksPerSlab = BlockLimitsData->OptimalUnmapGranularity;
4257 startingLBA = (((
StartingOffset - alignmentInBytes) / bytesPerSlab) + 1) * (
ULONGLONG)blocksPerSlab + alignmentInBlocks;
4262 startingLBA = ((
StartingOffset - alignmentInBytes) / bytesPerSlab) * (
ULONGLONG)blocksPerSlab + alignmentInBlocks;
4263 startingOffsetDelta = 0;
4269 if ((LengthInBytes % bytesPerSlab) == 0) {
4270 requestedSlabs = (LengthInBytes / bytesPerSlab);
4279 requestedSlabs = (LengthInBytes / bytesPerSlab) + 1;
4285 if (requestedSlabs == 0)
4289 "ClasspDeviceGetLBAStatusWorker (%p): Invalid number (%I64u) of slabs requested\n",
4314#if (NTDDI_VERSION >= NTDDI_WINBLUE)
4319 + (((requestedSlabs - 1) / bitMapGranularityInBits))
4330 + (((requestedSlabs - 1) / bitMapGranularityInBits))
4338 if (outputLength < requiredOutputLength)
4344 "ClasspDeviceGetLBAStatusWorker (%p): Given output buffer is %u bytes, needs to be %u bytes\n",
4347 requiredOutputLength));
4353 if (outputLength >=
sizeof(
ULONG))
4355 *((
PULONG)DsmOutput) = requiredOutputLength;
4370 maxBufferSize =
MIN(
MAXULONG, fdoExtension->PrivateFdoData->HwMaxXferLen);
4372 slabsPerCommand =
min(requestedSlabs, maxSlabs);
4380#if defined(_ARM_) || defined(_ARM64_)
4391 if (lbaStatusListHeader ==
NULL)
4395 "ClasspDeviceGetLBAStatusWorker (%p): Failed to allocate %u bytes for descriptors\n",
4411 DsmOutput->OutputBlockOffset = 0;
4412 DsmOutput->OutputBlockLength = 0;
4413 *DsmOutputLength = DsmOutput->Size;
4429 lbaStatusListHeader,
4431 ConsolidateableBlocksOnly);
4435 ULONG descrIndex = 0;
4436 ULONG descrSize = 0;
4437 ULONG descrSizeOverhead;
4438 ULONG descrCount = 0;
4441 ULONG commandProcessedSlabs = 0;
4456 if (descrSize >= descrSizeOverhead) {
4457 descrSize -= descrSizeOverhead;
4463 if (descrCount > 0) {
4468 expectedStartingLBA = startingLBA;
4476 for (descrIndex = 0; descrIndex < descrCount && totalProcessedSlabs < requestedSlabs && !doneProcessing; descrIndex++)
4486 if (returnedStartingLBA != expectedStartingLBA)
4496 "ClasspDeviceGetLBAStatusWorker (%p): Device returned starting LBA = %I64x when %I64x was expected.\n",
4498 returnedStartingLBA,
4501 doneProcessing =
TRUE;
4502 processCurrentDescriptor =
FALSE;
4503 *BlockLimitsDataMayHaveChanged =
TRUE;
4505 else if (lbaCount > 0 && lbaCount % blocksPerSlab != 0)
4516 "ClasspDeviceGetLBAStatusWorker (%p): Device returned an LBA count (%u) that is not a multiple of the slab size (%u)\n",
4521 lbaCount = ((lbaCount / blocksPerSlab) + 1) * blocksPerSlab;
4523 doneProcessing =
TRUE;
4524 processCurrentDescriptor =
TRUE;
4526 else if (lbaCount == 0)
4533 "ClasspDeviceGetLBAStatusWorker (%p): Device returned a zero LBA count\n",
4536 processCurrentDescriptor =
FALSE;
4544 if (processCurrentDescriptor)
4546 ULONG descrSlabs = lbaCount / blocksPerSlab;
4548 for(; 0 < descrSlabs && totalProcessedSlabs < requestedSlabs; descrSlabs--, commandProcessedSlabs++, totalProcessedSlabs++)
4550 ULONG bitMapIndex = totalProcessedSlabs / bitMapGranularityInBits;
4551 ULONG bitPos = totalProcessedSlabs % bitMapGranularityInBits;
4553 #if (NTDDI_VERSION >= NTDDI_WINBLUE)
4559 lbpState->SlabAllocationBitMap[bitMapIndex] |= (mapped << bitPos);
4567 expectedStartingLBA = returnedStartingLBA + lbaCount;
4570 if (commandProcessedSlabs > 0) {
4583 "ClasspDeviceGetLBAStatusWorker (%p): The slab allocation bitmap has zero length.\n",
4587 doneProcessing =
TRUE;
4593 "ClasspDeviceGetLBAStatusWorker (%p): Device returned no LBA Status Descriptors.\n",
4596 doneProcessing =
TRUE;
4602 "ClasspDeviceGetLBAStatusWorker (%p): not enough bytes returned\n",
4605 doneProcessing =
TRUE;
4615 (totalProcessedSlabs < requestedSlabs));
4622 if (totalProcessedSlabs > 0) {
4624 #if (NTDDI_VERSION >= NTDDI_WINBLUE)
4646 lbpState->SlabSizeInBytes = bytesPerSlab;
4647 lbpState->SlabOffsetDeltaInBytes = (
ULONG)startingOffsetDelta;
4648 lbpState->SlabAllocationBitMapBitCount = totalProcessedSlabs;
4649 lbpState->SlabAllocationBitMapLength = ((totalProcessedSlabs - 1) / bitMapGranularityInBits) + 1;
4658 + ((lbpState->SlabAllocationBitMapLength - 1) *
sizeof(lbpState->SlabAllocationBitMap[0]));
4661 DsmOutput->OutputBlockLength = lbpState->Size;
4663 *DsmOutputLength = DsmOutput->Size + DsmOutput->OutputBlockLength;
4670 "ClasspDeviceGetLBAStatusWorker (%p): Processed a total of %u slabs\n",
4672 totalProcessedSlabs));
4723 "ClassGetLBProvisioningLogPage: DO (%p), Invalid parameter, LogPage = %p, LogPageSize = %u.\n",
4766 cdb->LOGSENSE.PCBit = 0;
4767 cdb->LOGSENSE.ParameterPointer[0] = 0;
4768 cdb->LOGSENSE.ParameterPointer[1] = 0;
4792 "ClassGetLBProvisioningLogPage: DO (%p), LogSense command issued for LBP log page. NT Status: %!STATUS!.\n",
4844 ULONG resourceCount;
4845 UCHAR thresholdExponent = fdoExtension->FunctionSupportInfo->LBProvisioningData.ThresholdExponent;
4852 if (thresholdExponent < 0 || thresholdExponent > 32)
4856 "ClassInterpretLBProvisioningLogPage: DO (%p), Threshold Exponent (%u) is invalid.\n",
4858 thresholdExponent));
4870 "ClassInterpretLBProvisioningLogPage: DO (%p), Invalid parameter, Resources = %p, ResourcesSize = %u, LogPage = %p, LogPageSize = %u.\n",
4883 thresholdSetSize = 1ULL << thresholdExponent;
4901 endOfPage = (
PVOID)((
PUCHAR)parameter + pageLength);
4906 while ((
PVOID)parameter < endOfPage)
4908 if (parameter->ParameterLength > 0)
4911 switch(parameterCode)
5005 if (fdoExtension->FunctionSupportInfo->ValidInquiryPages.LBProvisioning ==
FALSE)
5009 "ClassGetLBProvisioningResources: DO (%p), Device does not support logical block provisioning.\n",
5023 "ClassGetLBProvisioningResources: DO (%p), Invalid parameter, Resources = %p, ResourcesSize = %u.\n",
5039#if defined(_ARM_) || defined(_ARM64_)
5049 if (logPage !=
NULL)
5077 "ClassGetLBProvisioningResources: DO (%p), Failed to allocate memory for LBP log page.\n",
5124 Irp->IoStatus.Information = mapResources->
Size;
5126 Irp->IoStatus.Information = 0;
5167 LONG stringSize = 0;
5173 if ((fdoExtension->AdapterDescriptor !=
NULL) &&
5209 if (errorLogEntry !=
NULL)
5238 if (
resources.UsedMappingResourcesValid &&
5239 resources.AvailableMappingResourcesValid)
5244 stringIndex += (
wcslen(stringIndex) + 1);
5256 stringIndex += (
wcslen(stringIndex) + 1);
5271 "ClassLogThresholdEvent: DO (%p), Used and available mapping resources were unavailable.\n",
5321 "ClassLogThresholdEvent: DO (%p), Soft threshold notification logged.\n",
5328 "ClassLogThresholdEvent: DO (%p), Failed to allocate memory for error log entry.\n",
5334 "ClassLogThresholdEvent: DO (%p), Failed to allocate memory for SRB.\n",
5348 if (workItem !=
NULL) {
5380 LONG stringSize = 0;
5395 if (errorLogEntry) {
5453 "ClassLogResourceExhaustionEvent: DO (%p), Permanent resource exhaustion logged.\n",
5458 "ClassLogResourceExhaustionEvent: DO (%p), Failed to allocate memory for error log entry.\n",
5465 if (workItem !=
NULL) {
5490 if (commonExtension->
IsFdo &&
5500 "ClassQueueThresholdEventWorker: DO (%p), Queueing soft threshold notification work item.\n",
5522 "ClassQueueThresholdEventWorker: DO (%p), Failed to allocate memory for the work item.\n",
5547 if (commonExtension->
IsFdo)
5556 "ClassQueueResourceExhaustionEventWorker: DO (%p), Queueing permanent resource exhaustion event work item.\n",
5571 "ClassQueueResourceExhaustionEventWorker: DO (%p), Failed to allocate memory for the work item.\n",
5582ClassLogCapacityChangedProcess(
5606 "ClassLogCapacityChangedEvent: DO (%p), Capacity changed logged.\n",
5611 "ClassLogCapacityChangedEvent: DO (%p), Failed to allocate memory for error log entry.\n",
5623 "ClassLogCapacityChangedEvent: DO (%p), ClassReadDriveCapacity returned %!STATUS!.\n",
5630 if (workItem !=
NULL) {
5654 if (commonExtension->
IsFdo)
5663 "ClassQueueCapacityChangedEventWorker: DO (%p), Queueing capacity changed event work item.\n",
5678 "ClassQueueCapacityChangedEventWorker: DO (%p), Failed to allocate memory for the work item.\n",
5689ClassLogProvisioningTypeChangedEvent(
5710 "ClassLogProvisioningTypeChangedEvent: DO (%p), LB Provisioning Type changed logged.\n",
5715 "ClassLogProvisioningTypeChangedEvent: DO (%p), Failed to allocate memory for error log entry.\n",
5743 if (commonExtension->
IsFdo)
5752 "ClassQueueProvisioningTypeChangedEventWorker: DO (%p), Queueing LB provisioning type changed event work item.\n",
5767 "ClassQueueProvisioningTypeChangedEventWorker: DO (%p), Failed to allocate memory for the work item.\n",
5801 LONG stringSize = 0;
5802 ULONG senseBufferSize;
5803 ULONG stringsBufferLength = 0;
5804 ULONG pdoNameLength = 0;
5809 switch (ioLogMessageContextHeader->ErrorCode) {
5824 stringsBufferLength = (19 + 11) *
sizeof(
WCHAR);
5836 stringsBufferLength += pdoNameLength;
5846 workItem = ioLogMessageContextHeader->WorkItem;
5856 senseBufferSize =
ALIGN_UP_BY(ioLogMessageContextHeader->SenseDataSize,
sizeof(
ULONG));
5876 logEntrySize = logEntrySize + stringsBufferLength;
5879 if (senseBufferSize) {
5893 senseBufferSize = 0;
5901 if (errorLogEntry) {
5908 errorLogEntry->
ErrorCode = ioLogMessageContextHeader->ErrorCode;
5909 errorLogEntry->
DumpData[0] = (((
ULONG)(ioLogMessageContextHeader->OpCode)) << 24) |
5910 (((
ULONG)(ioLogMessageContextHeader->SrbStatus)) << 16) |
5911 (((
ULONG)(ioLogMessageContextHeader->ScsiStatus)) << 8);
5916 if (senseBufferSize > ioLogMessageContextHeader->SenseDataSize) {
5917 RtlCopyMemory(&errorLogEntry->
DumpData[1], ioLogMessageContextHeader->SenseData, ioLogMessageContextHeader->SenseDataSize);
5918 RtlFillMemory( (
PCHAR)&errorLogEntry->
DumpData[1] + ioLogMessageContextHeader->SenseDataSize , (senseBufferSize - ioLogMessageContextHeader->SenseDataSize) ,
'-' );
5924 stringSize = logEntrySize - errorLogEntry->
StringOffset;
5929 switch (ioLogMessageContextHeader->ErrorCode) {
5947 stringIndex += (
wcslen(stringIndex) + 1);
5949 if (stringSize > 0) {
5958 stringIndex += (
wcslen(stringIndex) + 1);
5960 if (stringSize >= (
LONG)pdoNameLength && pdoNameLength > 0) {
5993 "ClasspLogIORetriedEvent: DO (%p), Soft threshold notification logged.\n",
5999 if (ioLogMessageContextHeader->SenseData) {
6000 ExFreePool(ioLogMessageContextHeader->SenseData);
6047 ULONG senseBufferSize = 0;
6050 if (!commonExtension->IsFdo) {
6060 goto __ClasspQueueLogIOEventWithContextWorker_ExitWithMessage;
6063 if (SenseBufferSize) {
6066 senseBufferSize = SenseBufferSize;
6070 if (CdbLength == 16) {
6089 if (!ioLogMessageContext) {
6090 goto __ClasspQueueLogIOEventWithContextWorker_ExitWithMessage;
6101 default:
goto __ClasspQueueLogIOEventWithContextWorker_Exit;
6106 "ClasspQueueLogIOEventWithContextWorker: DO (%p), Pkt (%p), Queueing IO retried event log message work item.\n",
6110 ioLogMessageContextHeader->WorkItem = workItem;
6114 ioLogMessageContextHeader->SenseData = senseData;
6115 ioLogMessageContextHeader->SenseDataSize = senseBufferSize;
6116 ioLogMessageContextHeader->SrbStatus = SrbStatus;
6117 ioLogMessageContextHeader->ScsiStatus = ScsiStatus;
6118 ioLogMessageContextHeader->OpCode =
Cdb->
CDB6GENERIC.OperationCode;
6119 ioLogMessageContextHeader->Reserved = 0;
6120 ioLogMessageContextHeader->ErrorCode =
ErrorCode;
6131__ClasspQueueLogIOEventWithContextWorker_ExitWithMessage:
6135 "ClasspQueueLogIOEventWithContextWorker: DO (%p), Failed to allocate memory for the log message.\n",
6138__ClasspQueueLogIOEventWithContextWorker_Exit:
6145 if (ioLogMessageContextHeader) {
6239 Irp->IoStatus.Information = 0;
6245 goto ClasspPersistentReserve_Exit;
6257 Irp->IoStatus.Information = 0;
6263 goto ClasspPersistentReserve_Exit;
6282 prCommand->
PR_IN.AllocationLength) {
6287 switch (prCommand->
PR_IN.ServiceAction) {
6316 Irp->IoStatus.Information = 0;
6322 goto ClasspPersistentReserve_Exit;
6333 &(prCommand->
PR_IN.AllocationLength));
6336 writeToDevice =
FALSE;
6345 switch (prCommand->
PR_OUT.ServiceAction) {
6398 Irp->IoStatus.Information = 0;
6404 goto ClasspPersistentReserve_Exit;
6424 prCommand->
PR_OUT.ParameterList,
6428 writeToDevice =
TRUE;
6455ClasspPersistentReserve_Exit:
6492 Irp->IoStatus.Information = 0;
6499 goto PriorityHintExit;
6506 goto PriorityHintExit;
6517 TracePrint((
TRACE_LEVEL_FATAL, TRACE_FLAG_IOCTL,
"ClasspPriorityHint: I/O priority not supported by port driver.\n"));
6522 TracePrint((
TRACE_LEVEL_FATAL, TRACE_FLAG_IOCTL,
"ClasspPriorityHint: I/O priorities supported by port driver: %X\n", priSupport->
SupportFlags));
6597 Srb->
Lun = storAddrBtl8->Lun;
6607 if (SrbEx->NumSrbExData > 0) {
6609 for (
i = 0;
i < SrbEx->NumSrbExData;
i++) {
6611 if ((SrbEx->SrbExDataOffset[
i] == 0) ||
6620 switch (SrbEx->SrbFunction) {
6624 switch (srbExData->Type) {
6714ClasspGetMaximumTokenListIdentifier(
6746 "ClasspGetMaximumTokenListIdentifier (%p): Entering function.\n",
6792 "ClasspGetMaximumTokenListIdentifier (%p): Exiting function with status %x (maxListId %u).\n",
6802ClasspGetCopyOffloadMaxDuration(
6834 "ClasspGetCopyOffloadMaxDuration (%p): Entering function.\n",
6885 "ClasspGetCopyOffloadMaxDuration (%p): Exiting function with status %x (Max Duration %u seconds).\n",
6898ClasspDeviceCopyOffloadProperty(
6945 "ClasspDeviceCopyOffloadProperty (%p): Entering function.\n",
6958 goto __ClasspDeviceCopyOffloadProperty_Exit;
6964 "ClasspDeviceCopyOffloadProperty (%p): Unsupported query type %x for Copy Offload property.\n",
6969 goto __ClasspDeviceCopyOffloadProperty_Exit;
6983 "ClasspDeviceCopyOffloadProperty (%p): Query property for Copy Offload called at incorrect IRQL.\n",
6987 goto __ClasspDeviceCopyOffloadProperty_Exit;
6998 "ClasspDeviceCopyOffloadProperty (%p): Length %u specified for Copy Offload property enough only for header.\n",
7007 goto __ClasspDeviceCopyOffloadProperty_Exit;
7012 "ClasspDeviceCopyOffloadProperty (%p): Incorrect length %u specified for Copy Offload property.\n",
7017 goto __ClasspDeviceCopyOffloadProperty_Exit;
7020 if (!fdoExtension->FunctionSupportInfo->ValidInquiryPages.BlockDeviceRODLimits) {
7024 "ClasspDeviceCopyOffloadProperty (%p): Command not supported on this device.\n",
7028 goto __ClasspDeviceCopyOffloadProperty_Exit;
7031 if (!
NT_SUCCESS(fdoExtension->FunctionSupportInfo->BlockDeviceRODLimitsData.CommandStatus)) {
7033 status = fdoExtension->FunctionSupportInfo->BlockDeviceRODLimitsData.CommandStatus;
7037 "ClasspDeviceCopyOffloadProperty (%p): VPD retrieval had failed with %x.\n",
7041 goto __ClasspDeviceCopyOffloadProperty_Exit;
7049 copyOffloadDescr->
Version = 1;
7051 copyOffloadDescr->
MaximumTokenLifetime = fdoExtension->FunctionSupportInfo->BlockDeviceRODLimitsData.MaximumInactivityTimer;
7052 copyOffloadDescr->
DefaultTokenLifetime = fdoExtension->FunctionSupportInfo->BlockDeviceRODLimitsData.DefaultInactivityTimer;
7053 copyOffloadDescr->
MaximumTransferSize = fdoExtension->FunctionSupportInfo->BlockDeviceRODLimitsData.MaximumTokenTransferSize;
7054 copyOffloadDescr->
OptimalTransferCount = fdoExtension->FunctionSupportInfo->BlockDeviceRODLimitsData.OptimalTransferCount;
7055 copyOffloadDescr->
MaximumDataDescriptors = fdoExtension->FunctionSupportInfo->BlockDeviceRODLimitsData.MaximumRangeDescriptors;
7057 if (
NT_SUCCESS(fdoExtension->FunctionSupportInfo->BlockLimitsData.CommandStatus)) {
7067__ClasspDeviceCopyOffloadProperty_Exit:
7080 "ClasspDeviceCopyOffloadProperty (%p): Exiting function with status %x.\n",
7092ClasspValidateOffloadSupported(
7124 "ClasspValidateOffloadSupported (%p): Entering function. Irp %p\n",
7137 if (!fdoExt->FunctionSupportInfo->ValidInquiryPages.BlockDeviceRODLimits) {
7141 "ClasspValidateOffloadSupported (%p): Command not supported on this disk device.\n",
7145 goto __ClasspValidateOffloadSupported_Exit;
7148 if (!
NT_SUCCESS(fdoExt->FunctionSupportInfo->BlockDeviceRODLimitsData.CommandStatus)) {
7150 status = fdoExt->FunctionSupportInfo->BlockDeviceRODLimitsData.CommandStatus;
7154 "ClasspValidateOffloadSupported (%p): VPD retrieval failed with %x.\n",
7158 goto __ClasspValidateOffloadSupported_Exit;
7164 "ClasspValidateOffloadSupported (%p): Suported only on Disk devices.\n",
7168 goto __ClasspValidateOffloadSupported_Exit;
7171__ClasspValidateOffloadSupported_Exit:
7174 "ClasspValidateOffloadSupported (%p): Exiting function Irp %p with status %x.\n",
7187ClasspValidateOffloadInputParameters(
7216 ULONG dataSetRangesCount;
7224 "ClasspValidateOffloadInputParameters (%p): Entering function Irp %p.\n",
7230 dsmAttributes =
Irp->AssociatedIrp.SystemBuffer;
7233 if (!dsmAttributes) {
7237 "ClasspValidateOffloadInputParameters (%p): NULL DsmAttributes passed in.\n",
7241 goto __ClasspValidateOffloadInputParameters_Exit;
7250 "ClasspValidateOffloadInputParameters (%p): Input buffer size (%u) too small.\n",
7255 goto __ClasspValidateOffloadInputParameters_Exit;
7263 "ClasspValidateOffloadInputParameters (%p): Incorrect DataSetRanges [offset %u, length %u].\n",
7269 goto __ClasspValidateOffloadInputParameters_Exit;
7275 if (dataSetRangesCount == 0) {
7279 "ClasspValidateOffloadInputParameters (%p): DataSetRanges specifies no extents.\n",
7283 goto __ClasspValidateOffloadInputParameters_Exit;
7296 "ClasspValidateOffloadInputParameters (%p): Couldn't retrieve disk geometry, status: %x, bytes/sector: %u.\n",
7302 goto __ClasspValidateOffloadInputParameters_Exit;
7310 for (
i = 0;
i < dataSetRangesCount;
i++) {
7313 (dataSetRanges[
i].LengthInBytes == 0) ) {
7316 "ClasspValidateOffloadInputParameters (%p): Incorrect DataSetRanges entry %u [offset %I64x, length %I64x].\n",
7320 dataSetRanges[
i].LengthInBytes));
7323 goto __ClasspValidateOffloadInputParameters_Exit;
7330 "ClasspValidateOffloadInputParameters (%p): Error! DataSetRange %u (starting LBA %I64x) specified length %I64x exceeds the medium's capacity (%I64x).\n",
7334 dataSetRanges[
i].LengthInBytes,
7338 goto __ClasspValidateOffloadInputParameters_Exit;
7342__ClasspValidateOffloadInputParameters_Exit:
7345 "ClasspValidateOffloadInputParameters (%p): Exiting function Irp %p with status %x.\n",
7388 ULONG tokenOperationBufferLength;
7389 ULONG receiveTokenInformationBufferLength;
7394 ULONG tokenOperationHeaderSize;
7399 "ClasspGetTokenOperationCommandBufferLengths (%p): Entering function.\n",
7402 NT_ASSERT(fdoExt->FunctionSupportInfo->ValidInquiryPages.BlockDeviceRODLimits &&
7403 NT_SUCCESS(fdoExt->FunctionSupportInfo->BlockDeviceRODLimitsData.CommandStatus));
7418 if (fdoExt->FunctionSupportInfo->BlockDeviceRODLimitsData.MaximumRangeDescriptors == 0) {
7424 tokenOperationBufferLength =
MIN(tokenOperationHeaderSize + fdoExt->FunctionSupportInfo->BlockDeviceRODLimitsData.MaximumRangeDescriptors *
sizeof(
BLOCK_DEVICE_RANGE_DESCRIPTOR),
7440 bufferLength =
MAX(tokenOperationBufferLength, receiveTokenInformationBufferLength);
7445 hwMaxXferLen =
MIN(fdoData->
HwMaxXferLen, adapterDesc->MaximumTransferLength);
7450 if (TokenOperationBufferLength) {
7451 *TokenOperationBufferLength = tokenOperationBufferLength;
7454 if (ReceiveTokenInformationBufferLength) {
7455 *ReceiveTokenInformationBufferLength = receiveTokenInformationBufferLength;
7460 "ClasspGetTokenOperationCommandBufferLengths (%p): Exiting function with bufferLength %u (tokenOpBufLen %u, recTokenInfoBufLen %u).\n",
7463 tokenOperationBufferLength,
7464 receiveTokenInformationBufferLength));
7509 "ClasspGetTokenOperationDescriptorLimits (%p): Entering function.\n",
7512 NT_ASSERT(fdoExt->FunctionSupportInfo->ValidInquiryPages.BlockDeviceRODLimits &&
7513 NT_SUCCESS(fdoExt->FunctionSupportInfo->BlockDeviceRODLimitsData.CommandStatus));
7516 *MaxBlockDescriptorsLength = (fdoExt->FunctionSupportInfo->BlockDeviceRODLimitsData.MaximumTokenTransferSize == 0) ?
7521 "ClasspGetTokenOperationDescriptorLimits (%p): Exiting function with MaxDescr %u, MaxXferBlocks %I64u.\n",
7523 *MaxBlockDescriptorsCount,
7524 *MaxBlockDescriptorsLength));
7535ClasspConvertDataSetRangeToBlockDescr(
7586 USHORT optimalLbaPerDescrGranularity;
7587 ULONG optimalLbaPerDescr;
7588 ULONG maxLbaPerDescr;
7592 "ClasspConvertDataSetRangeToBlockDescr (%p): Entering function. Starting offset %I64x.\n",
7596 fdoExtension =
Fdo->DeviceExtension;
7598 totalSectorCount = 0;
7615 optimalLbaPerDescrGranularity = 0;
7616 optimalLbaPerDescr = 0;
7619 if (optimalLbaPerDescr && maxLbaPerDescr) {
7621 NT_ASSERT(optimalLbaPerDescr <= maxLbaPerDescr);
7648 if (maxLbaPerDescr > 0) {
7662 if (optimalLbaPerDescr > 0) {
7671 if (optimalLbaPerDescrGranularity > 0) {
7673 numberOfOptimalChunks =
sectorCount / optimalLbaPerDescrGranularity;
7675 if (numberOfOptimalChunks > 0) {
7676 sectorCount = numberOfOptimalChunks * optimalLbaPerDescrGranularity;
7695 "ClasspConvertDataSetRangeToBlockDescr (%p): Descriptor: %u, starting LBA: %I64x, length: %I64x bytes, media size: %I64x.\n",
7707 "ClasspConvertDataSetRangeToBlockDescr (%p): Exiting function (starting offset %I64x). Total sectors processed %I64u.\n",
7745 static const UCHAR integerTable[] = {
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'A',
'B',
'C',
'D',
'E',
'F'};
7755 "ClasspBinaryToAscii (HexBuff %p): Entering function.\n",
7758 if (!HexBuffer ||
Length == 0) {
7760 goto __ClasspBinaryToAscii_Exit;
7770 actualLength = (
Length * 2) + 1;
7780 "ClasspBinaryToAscii (HexBuff %p): Failed to allocate buffer for ASCII equivalent.\n",
7784 goto __ClasspBinaryToAscii_Exit;
7794 highWord = HexBuffer[
i] >> 4;
7795 lowWord = HexBuffer[
i] & 0x0F;
7801 buffer[
j++] = integerTable[highWord];
7803#pragma warning(suppress: 6386)
7805 buffer[
j++] = integerTable[lowWord];
7811 *UpdateLength = actualLength;
7813__ClasspBinaryToAscii_Exit:
7817 "ClasspBinaryToAscii (HexBuff %p): Exiting function with buffer %s.\n",
7857 "ClasspStorageEventNotification (%p): Entering function Irp %p.\n",
7863 storageEvents =
Irp->AssociatedIrp.SystemBuffer;
7866 if (!storageEvents) {
7870 "ClasspStorageEventNotification (%p): NULL storage events passed in.\n",
7874 goto __ClasspStorageEventNotification_Exit;
7881 "ClasspStorageEventNotification (%p): Input buffer size (%u) too small.\n",
7886 goto __ClasspStorageEventNotification_Exit;
7894 "ClasspStorageEventNotification (%p): Invalid version/size [version %u, size %u].\n",
7897 storageEvents->
Size));
7900 goto __ClasspStorageEventNotification_Exit;
7913 (fdoExtension->FunctionSupportInfo->AsynchronousNotificationSupported)) {
7921__ClasspStorageEventNotification_Exit:
7924 "ClasspStorageEventNotification (%p): Exiting function Irp %p with status %x.\n",
7929 Irp->IoStatus.Information = 0;
7966 if (modeData ==
NULL) {
7967 TracePrint((
TRACE_LEVEL_WARNING, TRACE_FLAG_SCSI,
"ClasspZeroQERR: Unable to allocate mode data buffer\n"));
7968 goto ClasspZeroQERR_Exit;
7990 TracePrint((
TRACE_LEVEL_WARNING, TRACE_FLAG_SCSI,
"ClasspZeroQERR: Mode Sense failed\n"));
7991 goto ClasspZeroQERR_Exit;
8016 "ClasspZeroQERR (%p): Current settings: QERR = %u, TST = %u, TAS = %u.\n",
8022 if (pageData->
QERR != 0) {
8024 UCHAR pageSavable = 0;
8047 "ClasspZeroQERR (%p): Failed to set QERR = 0 with status %x\n",
8056 if (modeData !=
NULL) {
8063ClasspPowerActivateDevice(
8097 NT_ASSERT(fdoExtension->FunctionSupportInfo->IdlePower.IdlePowerEnabled);
8126ClasspPowerIdleDevice(
8159 NT_ASSERT(fdoExtension->FunctionSupportInfo->IdlePower.IdlePowerEnabled);
8187#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
8197 PSTORAGE_HW_FIRMWARE_INFO firmwareInfo =
NULL;
8198 PSTORAGE_HW_FIRMWARE_INFO_QUERY
query =
NULL;
8215 if (firmwareInfo ==
NULL) {
8216 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_INIT,
"ClasspGetHwFirmwareInfo: cannot allocate memory to hold data. \n"));
8225 query = (PSTORAGE_HW_FIRMWARE_INFO_QUERY)firmwareInfo;
8227 query->Version =
sizeof(STORAGE_HW_FIRMWARE_INFO_QUERY);
8228 query->Size =
sizeof(STORAGE_HW_FIRMWARE_INFO_QUERY);
8238 sizeof(STORAGE_HW_FIRMWARE_INFO_QUERY),
8250 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_INIT,
"ClasspGetHwFirmwareInfo: error %lx trying to "
8251 "query hardware firmware information #%d \n", ioStatus.
Status,
iteration));
8259 if ((firmwareInfo->Version <
sizeof(STORAGE_HW_FIRMWARE_INFO)) ||
8260 (firmwareInfo->Size <
sizeof(STORAGE_HW_FIRMWARE_INFO)) ||
8261 (firmwareInfo->SlotCount == 0) ||
8262 (firmwareInfo->ImagePayloadMaxSize > fdoExtension->
AdapterDescriptor->MaximumTransferLength)) {
8266 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_INIT,
"ClasspGetHwFirmwareInfo: error in returned data! "
8267 "Version: 0x%X, Size: 0x%X, SlotCount: 0x%X, ActiveSlot: 0x%X, PendingActiveSlot: 0x%X, ImagePayloadMaxSize: 0x%X \n",
8268 firmwareInfo->Version,
8270 firmwareInfo->SlotCount,
8271 firmwareInfo->ActiveSlot,
8272 firmwareInfo->PendingActivateSlot,
8273 firmwareInfo->ImagePayloadMaxSize));
8283 if ((firmwareInfo->Size >
sizeof(STORAGE_HW_FIRMWARE_INFO)) &&
8286 dataLength =
max(firmwareInfo->Size,
sizeof(STORAGE_HW_FIRMWARE_INFO) +
sizeof(STORAGE_HW_FIRMWARE_SLOT_INFO) * (firmwareInfo->SlotCount - 1));
8306 fdoExtension->FunctionSupportInfo->HwFirmwareInfo = firmwareInfo;
8311 PSTORAGE_HW_FIRMWARE_INFO cachedInfo = fdoExtension->FunctionSupportInfo->HwFirmwareInfo;
8313 fdoExtension->FunctionSupportInfo->HwFirmwareInfo = firmwareInfo;
8355 if (commonExtension->
IsFdo && (fdoExtension->MiniportDescriptor !=
NULL)) {
8388#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
8393 PSTORAGE_HW_FIRMWARE_INFO_QUERY
query = (PSTORAGE_HW_FIRMWARE_INFO_QUERY)
Irp->AssociatedIrp.SystemBuffer;
8404 goto Exit_Firmware_Get_Info;
8413 goto Exit_Firmware_Get_Info;
8421 goto Exit_Firmware_Get_Info;
8428 if (commonExtension->
IsFdo && (fdoExtension->FunctionSupportInfo ==
NULL)) {
8431 goto Exit_Firmware_Get_Info;
8437 if (!commonExtension->
IsFdo) {
8441 if ((
query->Flags & STORAGE_HW_FIRMWARE_REQUEST_FLAG_CONTROLLER) != 0) {
8457 if (fdoExtension->FunctionSupportInfo->HwFirmwareGetInfoSupport ==
NotSupported) {
8459 goto Exit_Firmware_Get_Info;
8469Exit_Firmware_Get_Info:
8480 memcpy(
Irp->AssociatedIrp.SystemBuffer, fdoExtension->FunctionSupportInfo->HwFirmwareInfo,
dataLength);
8501#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
8505ClassHwFirmwareDownloadComplete (
8549#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
8555 PSTORAGE_HW_FIRMWARE_DOWNLOAD firmwareDownload = (PSTORAGE_HW_FIRMWARE_DOWNLOAD)
Irp->AssociatedIrp.SystemBuffer;
8573 goto Exit_Firmware_Download;
8579 if ((firmwareDownload->Version <
sizeof(STORAGE_HW_FIRMWARE_DOWNLOAD)) ||
8581 ((firmwareDownload->BufferSize +
FIELD_OFFSET(STORAGE_HW_FIRMWARE_DOWNLOAD, ImageBuffer)) > firmwareDownload->Size)) {
8584 goto Exit_Firmware_Download;
8592 goto Exit_Firmware_Download;
8599 if (commonExtension->
IsFdo && (fdoExtension->FunctionSupportInfo ==
NULL)) {
8602 goto Exit_Firmware_Download;
8608 if (!commonExtension->
IsFdo) {
8612 if ((firmwareDownload->Flags & STORAGE_HW_FIRMWARE_REQUEST_FLAG_CONTROLLER) != 0) {
8629 if (fdoExtension->FunctionSupportInfo->HwFirmwareInfo ==
NULL) {
8630 if (fdoExtension->FunctionSupportInfo->HwFirmwareGetInfoSupport ==
NotSupported) {
8632 goto Exit_Firmware_Download;
8641 goto Exit_Firmware_Download;
8649 if (fdoExtension->FunctionSupportInfo->HwFirmwareInfo ==
NULL) {
8650 if (fdoExtension->FunctionSupportInfo->HwFirmwareGetInfoSupport ==
NotSupported) {
8656 goto Exit_Firmware_Download;
8669 if ((fdoExtension->FunctionSupportInfo->HwFirmwareInfo->SupportUpgrade ==
FALSE) ||
8670 (fdoExtension->FunctionSupportInfo->HwFirmwareInfo->ImagePayloadAlignment == 0)) {
8672 goto Exit_Firmware_Download;
8678 for (
i = 0;
i < fdoExtension->FunctionSupportInfo->HwFirmwareInfo->SlotCount;
i++) {
8679 if (fdoExtension->FunctionSupportInfo->HwFirmwareInfo->Slot[
i].SlotNumber == firmwareDownload->Slot) {
8684 if ((
i >= fdoExtension->FunctionSupportInfo->HwFirmwareInfo->SlotCount) ||
8685 (fdoExtension->FunctionSupportInfo->HwFirmwareInfo->Slot[
i].ReadOnly ==
TRUE)) {
8690 goto Exit_Firmware_Download;
8697 if ((firmwareDownload->BufferSize == 0) ||
8698 ((firmwareDownload->BufferSize % fdoExtension->FunctionSupportInfo->HwFirmwareInfo->ImagePayloadAlignment) != 0) ||
8699 (firmwareDownload->BufferSize > fdoExtension->FunctionSupportInfo->HwFirmwareInfo->ImagePayloadMaxSize) ||
8700 (firmwareDownload->BufferSize > fdoExtension->
AdapterDescriptor->MaximumTransferLength) ||
8701 ((firmwareDownload->Offset % fdoExtension->FunctionSupportInfo->HwFirmwareInfo->ImagePayloadAlignment) != 0) ||
8702 (firmwareDownload->Offset > 0xFFFFFF) ||
8703 (firmwareDownload->BufferSize > 0xFFFFFF)) {
8706 goto Exit_Firmware_Download;
8713 if (((
ULONG_PTR)firmwareDownload->ImageBuffer % fdoExtension->FunctionSupportInfo->HwFirmwareInfo->ImagePayloadAlignment) != 0) {
8717 bufferSize =
ALIGN_UP_BY(firmwareDownload->BufferSize, fdoExtension->FunctionSupportInfo->HwFirmwareInfo->ImagePayloadAlignment);
8728#pragma prefast(suppress:6014, "The allocated memory that firmwareImageBuffer points to will be freed in ClassHwFirmwareDownloadComplete().")
8732 if (firmwareImageBuffer ==
NULL) {
8734 goto Exit_Firmware_Download;
8739 RtlCopyMemory(firmwareImageBuffer, firmwareDownload->ImageBuffer, (
ULONG)firmwareDownload->BufferSize);
8746 firmwareImageBuffer = firmwareDownload->ImageBuffer;
8759 if (firmwareImageBuffer != firmwareDownload->ImageBuffer) {
8763 goto Exit_Firmware_Download;
8771 irp2->Tail.Overlay.Thread =
Irp->Tail.Overlay.Thread;
8779 newStack->Parameters.Others.Argument1 =
Irp;
8787 ClassHwFirmwareDownloadComplete,
8788 (firmwareImageBuffer != firmwareDownload->ImageBuffer) ? firmwareImageBuffer :
NULL,
8798 newStack->Flags = irpStack->
Flags;
8814 cdb->WRITE_BUFFER.Mode = SCSI_WRITE_BUFFER_MODE_DOWNLOAD_MICROCODE_WITH_OFFSETS_SAVE_DEFER_ACTIVATE;
8815 cdb->WRITE_BUFFER.ModeSpecific = 0;
8816 cdb->WRITE_BUFFER.BufferID = firmwareDownload->Slot;
8818 cdb->WRITE_BUFFER.BufferOffset[0] = *((
PCHAR)&firmwareDownload->Offset + 2);
8819 cdb->WRITE_BUFFER.BufferOffset[1] = *((
PCHAR)&firmwareDownload->Offset + 1);
8820 cdb->WRITE_BUFFER.BufferOffset[2] = *((
PCHAR)&firmwareDownload->Offset);
8844 firmwareImageBuffer,
8852 if (firmwareImageBuffer != firmwareDownload->ImageBuffer) {
8865 goto Exit_Firmware_Download;
8870Exit_Firmware_Download:
8910#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
8916 PSTORAGE_HW_FIRMWARE_ACTIVATE firmwareActivate = (PSTORAGE_HW_FIRMWARE_ACTIVATE)
Irp->AssociatedIrp.SystemBuffer;
8930 goto Exit_Firmware_Activate;
8936 if ((firmwareActivate->Version <
sizeof(STORAGE_HW_FIRMWARE_ACTIVATE)) ||
8940 goto Exit_Firmware_Activate;
8948 goto Exit_Firmware_Activate;
8955 if (commonExtension->
IsFdo && (fdoExtension->FunctionSupportInfo ==
NULL)) {
8958 goto Exit_Firmware_Activate;
8964 if (!commonExtension->
IsFdo) {
8968 if ((firmwareActivate->Flags & STORAGE_HW_FIRMWARE_REQUEST_FLAG_CONTROLLER) != 0) {
8985 if (fdoExtension->FunctionSupportInfo->HwFirmwareInfo ==
NULL) {
8986 if (fdoExtension->FunctionSupportInfo->HwFirmwareGetInfoSupport ==
NotSupported) {
8988 goto Exit_Firmware_Activate;
8997 goto Exit_Firmware_Activate;
9005 if (fdoExtension->FunctionSupportInfo->HwFirmwareInfo ==
NULL) {
9006 if (fdoExtension->FunctionSupportInfo->HwFirmwareGetInfoSupport ==
NotSupported) {
9012 goto Exit_Firmware_Activate;
9025 if (fdoExtension->FunctionSupportInfo->HwFirmwareInfo->SupportUpgrade ==
FALSE) {
9027 goto Exit_Firmware_Activate;
9033 for (
i = 0;
i < fdoExtension->FunctionSupportInfo->HwFirmwareInfo->SlotCount;
i++) {
9034 if (fdoExtension->FunctionSupportInfo->HwFirmwareInfo->Slot[
i].SlotNumber == firmwareActivate->Slot) {
9039 if (
i >= fdoExtension->FunctionSupportInfo->HwFirmwareInfo->SlotCount) {
9044 goto Exit_Firmware_Activate;
9064 cdb->WRITE_BUFFER.Mode = SCSI_WRITE_BUFFER_MODE_ACTIVATE_DEFERRED_MICROCODE;
9065 cdb->WRITE_BUFFER.ModeSpecific = 0;
9066 cdb->WRITE_BUFFER.BufferID = firmwareActivate->Slot;
9090 goto Exit_Firmware_Activate;
9095Exit_Firmware_Activate:
9151 UCHAR addlSenseCode = 0;
9152 UCHAR addlSenseCodeQual = 0;
9158 &addlSenseCodeQual);
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define ALIGN_DOWN_BY(size, align)
#define ALIGN_UP_BY(size, align)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
#define InterlockedIncrement
#define InterlockedExchange
#define InterlockedDecrement
_In_ PFCB _In_ LONGLONG StartingOffset
_In_ PSCSI_REQUEST_BLOCK Srb
_In_opt_ PWSTR _In_ PWSTR ParameterName
#define FREE_POOL(_PoolPtr)
#define DEV_POWER_PROTECTED
_In_opt_ PWSTR _In_ PWSTR _Inout_ PULONG ParameterValue
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID _In_ ULONG _In_ BOOLEAN WriteToDevice
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
_In_opt_ PWSTR SubkeyName
_In_z_ PCHAR TargetString
#define TEST_FLAG(Flags, Bit)
#define CLEAR_FLAG(Flags, Bit)
#define SET_FLAG(Flags, Bit)
#define CLASS_ERROR_LEVEL_2
#define MODE_PAGE_DATA_SIZE
#define CLASS_ERROR_LEVEL_1
#define CDB10GENERIC_LENGTH
#define MODE_DSP_FUA_SUPPORTED
#define MODE_SENSE_CHANGEABLE_VALUES
#define SCSIOP_WRITE_DATA_BUFF
#define MODE_PAGE_CACHING
#define SCSI_SENSE_UNIT_ATTENTION
#define SCSIOP_SYNCHRONIZE_CACHE
#define CLASSPNP_POOL_TAG_LOG_MESSAGE
NTSTATUS InitializeStorageRequestBlock(_Inout_bytecount_(ByteSize) PSTORAGE_REQUEST_BLOCK Srb, _In_ USHORT AddressType, _In_ ULONG ByteSize, _In_ ULONG NumSrbExData,...)
struct _OPCODE_SENSE_DATA_IO_LOG_MESSAGE_CONTEXT_HEADER * POPCODE_SENSE_DATA_IO_LOG_MESSAGE_CONTEXT_HEADER
IO_WORKITEM_ROUTINE ClassLogResourceExhaustionEvent
_In_z_ PWSTR _Out_ PULONG MaximumListIdentifier
#define MAX_TOKEN_OPERATION_PARAMETER_DATA_LENGTH
#define REG_MAX_LIST_IDENTIFIER_VALUE
_In_ PVOID _Inout_ PULONG _In_ ULONG MaxBlockDescrCount
FORCEINLINE BOOLEAN ClasspSupportsUnmap(_In_ PCLASS_FUNCTION_SUPPORT_INFO SupportInfo)
_In_ PTRANSFER_PACKET Pkt
#define MAX_NUMBER_BLOCKS_PER_BLOCK_DEVICE_RANGE_DESCRIPTOR
#define CLASSPNP_POOL_TAG_TOKEN_OPERATION
struct _IO_RETRIED_LOG_MESSAGE_CONTEXT * PIO_RETRIED_LOG_MESSAGE_CONTEXT
IO_WORKITEM_ROUTINE ClassLogThresholdEvent
FORCEINLINE BOOLEAN ClasspLowerLayerNotSupport(_In_ NTSTATUS Status)
FORCEINLINE BOOLEAN ClasspIsObsoletePortDriver(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
#define MAX_RECEIVE_TOKEN_INFORMATION_PARAMETER_DATA_LENGTH
_In_ PVOID _Inout_ PULONG _In_ ULONG _Inout_ PULONG _In_ ULONGLONG _Inout_ PDEVICE_DATA_SET_RANGE _Inout_ PULONGLONG TotalSectorsProcessed
#define MAX_TOKEN_TRANSFER_SIZE
IO_WORKITEM_ROUTINE ClasspLogIOEventWithContext
FORCEINLINE BOOLEAN ClasspIsThinProvisioned(_In_ PCLASS_FUNCTION_SUPPORT_INFO SupportInfo)
#define CLASSPNP_POOL_TAG_FIRMWARE
_In_ PVOID _Inout_ PULONG _In_ ULONG _Inout_ PULONG _In_ ULONGLONG MaxLbaCount
#define GET_LBA_STATUS_RETRY_COUNT_MAX
_In_z_ PWSTR _Out_ PULONG MaxDuration
#define DEFAULT_MAX_TARGET_DURATION
#define CLASSP_REG_COPY_OFFLOAD_MAX_TARGET_DURATION
_In_ PVOID _Inout_ PULONG CurrentBlockDescrIndex
_In_ PVOID _Inout_ PULONG _In_ ULONG _Inout_ PULONG _In_ ULONGLONG _Inout_ PDEVICE_DATA_SET_RANGE DataSetRange
_In_ PVOID _Inout_ PULONG _In_ ULONG _Inout_ PULONG CurrentLbaCount
VOID NTAPI ClassCheckMediaState(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
#define CLASS_TAG_MODE_DATA
#define CLASS_SPECIAL_FUA_NOT_SUPPORTED
#define CLASS_TAG_LB_PROVISIONING
#define ClassAcquireRemoveLock(devobj, tag)
struct _FUNCTIONAL_DEVICE_EXTENSION * PFUNCTIONAL_DEVICE_EXTENSION
#define CLASS_SRBEX_SCSI_CDB16_BUFFER_SIZE
SCSIPORT_API NTSTATUS NTAPI ClassSendSrbAsynchronous(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PSCSI_REQUEST_BLOCK Srb, _In_ PIRP Irp, _In_reads_bytes_opt_(BufferLength) __drv_aliasesMem PVOID BufferAddress, _In_ ULONG BufferLength, _In_ BOOLEAN WriteToDevice)
#define STATUS_NOT_SUPPORTED
#define STATUS_NOT_IMPLEMENTED
static PDB_INFORMATION information
#define NT_SUCCESS(StatCode)
struct _COMMON_DEVICE_EXTENSION * PCOMMON_DEVICE_EXTENSION
PVOID NTAPI ClassFindModePage(_In_reads_bytes_(Length) PCHAR ModeSenseBuffer, _In_ ULONG Length, _In_ UCHAR PageMode, _In_ BOOLEAN Use6Byte)
ULONG NTAPI ClassModeSense(_In_ PDEVICE_OBJECT Fdo, _In_reads_bytes_(Length) PCHAR ModeSenseBuffer, _In_ ULONG Length, _In_ UCHAR PageMode)
NTSTATUS NTAPI ClassSendSrbSynchronous(_In_ PDEVICE_OBJECT Fdo, _Inout_ PSCSI_REQUEST_BLOCK _Srb, _In_reads_bytes_opt_(BufferLength) PVOID BufferAddress, _In_ ULONG BufferLength, _In_ BOOLEAN WriteToDevice)
NTSTATUS ClasspBlockLimitsDataSnapshot(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _In_ BOOLEAN ForceQuery, _Out_ PCLASS_VPD_B0_DATA BlockLimitsData, _Out_ PULONG GenerationCount)
NTSTATUS ClasspModeSelect(_In_ PDEVICE_OBJECT Fdo, _In_reads_bytes_(Length) PCHAR ModeSelectBuffer, _In_ ULONG Length, _In_ BOOLEAN SavePages)
ULONG ClasspModeSense(_In_ PDEVICE_OBJECT Fdo, _In_reads_bytes_(Length) PCHAR ModeSenseBuffer, _In_ ULONG Length, _In_ UCHAR PageMode, _In_ UCHAR PageControl)
VOID NTAPI ClassSendDeviceIoControlSynchronous(_In_ ULONG IoControlCode, _In_ PDEVICE_OBJECT TargetDeviceObject, _Inout_updates_opt_(_Inexpressible_(max(InputBufferLength, OutputBufferLength))) PVOID Buffer, _In_ ULONG InputBufferLength, _In_ ULONG OutputBufferLength, _In_ BOOLEAN InternalDeviceIoControl, _Out_ PIO_STATUS_BLOCK IoStatus)
_Must_inspect_result_ NTSTATUS NTAPI ClassReadDriveCapacity(_In_ PDEVICE_OBJECT Fdo)
NTSTATUS NTAPI ClassForwardIrpSynchronous(_In_ PCOMMON_DEVICE_EXTENSION CommonExtension, _In_ PIRP Irp)
VOID NTAPI ClassCompleteRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ CCHAR PriorityBoost)
VOID NTAPI ClassReleaseRemoveLock(_In_ PDEVICE_OBJECT DeviceObject, _In_opt_ PIRP Tag)
VOID ClassQueueResourceExhaustionEventWorker(_In_ PDEVICE_OBJECT DeviceObject)
NTSTATUS ClasspDeviceLBProvisioningProperty(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp, _Inout_ PSCSI_REQUEST_BLOCK Srb)
_IRQL_requires_same_ NTSTATUS ClasspGetTokenOperationDescriptorLimits(_In_ PDEVICE_OBJECT Fdo, _In_ ULONG ServiceAction, _In_ ULONG MaxParameterBufferLength, _Out_ PULONG MaxBlockDescriptorsCount, _Out_ PULONGLONG MaxBlockDescriptorsLength)
NTSTATUS ClasspDuidGetDeviceProperty(PDEVICE_OBJECT DeviceObject, PIRP Irp)
NTSTATUS ClasspDuidGetDriveLayout(PDEVICE_OBJECT DeviceObject, PIRP Irp)
NTSTATUS ClasspWriteCacheProperty(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _Inout_ PSCSI_REQUEST_BLOCK Srb)
NTSTATUS ClasspDeviceTrimProcess(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ PGUID ActivityId, _Inout_ PSCSI_REQUEST_BLOCK Srb)
VOID ClasspZeroQERR(_In_ PDEVICE_OBJECT DeviceObject)
VOID ClassQueueCapacityChangedEventWorker(_In_ PDEVICE_OBJECT DeviceObject)
VOID ClasspQueueLogIOEventWithContextWorker(_In_ PDEVICE_OBJECT DeviceObject, _In_ ULONG SenseBufferSize, _In_ PVOID SenseData, _In_ UCHAR SrbStatus, _In_ UCHAR ScsiStatus, _In_ ULONG ErrorCode, _In_ ULONG CdbLength, _In_opt_ PCDB Cdb, _In_opt_ PTRANSFER_PACKET Pkt)
_IRQL_requires_same_ NTSTATUS ClasspStorageEventNotification(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
VOID ClasspFreeDeviceMdl(PMDL Mdl)
NTSTATUS ClassDeviceHwFirmwareDownloadProcess(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp, _Inout_ PSCSI_REQUEST_BLOCK Srb)
NTSTATUS ClasspDeviceGetLBAStatus(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp, _Inout_ PSCSI_REQUEST_BLOCK Srb)
VOID FreeDeviceInputMdl(PMDL Mdl)
NTSTATUS ClassInterpretLBProvisioningLogPage(_In_ PDEVICE_OBJECT DeviceObject, _In_ ULONG LogPageSize, _In_ PLOG_PAGE_LOGICAL_BLOCK_PROVISIONING LogPage, _In_ ULONG ResourcesSize, _Out_ PSTORAGE_LB_PROVISIONING_MAP_RESOURCES Resources)
NTSTATUS ClasspPersistentReserve(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _Inout_ PSCSI_REQUEST_BLOCK Srb)
NTSTATUS InterpretReadCapacity16Data(_Inout_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _In_ PREAD_CAPACITY16_DATA ReadCapacity16Data)
ULONG ClasspCalculateLogicalSectorSize(_In_ PDEVICE_OBJECT Fdo, _In_ ULONG BytesPerBlockInBigEndian)
_IRQL_requires_same_ PUCHAR ClasspBinaryToAscii(_In_reads_(Length) PUCHAR HexBuffer, _In_ ULONG Length, _Inout_ PULONG UpdateLength)
VOID ClasspPerfIncrementSuccessfulIo(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
NTSTATUS ClasspDuidQueryProperty(PDEVICE_OBJECT DeviceObject, PIRP Irp)
NTSTATUS ClasspLogSystemEventWithDeviceNumber(_In_ PDEVICE_OBJECT DeviceObject, _In_ NTSTATUS IoErrorCode)
NTSTATUS ClasspAccessAlignmentProperty(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _Inout_ PSCSI_REQUEST_BLOCK Srb)
NTSTATUS ClasspGetHwFirmwareInfo(_In_ PDEVICE_OBJECT DeviceObject)
NTSTATUS GetLBAStatus(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _In_ PSCSI_REQUEST_BLOCK Srb, _In_ ULONGLONG StartingLBA, _Inout_ PLBA_STATUS_LIST_HEADER LBAStatusHeader, _In_ ULONG LBAStatusSize, _In_ BOOLEAN ConsolidateableBlocksOnly)
_IRQL_requires_same_ NTSTATUS ClasspGetTokenOperationCommandBufferLength(_In_ PDEVICE_OBJECT Fdo, _In_ ULONG ServiceAction, _Inout_ PULONG CommandBufferLength, _Out_opt_ PULONG TokenOperationBufferLength, _Out_opt_ PULONG ReceiveTokenInformationBufferLength)
NTSTATUS DeviceProcessDsmTrimRequest(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _In_ PDEVICE_DATA_SET_RANGE DataSetRanges, _In_ ULONG DataSetRangesCount, _In_ ULONG UnmapGranularity, _In_ ULONG SrbFlags, _In_ PIRP Irp, _In_ PGUID ActivityId, _Inout_ PSCSI_REQUEST_BLOCK Srb)
PMDL ClasspBuildDeviceMdl(PVOID Buffer, ULONG BufferLen, BOOLEAN WriteToDevice)
NTSTATUS ClasspDeviceGetLBProvisioningVPDPage(_In_ PDEVICE_OBJECT DeviceObject, _Inout_opt_ PSCSI_REQUEST_BLOCK Srb)
NTSTATUS ClasspDeviceGetBlockDeviceCharacteristicsVPDPage(_In_ PFUNCTIONAL_DEVICE_EXTENSION fdoExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
static BOOLEAN ValidPersistentReserveScope(UCHAR Scope)
BOOLEAN ClasspIsThinProvisioningError(_In_ PSCSI_REQUEST_BLOCK Srb)
NTSTATUS ClassDeviceHwFirmwareGetInfoProcess(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
NTSTATUS ClassGetLBProvisioningLogPage(_In_ PDEVICE_OBJECT DeviceObject, _In_ PSCSI_REQUEST_BLOCK Srb, _In_ ULONG LogPageSize, _Inout_ PLOG_PAGE_LOGICAL_BLOCK_PROVISIONING LogPage)
static BOOLEAN ValidPersistentReserveType(UCHAR Type)
NTSTATUS ClasspPriorityHint(PDEVICE_OBJECT DeviceObject, PIRP Irp)
#define FIRMWARE_ACTIVATE_TIMEOUT_VALUE
NTSTATUS ClasspDeviceGetLBAStatusWorker(_In_ PDEVICE_OBJECT DeviceObject, _In_ PCLASS_VPD_B0_DATA BlockLimitsData, _In_ ULONGLONG StartingOffset, _In_ ULONGLONG LengthInBytes, _Out_ PDEVICE_MANAGE_DATA_SET_ATTRIBUTES_OUTPUT DsmOutput, _Inout_ PULONG DsmOutputLength, _Inout_ PSCSI_REQUEST_BLOCK Srb, _In_ BOOLEAN ConsolidateableBlocksOnly, _In_ ULONG OutputVersion, _Out_ PBOOLEAN BlockLimitsDataMayHaveChanged)
BOOLEAN ClasspMyStringMatches(_In_opt_z_ PCHAR StringToMatch, _In_z_ PCHAR TargetString)
NTSTATUS ClasspDeviceSeekPenaltyProperty(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _Inout_ PSCSI_REQUEST_BLOCK Srb)
__inline BOOLEAN ClassDeviceHwFirmwareIsPortDriverSupported(_In_ PDEVICE_OBJECT DeviceObject)
NTSTATUS ClasspDeviceTrimProperty(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _Inout_ PSCSI_REQUEST_BLOCK Srb)
PMDL BuildDeviceInputMdl(PVOID Buffer, ULONG BufferLen)
VOID ClassQueueThresholdEventWorker(_In_ PDEVICE_OBJECT DeviceObject)
VOID ConvertDataSetRangeToUnmapBlockDescr(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _In_ PUNMAP_BLOCK_DESCRIPTOR BlockDescr, _Inout_ PULONG CurrentBlockDescrIndex, _In_ ULONG MaxBlockDescrIndex, _Inout_ PULONGLONG CurrentLbaCount, _In_ ULONGLONG MaxLbaCount, _Inout_ PDEVICE_DATA_SET_RANGE DataSetRange)
NTSTATUS ClasspDeviceGetBlockLimitsVPDPage(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _Inout_bytecount_(SrbSize) PSCSI_REQUEST_BLOCK Srb, _In_ ULONG SrbSize, _Out_ PCLASS_VPD_B0_DATA BlockLimitsData)
VOID ClassQueueProvisioningTypeChangedEventWorker(_In_ PDEVICE_OBJECT DeviceObject)
NTSTATUS ClassReadCapacity16(_Inout_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _Inout_ PSCSI_REQUEST_BLOCK Srb)
NTSTATUS ClassDeviceGetLBProvisioningResources(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp, _Inout_ PSCSI_REQUEST_BLOCK Srb)
NTSTATUS ClassDeviceHwFirmwareActivateProcess(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp, _Inout_ PSCSI_REQUEST_BLOCK Srb)
VOID ClasspPerfIncrementErrorCount(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
VOID ClasspConvertToScsiRequestBlock(_Out_ PSCSI_REQUEST_BLOCK Srb, _In_ PSTORAGE_REQUEST_BLOCK SrbEx)
NTSTATUS ClasspDuidGetDeviceIdProperty(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS ClassGetLBProvisioningResources(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PSCSI_REQUEST_BLOCK Srb, _In_ ULONG ResourcesSize, _Inout_ PSTORAGE_LB_PROVISIONING_MAP_RESOURCES Resources)
static NTSTATUS IncursSeekPenalty(_In_ USHORT MediumRotationRate, _In_ PBOOLEAN IncursSeekPenalty)
NTSTATUS ClasspDeviceMediaTypeProperty(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp, _Inout_ PSCSI_REQUEST_BLOCK Srb)
struct _READ_CAPACITY16_DATA READ_CAPACITY16_DATA
struct _READ_CAPACITY16_DATA * PREAD_CAPACITY16_DATA
struct _SCSI_REQUEST_BLOCK SCSI_REQUEST_BLOCK
#define SRB_FUNCTION_EXECUTE_SCSI
#define SRB_FLAGS_DATA_OUT
#define SRB_FLAGS_DISABLE_DISCONNECT
#define SRB_SIMPLE_TAG_REQUEST
#define SRB_FLAGS_QUEUE_ACTION_ENABLE
#define SRB_STATUS_AUTOSENSE_VALID
#define SRB_HEAD_OF_QUEUE_TAG_REQUEST
#define SRB_FLAGS_DATA_IN
struct _SCSI_WMI_REQUEST_BLOCK * PSCSI_WMI_REQUEST_BLOCK
#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER
#define SRB_FLAGS_NO_QUEUE_FREEZE
#define _IRQL_requires_same_
#define _IRQL_requires_min_(irql)
#define _IRQL_requires_max_(irql)
#define _IRQL_requires_(irql)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeReleaseSpinLock(sl, irql)
#define KeAcquireSpinLock(sl, irql)
#define KeGetCurrentIrql()
NTSTATUS NTAPI IoReadPartitionTableEx(IN PDEVICE_OBJECT DeviceObject, IN PDRIVE_LAYOUT_INFORMATION_EX *DriveLayout)
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
VOID FASTCALL KeAcquireInStackQueuedSpinLock(IN PKSPIN_LOCK SpinLock, IN PKLOCK_QUEUE_HANDLE LockHandle)
VOID FASTCALL KeReleaseInStackQueuedSpinLock(IN PKLOCK_QUEUE_HANDLE LockHandle)
static ULONG ResourceCount
#define EXCEPTION_EXECUTE_HANDLER
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
#define RtlFillMemory(Dest, Length, Fill)
NTSYSAPI NTSTATUS WINAPI RtlWriteRegistryValue(ULONG, PCWSTR, PCWSTR, ULONG, PVOID, ULONG)
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
#define InterlockedCompareExchange
VOID NTAPI IoQueueWorkItem(IN PIO_WORKITEM IoWorkItem, IN PIO_WORKITEM_ROUTINE WorkerRoutine, IN WORK_QUEUE_TYPE QueueType, IN PVOID Context)
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
PIO_WORKITEM NTAPI IoAllocateWorkItem(IN PDEVICE_OBJECT DeviceObject)
#define Add2Ptr(PTR, INC)
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
#define memcpy(s1, s2, n)
VOID NTAPI MmProbeAndLockPages(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode, IN LOCK_OPERATION Operation)
VOID NTAPI MmUnlockPages(IN PMDL Mdl)
#define InitializeObjectAttributes(p, n, a, r, s)
#define _Function_class_(x)
#define _In_reads_opt_(size)
#define _Inout_bytecount_(size)
#define _Analysis_assume_(expr)
_In_ NDIS_ERROR_CODE ErrorCode
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RTL_REGISTRY_ABSOLUTE
#define RTL_QUERY_REGISTRY_REQUIRED
#define RTL_QUERY_REGISTRY_DIRECT
#define FILE_FLOPPY_DISKETTE
#define RTL_REGISTRY_HANDLE
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
#define RTL_SIZEOF_THROUGH_FIELD(type, field)
#define UNREFERENCED_PARAMETER(P)
_In_ ULONG _In_ ULONG _In_ ULONG Length
struct _DEVICE_DATA_SET_LB_PROVISIONING_STATE DEVICE_DATA_SET_LB_PROVISIONING_STATE
@ WriteThroughNotSupported
#define DEVICE_DATA_SET_LB_PROVISIONING_STATE_VERSION_V1
* PSTORAGE_DESCRIPTOR_HEADER
#define IOCTL_STORAGE_POWER_IDLE
enum _STORAGE_PROPERTY_ID STORAGE_PROPERTY_ID
STORAGE_DESCRIPTOR_HEADER
#define IOCTL_STORAGE_POWER_ACTIVE
#define STORAGE_EVENT_NOTIFICATION_VERSION_V1
#define DeviceDsmAction_Allocation
#define DEVICE_DSM_FLAG_ENTIRE_DATA_SET_RANGE
* PSTORAGE_WRITE_CACHE_PROPERTY
struct _DEVICE_SEEK_PENALTY_DESCRIPTOR DEVICE_SEEK_PENALTY_DESCRIPTOR
@ WriteCacheChangeUnknown
@ WriteCacheNotChangeable
#define DEVICE_DSM_FLAG_TRIM_NOT_FS_ALLOCATED
struct _DEVICE_SEEK_PENALTY_DESCRIPTOR * PDEVICE_SEEK_PENALTY_DESCRIPTOR
@ WriteCacheTypeWriteBack
struct _DEVICE_COPY_OFFLOAD_DESCRIPTOR DEVICE_COPY_OFFLOAD_DESCRIPTOR
struct _DEVICE_COPY_OFFLOAD_DESCRIPTOR * PDEVICE_COPY_OFFLOAD_DESCRIPTOR
struct _DEVICE_DATA_SET_RANGE * PDEVICE_DATA_SET_RANGE
struct _STORAGE_LB_PROVISIONING_MAP_RESOURCES STORAGE_LB_PROVISIONING_MAP_RESOURCES
#define DEVICE_DSM_FLAG_ALLOCATION_CONSOLIDATEABLE_ONLY
STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR
STORAGE_MEDIUM_PRODUCT_TYPE_DESCRIPTOR
#define IOCTL_STORAGE_PERSISTENT_RESERVE_IN
struct _DEVICE_LB_PROVISIONING_DESCRIPTOR * PDEVICE_LB_PROVISIONING_DESCRIPTOR
struct _STORAGE_PRIORITY_HINT_SUPPORT STORAGE_PRIORITY_HINT_SUPPORT
* PSTORAGE_ACCESS_ALIGNMENT_DESCRIPTOR
* PSTORAGE_DEVICE_DESCRIPTOR
struct _DEVICE_MANAGE_DATA_SET_ATTRIBUTES * PDEVICE_MANAGE_DATA_SET_ATTRIBUTES
@ StorageDeviceIdProperty
#define STORAGE_EVENT_MEDIA_STATUS
struct _DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2 * PDEVICE_DATA_SET_LB_PROVISIONING_STATE_V2
#define IOCTL_STORAGE_FIRMWARE_GET_INFO
struct _STORAGE_PROPERTY_QUERY * PSTORAGE_PROPERTY_QUERY
struct _DEVICE_MANAGE_DATA_SET_ATTRIBUTES_OUTPUT DEVICE_MANAGE_DATA_SET_ATTRIBUTES_OUTPUT
struct _DEVICE_TRIM_DESCRIPTOR DEVICE_TRIM_DESCRIPTOR
struct _DEVICE_LB_PROVISIONING_DESCRIPTOR DEVICE_LB_PROVISIONING_DESCRIPTOR
@ WriteCacheEnableUnknown
#define DEVICE_LB_PROVISIONING_DESCRIPTOR_V1_SIZE
struct _STORAGE_LB_PROVISIONING_MAP_RESOURCES * PSTORAGE_LB_PROVISIONING_MAP_RESOURCES
struct _DEVICE_TRIM_DESCRIPTOR * PDEVICE_TRIM_DESCRIPTOR
@ StoragePortCodeSetStorport
@ StoragePortCodeSetSpaceport
@ StoragePortCodeSetSDport
#define DEVICE_DATA_SET_LB_PROVISIONING_STATE_VERSION_V2
STORAGE_WRITE_CACHE_PROPERTY
struct _DEVICE_DATA_SET_RANGE DEVICE_DATA_SET_RANGE
* PSTORAGE_MEDIUM_PRODUCT_TYPE_DESCRIPTOR
* PSTORAGE_DEVICE_ID_DESCRIPTOR
* PSTORAGE_ADAPTER_DESCRIPTOR
struct _DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2 DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2
#define IoCopyCurrentIrpStackLocationToNext(Irp)
#define IO_WARNING_SOFT_THRESHOLD_REACHED_EX_LUN_POOL
#define IO_ERROR_DISK_RESOURCES_EXHAUSTED
#define IO_WARNING_SOFT_THRESHOLD_REACHED_EX
#define IO_WARNING_SOFT_THRESHOLD_REACHED_EX_POOL_POOL
#define IO_WARNING_IO_OPERATION_RETRIED
#define IO_WARNING_SOFT_THRESHOLD_REACHED_EX_POOL_LUN
#define IO_ERROR_IO_HARDWARE_ERROR
#define IO_WARNING_DISK_CAPACITY_CHANGED
#define IO_WARNING_SOFT_THRESHOLD_REACHED_EX_LUN_LUN
#define IO_WARNING_SOFT_THRESHOLD_REACHED
#define IO_WARNING_DISK_PROVISIONING_TYPE_CHANGED
VOID NTAPI IoWriteErrorLogEntry(IN PVOID ElEntry)
PVOID NTAPI IoAllocateErrorLogEntry(IN PVOID IoObject, IN UCHAR EntrySize)
PIRP NTAPI IoAllocateIrp(IN CCHAR StackSize, IN BOOLEAN ChargeQuota)
PIRP NTAPI IoBuildDeviceIoControlRequest(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, IN PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN InternalDeviceIoControl, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
VOID NTAPI IoFreeIrp(IN PIRP Irp)
ULONG NTAPI KeGetRecommendedSharedDataAlignment(VOID)
#define STATUS_INTERNAL_ERROR
#define STATUS_TRIM_READ_ZERO_NOT_SUPPORTED
#define STATUS_DEVICE_FEATURE_NOT_SUPPORTED
#define STATUS_INVALID_LEVEL
#define STATUS_INVALID_PARAMETER_1
#define STATUS_DATA_ERROR
NTSTRSAFEVAPI RtlStringCbPrintfW(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
NTSTATUS NTAPI IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject, IN ULONG DevInstKeyType, IN ACCESS_MASK DesiredAccess, OUT PHANDLE DevInstRegKey)
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
_In_opt_ WDFREQUEST _In_ ULONG _In_ BOOLEAN _In_ PCDB Cdb
#define VPD_BLOCK_DEVICE_CHARACTERISTICS
#define VPD_MAX_BUFFER_SIZE
struct _LOG_PAGE_LOGICAL_BLOCK_PROVISIONING * PLOG_PAGE_LOGICAL_BLOCK_PROVISIONING
struct _LBA_STATUS_LIST_HEADER LBA_STATUS_LIST_HEADER
#define RESERVATION_ACTION_REGISTER
#define VPD_LOGICAL_BLOCK_PROVISIONING
struct _VPD_LOGICAL_BLOCK_PROVISIONING_PAGE * PVPD_LOGICAL_BLOCK_PROVISIONING_PAGE
#define LOG_PAGE_CODE_LOGICAL_BLOCK_PROVISIONING
struct _LOG_PARAMETER_HEADER LOG_PARAMETER_HEADER
#define SERVICE_ACTION_GET_LBA_STATUS
#define LBA_STATUS_MAPPED
#define RESERVATION_SCOPE_ELEMENT
#define RESERVATION_SCOPE_LU
#define RESERVATION_ACTION_RESERVE
struct _LOG_PAGE_LOGICAL_BLOCK_PROVISIONING LOG_PAGE_LOGICAL_BLOCK_PROVISIONING
#define SCSI_ADSENSE_LB_PROVISIONING
#define RESERVATION_ACTION_RELEASE
#define MODE_PAGE_CONTROL
#define SERVICE_ACTION_READ_CAPACITY16
#define LOG_PAGE_LBP_PARAMETER_CODE_USED
#define RESERVATION_ACTION_REGISTER_IGNORE_EXISTING
struct BLOCK_DEVICE_RANGE_DESCRIPTOR * PBLOCK_DEVICE_RANGE_DESCRIPTOR
struct _UNMAP_BLOCK_DESCRIPTOR UNMAP_BLOCK_DESCRIPTOR
struct _UNMAP_LIST_HEADER UNMAP_LIST_HEADER
struct _LOG_PARAMETER_THRESHOLD_RESOURCE_COUNT * PLOG_PARAMETER_THRESHOLD_RESOURCE_COUNT
#define RESERVATION_TYPE_WRITE_EXCLUSIVE
#define RESERVATION_ACTION_READ_KEYS
#define RESERVATION_ACTION_PREEMPT_ABORT
struct STOR_ADDRESS_ALIGN _STOR_ADDR_BTL8 * PSTOR_ADDR_BTL8
#define SERVICE_ACTION_POPULATE_TOKEN
#define RESERVATION_ACTION_CLEAR
#define PROVISIONING_TYPE_UNKNOWN
#define SCSI_SENSEQ_SOFT_THRESHOLD_REACHED
struct _UNMAP_LIST_HEADER * PUNMAP_LIST_HEADER
struct _VPD_BLOCK_LIMITS_PAGE * PVPD_BLOCK_LIMITS_PAGE
#define SCSIOP_GET_LBA_STATUS
#define REVERSE_BYTES_QUAD(Destination, Source)
#define REVERSE_BYTES_SHORT(Destination, Source)
struct _VPD_BLOCK_DEVICE_CHARACTERISTICS_PAGE VPD_BLOCK_DEVICE_CHARACTERISTICS_PAGE
#define LOG_PAGE_LBP_RESOURCE_SCOPE_NOT_DEDICATED_TO_LUN
struct _LOG_PARAMETER_HEADER * PLOG_PARAMETER_HEADER
#define STOR_ADDRESS_TYPE_BTL8
#define LOG_PAGE_LBP_PARAMETER_CODE_AVAILABLE
#define SCSIOP_PERSISTENT_RESERVE_IN
#define LOG_PAGE_LBP_RESOURCE_SCOPE_DEDICATED_TO_LUN
#define RESERVATION_ACTION_PREEMPT
#define SCSIOP_READ_CAPACITY16
struct _PRO_PARAMETER_LIST PRO_PARAMETER_LIST
#define RESERVATION_TYPE_EXCLUSIVE_REGISTRANTS
#define REVERSE_BYTES(Destination, Source)
struct _VPD_BLOCK_DEVICE_CHARACTERISTICS_PAGE * PVPD_BLOCK_DEVICE_CHARACTERISTICS_PAGE
struct _LBA_STATUS_DESCRIPTOR LBA_STATUS_DESCRIPTOR
#define SCSIOP_PERSISTENT_RESERVE_OUT
#define RESERVATION_TYPE_EXCLUSIVE
#define MAX_SENSE_BUFFER_SIZE
#define SCSI_SENSE_OPTIONS_NONE
#define RESERVATION_ACTION_READ_RESERVATIONS
#define RESERVATION_TYPE_WRITE_EXCLUSIVE_REGISTRANTS
struct _LBA_STATUS_LIST_HEADER * PLBA_STATUS_LIST_HEADER
struct _SCSI_PNP_REQUEST_BLOCK * PSCSI_PNP_REQUEST_BLOCK
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB_VAR * PSRBEX_DATA_SCSI_CDB_VAR
#define SRB_FUNCTION_POWER
#define SRB_TYPE_STORAGE_REQUEST_BLOCK
struct _SCSI_POWER_REQUEST_BLOCK * PSCSI_POWER_REQUEST_BLOCK
#define STORAGE_ADDRESS_TYPE_BTL8
struct SRB_ALIGN _SRBEX_DATA * PSRBEX_DATA
@ SrbExDataTypeScsiCdbVar
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB16 * PSRBEX_DATA_SCSI_CDB16
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB32 * PSRBEX_DATA_SCSI_CDB32
struct SRB_ALIGN _SRBEX_DATA_POWER * PSRBEX_DATA_POWER
struct SRB_ALIGN _SRBEX_DATA_WMI * PSRBEX_DATA_WMI
struct SRB_ALIGN _SRBEX_DATA_PNP * PSRBEX_DATA_PNP
#define STATUS_MORE_PROCESSING_REQUIRED
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
FORCEINLINE VOID SrbSetSrbFlags(_In_ PVOID Srb, _In_ ULONG Flags)
FORCEINLINE VOID SrbSetRequestAttribute(_In_ PVOID Srb, _In_ UCHAR RequestAttribute)
FORCEINLINE VOID SrbAssignSrbFlags(_In_ PVOID Srb, _In_ ULONG Flags)
FORCEINLINE VOID SrbClearSrbFlags(_In_ PVOID Srb, _In_ ULONG Flags)
FORCEINLINE VOID SrbSetCdbLength(_In_ PVOID Srb, _In_ UCHAR CdbLength)
FORCEINLINE VOID SrbSetTimeOutValue(_In_ PVOID Srb, _In_ ULONG TimeOutValue)
FORCEINLINE PVOID SrbGetSenseInfoBuffer(_In_ PVOID Srb)
FORCEINLINE UCHAR SrbGetSenseInfoBufferLength(_In_ PVOID Srb)
FORCEINLINE ULONG SrbGetDataTransferLength(_In_ PVOID Srb)
struct _STORAGE_DEVICE_LAYOUT_SIGNATURE STORAGE_DEVICE_LAYOUT_SIGNATURE
FORCEINLINE DUID_MATCH_STATUS CompareStorageDuids(_In_ PSTORAGE_DEVICE_UNIQUE_IDENTIFIER Duid1, _In_ PSTORAGE_DEVICE_UNIQUE_IDENTIFIER Duid2)
struct _STORAGE_DEVICE_UNIQUE_IDENTIFIER STORAGE_DEVICE_UNIQUE_IDENTIFIER
#define DUID_INCLUDE_SOFTWARE_IDS
struct _STORAGE_DEVICE_LAYOUT_SIGNATURE * PSTORAGE_DEVICE_LAYOUT_SIGNATURE
#define DUID_HARDWARE_IDS_ONLY
#define TRACE_LEVEL_WARNING
#define TRACE_LEVEL_VERBOSE
#define TRACE_LEVEL_FATAL
#define TRACE_LEVEL_ERROR
#define TRACE_LEVEL_INFORMATION
BOOLEAN IdlePrioritySupported
struct _CLASS_PRIVATE_FDO_DATA::@1061 Perf
BOOLEAN DisableThrottling
ULONG BytesOffsetForSectorAlignment
ULONG BytesPerPhysicalSector
BOOLEAN LBProvisioningReadZeros
BOOLEAN LBProvisioningEnabled
ULONG BytesPerLogicalSector
ULONG UnmapGranularityAlignment
ULONG MaxUnmapBlockDescrCount
ULONG OptimalUnmapGranularity
PDEVICE_OBJECT LowerDeviceObject
struct _FUNCTIONAL_DEVICE_EXTENSION * PartitionZeroExtension
LARGE_INTEGER PartitionLength
ULONG MaximumTransferLengthPerDescriptor
ULONG OptimalTransferLengthPerDescriptor
ULONG MaximumTokenLifetime
USHORT OptimalTransferLengthGranularity
ULONG DefaultTokenLifetime
ULONGLONG MaximumTransferSize
ULONGLONG OptimalTransferCount
ULONG MaximumDataDescriptors
ULONG SlabAllocationBitMap[ANYSIZE_ARRAY]
ULONG SlabAllocationBitMapBitCount
ULONG SlabAllocationBitMapLength
ULONGLONG SlabSizeInBytes
ULONGLONG SlabOffsetDeltaInBytes
UCHAR ThinProvisioningEnabled
ULONG MaxUnmapBlockDescriptorCount
UCHAR ThinProvisioningReadZeros
UCHAR UnmapGranularityAlignmentValid
ULONGLONG OptimalUnmapGranularity
ULONGLONG UnmapGranularityAlignment
ULONG ParameterBlockLength
ULONG ParameterBlockOffset
ULONG DataSetRangesOffset
ULONG DataSetRangesLength
BOOLEAN IncursSeekPenalty
PDEVICE_OBJECT DeviceObject
ULONG ScanForSpecialFlags
DISK_GEOMETRY DiskGeometry
COMMON_DEVICE_EXTENSION CommonExtension
PSTORAGE_ADAPTER_DESCRIPTOR AdapterDescriptor
PSTORAGE_DEVICE_DESCRIPTOR DeviceDescriptor
struct _IO_STACK_LOCATION::@1575::@1576 DeviceIoControl
union _IO_STACK_LOCATION::@1575 Parameters
struct _IO_STACK_LOCATION::@3974::@4013 Others
struct _PERSISTENT_RESERVE_COMMAND::@3166::@3167 PR_IN
struct _PERSISTENT_RESERVE_COMMAND::@3166::@3168 PR_OUT
UCHAR SenseInfoBufferLength
union _STORAGE_DEVICE_LAYOUT_SIGNATURE::@2221 DeviceSpecific
ULONG StorageDeviceIdOffset
ULONG DriveLayoutSignatureOffset
ULONG StorageDeviceOffset
UCHAR MaximumTransferLength[4]
UCHAR OptimalUnmapGranularity[4]
UCHAR OptimalTransferLengthGranularity[2]
UCHAR MaximumUnmapLBACount[4]
UCHAR OptimalTransferLength[4]
UCHAR MaximumUnmapBlockDescriptorCount[4]
UCHAR UnmapGranularityAlignment[4]
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define STATUS_IO_DEVICE_ERROR
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_DATA_OVERRUN
#define STATUS_INVALID_PARAMETER
#define STATUS_NONEXISTENT_SECTOR
#define STATUS_UNSUCCESSFUL
#define STATUS_INVALID_USER_BUFFER
#define STATUS_INFO_LENGTH_MISMATCH
#define STATUS_DEVICE_DATA_ERROR
#define STATUS_INSUFFICIENT_RESOURCES
struct _CDB::_CDB10 CDB10
struct _CDB::_PERSISTENT_RESERVE_OUT PERSISTENT_RESERVE_OUT
struct _CDB::_PERSISTENT_RESERVE_IN PERSISTENT_RESERVE_IN
struct _CDB::_READ_CAPACITY16 READ_CAPACITY16
struct _CDB::_CDB6INQUIRY3 CDB6INQUIRY3
struct _CDB::_CDB6GENERIC CDB6GENERIC
struct _CDB::_UNMAP UNMAP
struct _CDB::_GET_LBA_STATUS GET_LBA_STATUS
struct _CDB::_CDB16 CDB16
#define PLUGPLAY_REGKEY_DRIVER
_In_ ULONG ParameterLength
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_In_opt_ PVOID _In_ ULONG bufferLength
_Must_inspect_result_ _In_ WDFDEVICE Fdo
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
_In_ PCEVENT_DESCRIPTOR _In_opt_ LPCGUID ActivityId
FORCEINLINE VOID IoSetNextIrpStackLocation(_Inout_ PIRP Irp)
#define PLUGPLAY_REGKEY_DEVICE
#define ERROR_LOG_MAXIMUM_SIZE
@ DevicePropertyPhysicalDeviceObjectName
struct _IO_WORKITEM * PIO_WORKITEM
struct _IO_ERROR_LOG_PACKET * PIO_ERROR_LOG_PACKET
#define IO_DISK_INCREMENT
struct _IO_ERROR_LOG_PACKET IO_ERROR_LOG_PACKET
#define FIELD_SIZE(type, field)
#define RTL_QUERY_REGISTRY_TYPECHECK
#define RTL_QUERY_REGISTRY_TYPECHECK_SHIFT