IOCTL_SCSI_EXECUTE_NONE in disk lower filter driver

I installed a lower disk filter driver. I need to see the IOCTLs being issued by the class driver. class driver sends IOCTL_SCSI_EXECUTE_NONE in it’s AddDevice -> ClassClaimDevice routine. But my lower filter driver never get to meet this ioctl. Even though I see in the debugger that ClassClaimDevice (LowerDeviceObject, Release) was called with the device object of my lower filter driver. I verified in the debugger that my lower filter created device object is in the stack at the correct place. Following is my code. Is lower filter driver the correct place to capture this ioctl ?

NTSTATUS
LowerFltrDeviceControl(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
)
{
PDEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension;
PIO_STACK_LOCATION currentIrpStack = IoGetCurrentIrpStackLocation(Irp);

if (currentIrpStack->Parameters.DeviceIoControl.IoControlCode ==
IOCTL_SCSI_EXECUTE_NONE) {
// I never get here
DbgPrintEx (DPFLTR_IHVDRIVER_ID,
DPFLTR_ERROR_LEVEL,
“IOCTL_SCSI_EXECUTE_NONE detected\n”);
}

return (LowerFltrSendToNextDriver (DeviceObject, Irp));
}

IOCTL_SCSI_EXECUTE_NONE comes from a storage class driver to a SCSI port driver.
I would suggest you to install a class upper filter driver on SCSIAdapter class (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4D36E97B-E325-11CE-BFC1-08002BE10318}) and see if this filter gets the IOCTL. I guess, your lower filter is below the SCSI port driver and does not get this IOCTL because it completed in the port driver.
Does your filter gets any IOCTLs from your class driver?

Igor Sharovar

I agree with Igor. The IOCTL is most-likely being sent by the class driver to the adapter’s FDO, not to the disk’s PDO. Thus, to catch such IOCTLs, you’d need an upper filter on the adapter.

– Keith

>I agree with Igor. The IOCTL is most-likely being sent by the class driver to the adapter’s FDO, not to

the disk’s PDO. Thus, to catch such IOCTLs, you’d need an upper filter on the adapter.

Was not this disabled in around Server 2003 for all claimed devices?


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Was what disabled?

– Keith