mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:02:56 +00:00
[FDC] Remove some debug prints
svn path=/trunk/; revision=65188
This commit is contained in:
parent
ad03599ffb
commit
77e9b087e9
3 changed files with 42 additions and 40 deletions
|
@ -77,7 +77,7 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
FdcDriverUnload(IN PDRIVER_OBJECT DriverObject)
|
FdcDriverUnload(IN PDRIVER_OBJECT DriverObject)
|
||||||
{
|
{
|
||||||
DPRINT1("FdcDriverUnload()\n");
|
DPRINT("FdcDriverUnload()\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "fdc.h"
|
#include "fdc.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
/* FUNCTIONS ******************************************************************/
|
/* FUNCTIONS ******************************************************************/
|
||||||
|
@ -89,7 +90,7 @@ FdcFdoStartDevice(
|
||||||
// PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptorTranslated;
|
// PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptorTranslated;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
|
||||||
DPRINT1("FdcFdoStartDevice called\n");
|
DPRINT("FdcFdoStartDevice called\n");
|
||||||
|
|
||||||
DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||||
|
|
||||||
|
@ -129,7 +130,7 @@ FdcFdoStartDevice(
|
||||||
switch (PartialDescriptor->Type)
|
switch (PartialDescriptor->Type)
|
||||||
{
|
{
|
||||||
case CmResourceTypePort:
|
case CmResourceTypePort:
|
||||||
DPRINT1("Port: 0x%lx (%lu)\n",
|
DPRINT("Port: 0x%lx (%lu)\n",
|
||||||
PartialDescriptor->u.Port.Start.u.LowPart,
|
PartialDescriptor->u.Port.Start.u.LowPart,
|
||||||
PartialDescriptor->u.Port.Length);
|
PartialDescriptor->u.Port.Length);
|
||||||
if (PartialDescriptor->u.Port.Length >= 6)
|
if (PartialDescriptor->u.Port.Length >= 6)
|
||||||
|
@ -137,7 +138,7 @@ FdcFdoStartDevice(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CmResourceTypeInterrupt:
|
case CmResourceTypeInterrupt:
|
||||||
DPRINT1("Interrupt: Level %lu Vector %lu\n",
|
DPRINT("Interrupt: Level %lu Vector %lu\n",
|
||||||
PartialDescriptor->u.Interrupt.Level,
|
PartialDescriptor->u.Interrupt.Level,
|
||||||
PartialDescriptor->u.Interrupt.Vector);
|
PartialDescriptor->u.Interrupt.Vector);
|
||||||
/*
|
/*
|
||||||
|
@ -153,7 +154,7 @@ FdcFdoStartDevice(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CmResourceTypeDma:
|
case CmResourceTypeDma:
|
||||||
DPRINT1("Dma: Channel %lu\n",
|
DPRINT("Dma: Channel %lu\n",
|
||||||
PartialDescriptor->u.Dma.Channel);
|
PartialDescriptor->u.Dma.Channel);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -190,7 +191,7 @@ FdcFdoConfigCallback(
|
||||||
BOOLEAN ControllerFound = FALSE;
|
BOOLEAN ControllerFound = FALSE;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
|
||||||
DPRINT1("FdcFdoConfigCallback() called\n");
|
DPRINT("FdcFdoConfigCallback() called\n");
|
||||||
|
|
||||||
DeviceExtension = (PFDO_DEVICE_EXTENSION)Context;
|
DeviceExtension = (PFDO_DEVICE_EXTENSION)Context;
|
||||||
|
|
||||||
|
@ -256,7 +257,7 @@ FdcFdoConfigCallback(
|
||||||
|
|
||||||
DeviceExtension->ControllerInfo.Populated = TRUE;
|
DeviceExtension->ControllerInfo.Populated = TRUE;
|
||||||
|
|
||||||
DPRINT1("Detected %lu floppy drives!\n",
|
DPRINT("Detected %lu floppy drives!\n",
|
||||||
DeviceExtension->ControllerInfo.NumberOfDrives);
|
DeviceExtension->ControllerInfo.NumberOfDrives);
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
@ -341,7 +342,7 @@ FdcFdoQueryBusRelations(
|
||||||
ULONG i;
|
ULONG i;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DPRINT1("FdcFdoQueryBusRelations() called\n");
|
DPRINT("FdcFdoQueryBusRelations() called\n");
|
||||||
|
|
||||||
FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||||
|
|
||||||
|
@ -376,7 +377,7 @@ FdcFdoQueryBusRelations(
|
||||||
{
|
{
|
||||||
swprintf(DeviceNameBuffer, L"\\Device\\FloppyPDO%lu", DeviceNumber++);
|
swprintf(DeviceNameBuffer, L"\\Device\\FloppyPDO%lu", DeviceNumber++);
|
||||||
RtlInitUnicodeString(&DeviceName, DeviceNameBuffer);
|
RtlInitUnicodeString(&DeviceName, DeviceNameBuffer);
|
||||||
DPRINT1("Device name: %S\n", DeviceNameBuffer);
|
DPRINT("Device name: %S\n", DeviceNameBuffer);
|
||||||
|
|
||||||
/* Create physical device object */
|
/* Create physical device object */
|
||||||
Status = IoCreateDevice(FdoDeviceExtension->Common.DeviceObject->DriverObject,
|
Status = IoCreateDevice(FdoDeviceExtension->Common.DeviceObject->DriverObject,
|
||||||
|
@ -395,7 +396,7 @@ FdcFdoQueryBusRelations(
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT1("PDO created: %S\n", DeviceNameBuffer);
|
DPRINT("PDO created: %S\n", DeviceNameBuffer);
|
||||||
|
|
||||||
DriveInfo->DeviceObject = Pdo;
|
DriveInfo->DeviceObject = Pdo;
|
||||||
|
|
||||||
|
@ -415,7 +416,7 @@ FdcFdoQueryBusRelations(
|
||||||
/* Add Device ID string */
|
/* Add Device ID string */
|
||||||
RtlCreateUnicodeString(&PdoDeviceExtension->DeviceId,
|
RtlCreateUnicodeString(&PdoDeviceExtension->DeviceId,
|
||||||
L"FDC\\GENERIC_FLOPPY_DRIVE");
|
L"FDC\\GENERIC_FLOPPY_DRIVE");
|
||||||
DPRINT1("DeviceID: %S\n", PdoDeviceExtension->DeviceId.Buffer);
|
DPRINT("DeviceID: %S\n", PdoDeviceExtension->DeviceId.Buffer);
|
||||||
|
|
||||||
/* Add Hardware IDs string */
|
/* Add Hardware IDs string */
|
||||||
Status = PciCreateHardwareIDsString(&PdoDeviceExtension->HardwareIds);
|
Status = PciCreateHardwareIDsString(&PdoDeviceExtension->HardwareIds);
|
||||||
|
@ -496,14 +497,14 @@ FdcFdoPnp(
|
||||||
ULONG_PTR Information = 0;
|
ULONG_PTR Information = 0;
|
||||||
NTSTATUS Status = STATUS_NOT_SUPPORTED;
|
NTSTATUS Status = STATUS_NOT_SUPPORTED;
|
||||||
|
|
||||||
DPRINT1("FdcFdoPnp()\n");
|
DPRINT("FdcFdoPnp()\n");
|
||||||
|
|
||||||
IrpSp = IoGetCurrentIrpStackLocation(Irp);
|
IrpSp = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
|
||||||
switch (IrpSp->MinorFunction)
|
switch (IrpSp->MinorFunction)
|
||||||
{
|
{
|
||||||
case IRP_MN_START_DEVICE:
|
case IRP_MN_START_DEVICE:
|
||||||
DPRINT1(" IRP_MN_START_DEVICE received\n");
|
DPRINT(" IRP_MN_START_DEVICE received\n");
|
||||||
/* Call lower driver */
|
/* Call lower driver */
|
||||||
Status = ForwardIrpAndWait(DeviceObject, Irp);
|
Status = ForwardIrpAndWait(DeviceObject, Irp);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
|
@ -515,53 +516,53 @@ FdcFdoPnp(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_REMOVE_DEVICE:
|
case IRP_MN_QUERY_REMOVE_DEVICE:
|
||||||
DPRINT1(" IRP_MN_QUERY_REMOVE_DEVICE\n");
|
DPRINT(" IRP_MN_QUERY_REMOVE_DEVICE\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_REMOVE_DEVICE:
|
case IRP_MN_REMOVE_DEVICE:
|
||||||
DPRINT1(" IRP_MN_REMOVE_DEVICE received\n");
|
DPRINT(" IRP_MN_REMOVE_DEVICE received\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_CANCEL_REMOVE_DEVICE:
|
case IRP_MN_CANCEL_REMOVE_DEVICE:
|
||||||
DPRINT1(" IRP_MN_CANCEL_REMOVE_DEVICE\n");
|
DPRINT(" IRP_MN_CANCEL_REMOVE_DEVICE\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_STOP_DEVICE:
|
case IRP_MN_STOP_DEVICE:
|
||||||
DPRINT1(" IRP_MN_STOP_DEVICE received\n");
|
DPRINT(" IRP_MN_STOP_DEVICE received\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_STOP_DEVICE:
|
case IRP_MN_QUERY_STOP_DEVICE:
|
||||||
DPRINT1(" IRP_MN_QUERY_STOP_DEVICE received\n");
|
DPRINT(" IRP_MN_QUERY_STOP_DEVICE received\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_CANCEL_STOP_DEVICE:
|
case IRP_MN_CANCEL_STOP_DEVICE:
|
||||||
DPRINT1(" IRP_MN_CANCEL_STOP_DEVICE\n");
|
DPRINT(" IRP_MN_CANCEL_STOP_DEVICE\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_DEVICE_RELATIONS:
|
case IRP_MN_QUERY_DEVICE_RELATIONS:
|
||||||
DPRINT1(" IRP_MN_QUERY_DEVICE_RELATIONS\n");
|
DPRINT(" IRP_MN_QUERY_DEVICE_RELATIONS\n");
|
||||||
|
|
||||||
switch (IrpSp->Parameters.QueryDeviceRelations.Type)
|
switch (IrpSp->Parameters.QueryDeviceRelations.Type)
|
||||||
{
|
{
|
||||||
case BusRelations:
|
case BusRelations:
|
||||||
DPRINT1(" IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n");
|
DPRINT(" IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n");
|
||||||
Status = FdcFdoQueryBusRelations(DeviceObject, &DeviceRelations);
|
Status = FdcFdoQueryBusRelations(DeviceObject, &DeviceRelations);
|
||||||
Information = (ULONG_PTR)DeviceRelations;
|
Information = (ULONG_PTR)DeviceRelations;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RemovalRelations:
|
case RemovalRelations:
|
||||||
DPRINT1(" IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / RemovalRelations\n");
|
DPRINT(" IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / RemovalRelations\n");
|
||||||
return ForwardIrpAndForget(DeviceObject, Irp);
|
return ForwardIrpAndForget(DeviceObject, Irp);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DPRINT1(" IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n",
|
DPRINT(" IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n",
|
||||||
IrpSp->Parameters.QueryDeviceRelations.Type);
|
IrpSp->Parameters.QueryDeviceRelations.Type);
|
||||||
return ForwardIrpAndForget(DeviceObject, Irp);
|
return ForwardIrpAndForget(DeviceObject, Irp);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_SURPRISE_REMOVAL:
|
case IRP_MN_SURPRISE_REMOVAL:
|
||||||
DPRINT1(" IRP_MN_SURPRISE_REMOVAL received\n");
|
DPRINT(" IRP_MN_SURPRISE_REMOVAL received\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
#include "fdc.h"
|
#include "fdc.h"
|
||||||
|
|
||||||
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
/* FUNCTIONS ******************************************************************/
|
/* FUNCTIONS ******************************************************************/
|
||||||
|
@ -56,22 +57,22 @@ FdcPdoQueryId(
|
||||||
switch (IrpSp->Parameters.QueryId.IdType)
|
switch (IrpSp->Parameters.QueryId.IdType)
|
||||||
{
|
{
|
||||||
case BusQueryDeviceID:
|
case BusQueryDeviceID:
|
||||||
DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryDeviceID\n");
|
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryDeviceID\n");
|
||||||
SourceString = &DeviceExtension->DeviceId;
|
SourceString = &DeviceExtension->DeviceId;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BusQueryHardwareIDs:
|
case BusQueryHardwareIDs:
|
||||||
DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n");
|
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n");
|
||||||
SourceString = &DeviceExtension->HardwareIds;
|
SourceString = &DeviceExtension->HardwareIds;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BusQueryCompatibleIDs:
|
case BusQueryCompatibleIDs:
|
||||||
DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryCompatibleIDs\n");
|
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryCompatibleIDs\n");
|
||||||
SourceString = &DeviceExtension->CompatibleIds;
|
SourceString = &DeviceExtension->CompatibleIds;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BusQueryInstanceID:
|
case BusQueryInstanceID:
|
||||||
DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryInstanceID\n");
|
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryInstanceID\n");
|
||||||
SourceString = &DeviceExtension->InstanceId;
|
SourceString = &DeviceExtension->InstanceId;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -102,7 +103,7 @@ FdcPdoPnp(
|
||||||
ULONG_PTR Information = 0;
|
ULONG_PTR Information = 0;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DPRINT1("FdcPdoPnp()\n");
|
DPRINT("FdcPdoPnp()\n");
|
||||||
|
|
||||||
Status = Irp->IoStatus.Status;
|
Status = Irp->IoStatus.Status;
|
||||||
|
|
||||||
|
@ -119,24 +120,24 @@ FdcPdoPnp(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_BUS_INFORMATION:
|
case IRP_MN_QUERY_BUS_INFORMATION:
|
||||||
DPRINT1("IRP_MN_QUERY_BUS_INFORMATION received\n");
|
DPRINT("IRP_MN_QUERY_BUS_INFORMATION received\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_CAPABILITIES:
|
case IRP_MN_QUERY_CAPABILITIES:
|
||||||
DPRINT1("IRP_MN_QUERY_CAPABILITIES received\n");
|
DPRINT("IRP_MN_QUERY_CAPABILITIES received\n");
|
||||||
Status = FdcPdoQueryCapabilities(DeviceObject, IrpSp);
|
Status = FdcPdoQueryCapabilities(DeviceObject, IrpSp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_DEVICE_RELATIONS:
|
case IRP_MN_QUERY_DEVICE_RELATIONS:
|
||||||
DPRINT1("IRP_MN_QUERY_DEVICE_RELATIONS received\n");
|
DPRINT("IRP_MN_QUERY_DEVICE_RELATIONS received\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_DEVICE_TEXT:
|
case IRP_MN_QUERY_DEVICE_TEXT:
|
||||||
DPRINT1("IRP_MN_QUERY_DEVICE_TEXT received\n");
|
DPRINT("IRP_MN_QUERY_DEVICE_TEXT received\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_ID:
|
case IRP_MN_QUERY_ID:
|
||||||
DPRINT1("IRP_MN_QUERY_ID received\n");
|
DPRINT("IRP_MN_QUERY_ID received\n");
|
||||||
Status = FdcPdoQueryId(DeviceObject, IrpSp, &Information);
|
Status = FdcPdoQueryId(DeviceObject, IrpSp, &Information);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -145,11 +146,11 @@ FdcPdoPnp(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_RESOURCE_REQUIREMENTS:
|
case IRP_MN_QUERY_RESOURCE_REQUIREMENTS:
|
||||||
DPRINT1("IRP_MN_QUERY_RESOURCE_REQUIREMENTS received\n");
|
DPRINT("IRP_MN_QUERY_RESOURCE_REQUIREMENTS received\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_RESOURCES:
|
case IRP_MN_QUERY_RESOURCES:
|
||||||
DPRINT1("IRP_MN_QUERY_RESOURCES received\n");
|
DPRINT("IRP_MN_QUERY_RESOURCES received\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_SET_LOCK:
|
case IRP_MN_SET_LOCK:
|
||||||
|
@ -157,7 +158,7 @@ FdcPdoPnp(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_START_DEVICE:
|
case IRP_MN_START_DEVICE:
|
||||||
DPRINT1("IRP_MN_START_DEVICE received\n");
|
DPRINT("IRP_MN_START_DEVICE received\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_STOP_DEVICE:
|
case IRP_MN_QUERY_STOP_DEVICE:
|
||||||
|
@ -170,11 +171,11 @@ FdcPdoPnp(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_REMOVE_DEVICE:
|
case IRP_MN_REMOVE_DEVICE:
|
||||||
DPRINT1("IRP_MN_REMOVE_DEVICE received\n");
|
DPRINT("IRP_MN_REMOVE_DEVICE received\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_FILTER_RESOURCE_REQUIREMENTS:
|
case IRP_MN_FILTER_RESOURCE_REQUIREMENTS:
|
||||||
DPRINT1("IRP_MN_FILTER_RESOURCE_REQUIREMENTS received\n");
|
DPRINT("IRP_MN_FILTER_RESOURCE_REQUIREMENTS received\n");
|
||||||
/* Nothing to do */
|
/* Nothing to do */
|
||||||
Irp->IoStatus.Status = Status;
|
Irp->IoStatus.Status = Status;
|
||||||
break;
|
break;
|
||||||
|
@ -188,7 +189,7 @@ FdcPdoPnp(
|
||||||
Irp->IoStatus.Status = Status;
|
Irp->IoStatus.Status = Status;
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
|
|
||||||
DPRINT1("Leaving. Status 0x%X\n", Status);
|
DPRINT("Leaving. Status 0x%X\n", Status);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue