Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private/bryan/iotargetopen waitloop #51

Conversation

ManOnTheMountainTech
Copy link
Collaborator

@ManOnTheMountainTech ManOnTheMountainTech commented Feb 20, 2024

WdfIoTargetOpen Reliability Experiments

A thunk to pageable code is needed from IoRegisterPnPNotification in all options as WdfIoTargetOpen is pageable. The callback for RegisterPnPNotification runs at DPC.

Basic overview of code flow

  1. The SelfManagedIoinit handler registers a PnP notification handler.
  2. The PnP notification handler acts upon the arrival and departure of the IntelliMouse's interface No. 5.
  3. For IntelliMouse taillight device interface arrival, a finite wait loop is started that calls WdfIoTargetOpen until it succeeds.
  4. For IntelliMouse taillight device interface departure, if the WdfIoTargetOpen wait loop is executing, it is stopped.

This is option No. 3 of 3 options.

  1. Just call WdfIoTargetOpen from a workitem.
  2. Use a timer to set up a retry system. The timer creates a workitem that then calls WdfIoTargetOpen.
  3. Use a wait loop inside a workitem. The workitem then calls WdfIoTargetOpen.

Tested for several days on one machine. There have been no failures of WdfIoTargetOpen.

This PR fixes issue #44.

@ManOnTheMountainTech ManOnTheMountainTech self-assigned this Feb 20, 2024
@ManOnTheMountainTech ManOnTheMountainTech added the bug Something isn't working label Feb 20, 2024
@ManOnTheMountainTech ManOnTheMountainTech linked an issue Feb 20, 2024 that may be closed by this pull request
@forderud
Copy link
Owner

Suggest that you slim down the PR to only perform the IoRegisterPlugPlayNotification stuff, so that we reduce the amount of code complexity required for fixing issue #44.

@ManOnTheMountainTech
Copy link
Collaborator Author

ManOnTheMountainTech commented Feb 20, 2024 via email

@forderud
Copy link
Owner

Do you want certmgr.exe, for installing certificates, to be checked in or have instructions for where to get it?

certmgr.exe is automatically in PATH if using a developer command prompt. It should therefore be sufficient to document usage of a "developer command prompt".

@ManOnTheMountainTech ManOnTheMountainTech deleted the private/bryan/iotargetopen_waitloop branch February 21, 2024 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tail-light clearing doesn't work when rebooting
2 participants