Assume that your driver uses User-Mode Driver Framework (UMDF) version 2.0 in Windows operating systems. You notice that the time-out value of I/O operation is 10 times shorter than the specified value.
For example, if you call the WdfIoTargetSendWriteSynchronously function as follows, the write request is expected to cause a time-out to occur after 10 milliseconds. However, the time-out occurs after 1 millisecond.
WDF_REQUEST_SEND_OPTIONS reqOptions;WDF_REQUEST_SEND_OPTIONS_INIT(&reqOptions, WDF_REQUEST_SEND_OPTION_TIMEOUT); // We specify 10 milliseconds as a timeout.WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT(&reqOptions, WDF_REL_TIMEOUT_IN_MS(10));WdfIoTargetSendWriteSynchronously(ioTarget, request, &memDescr, NULL, & reqOptions, &bytesWritten);
The issue occurs because the time-out calculation in UMDF 2.0 is incorrect.
The issue is fixed in Windows 10, Version 1511. If your driver uses a system that is earlier than Windows 10, Version 1511, you can increase the time-out value by a factor of 10.