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

bcm2836sdhc & rpisdhc cause a crash when unloaded #24

Open
mariobalanica opened this issue Apr 3, 2021 · 4 comments
Open

bcm2836sdhc & rpisdhc cause a crash when unloaded #24

mariobalanica opened this issue Apr 3, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@mariobalanica
Copy link
Collaborator

From WinDbg:

PNP_DETECTED_FATAL_ERROR (ca)
PnP encountered a severe error, either as a result of a problem in a driver or
a problem in PnP itself. The first argument describes the nature of the
problem, the second argument is the address of the PDO. The other arguments
vary depending on argument 1.
Arguments:
Arg1: 0000000000000014, Device removed without disconnecting interrupts
Driver failed to disconnect interrupts when the device was
removed.
Arg2: ffffe00b37049b20, PDO.
Arg3: 0000000000000008
Arg4: 0000000000000000

All drivers based on https://github.com/microsoft/Windows-driver-samples/tree/master/sd/miniport/sdhc exhibit this issue.

Recent updates to the final release of Windows seem to cause a driver reset during the first boot, so users are not able to complete the installation process.

@mariobalanica mariobalanica added the bug Something isn't working label Apr 3, 2021
@CE1CECL
Copy link

CE1CECL commented Apr 4, 2021

Which build of windows is this on?

@mariobalanica
Copy link
Collaborator Author

mariobalanica commented Apr 4, 2021

I'm only testing builds 19041 and newer. The unload issue happens on all the builds in this range, but recent updates to 19041/2 make it worse by causing a driver reset during the first boot of a clean installation.

According to @idigdoug, sdport.sys is actually responsible for detaching the interrupts, but it fails to do so.

@idigdoug
Copy link
Contributor

idigdoug commented Apr 5, 2021

There is a known bug in sdport.sys that causes a consistent crash on unload. This has been fixed in Windows build 21343, but that doesn't help those who can't update to that version yet.

There is a known bug in bcm2836sdhc.sys that causes a consistent crash on unload. PR open with a fix for that.

There appears to be a not-yet-understood bug in sdport.sys that causes a crash if you load more than one miniport (e.g. load both rpisdhc and bcm2836sdhc) and then unload them.

There appears to be a not-yet-understood bug in sdport.sys such that when you try to unload a miniport, sdport disables the miniport but doesn't unload it, so you can't actually replace or restart the miniport without a reboot.

@mariobalanica
Copy link
Collaborator Author

mariobalanica commented Apr 6, 2021

Merged the pull request.
I'll keep this issue open until the sdport bug gets fixed in a stable release of Windows.

Thanks for the info!

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

No branches or pull requests

3 participants