Tech Support > Microsoft Windows > Drivers > IRQL_NOT_LESS_OR_EQUAL
IRQL_NOT_LESS_OR_EQUAL
Posted by F. Hartge on July 1st, 2003


Why could this code crash with "IRQL_NOT..."?

NTSTATUS USBBase::StartDataUrb(IN UCHAR data[4])
{
NTSTATUS status = STATUS_SUCCESS;

// Initialize the URB we use for writing the pipe
PURB urb = this->DataUrbMidi01;
USBD_PIPE_HANDLE Handle = this->MidiOut01;
ULONG urbflags = USBD_SHORT_TRANSFER_OK;
ULONG size = 4;
PUCHAR Data = data;
if (this->FirstStart) {
Data = ACTIVATION;
this->FirstStart = FALSE;
}

UsbBuildInterruptOrBulkTransferRequest(urb, sizeof
(_URB_BULK_OR_INTERRUPT_TRANSFER),
Handle, Data, NULL, size, urbflags, NULL);

PIRP Irp = this->DataIrpMidi01;
PIO_STACK_LOCATION stack =
IoGetNextIrpStackLocation(Irp);

stack->MajorFunction =
IRP_MJ_INTERNAL_DEVICE_CONTROL;
stack->Parameters.DeviceIoControl.IoControlCode =
IOCTL_INTERNAL_USB_SUBMIT_URB;
stack->Parameters.Others.Argument1 = (PVOID) urb;

Irp->Cancel = FALSE;

ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL);
status = IoCallDriver(lowerDO, Irp);

!!! At this point!!!

return status;
}
Because of debug messages (code is deleted here) I know
the moment of system crash. It has to be somewhere in or
slightly after IoCallDriver(...). The routine is called
at passive level.
I'm thankfull for any suggestions.

Posted by F. Hartge on July 1st, 2003


It is part of an USB driver.


Similar Posts