Hi all,
I develop a USB device.
I would like to know, what to do, if I send a IRP for IN transfer (OUT
transfer) from my USB driver to lower level driver and my USB device doesn't
send (receive) any data (only "NAKs" are on the USB bus).
Therefore should be useful to set a timeout.
Is it possible to set the timeout in my USB driver or firmware in the USB
device sould resolve this problem?
If I use something like this:
...
ntStatus = IoCallDriver(pdx->StackDeviceObject, irp);
if (ntStatus == STATUS_PENDING)
{
status = KeWaitForSingleObject(
&event,
Executive,
KernelMode,
FALSE,
&timeOut);
if( status == STATUS_TIMEOUT ) {
IoCancelIrp( irp );
KeWaitForSingleObject(&event, Executive, KernelMode, FALSE, NULL);
}
}
on win98 if I set the timeout about 100ms has been result
BytesTransfered = urb->UrbBulkOrInterruptTransfer.TransferBufferLength;
0x400 but through USB bus has bees transmitted 0x440 bytes.
I don't know why this situation occured.
Does anybody help me please?
Thanks a lot
Slavo Tomascik
msonetime@zoznam.sk