Open mariobalanica opened 3 years ago
Which build of windows is this on?
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.
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.
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!
From WinDbg:
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.