From: Michael on
I have a WDF driver that supports a PCIe device running on XPe. If I hot
remove the device, the EvtDeviceSurpriseRemoval callback does not get called.
Does Windows XP support hot plugging of PCIe devices? If the driver is able
to detect that the device was removed, how can it report the missing device
and shutdown the driver cleanly? Also, is there a risk that a read to a PCIe
address will hang the processor indefinitley if the device has been removed
without the bus driver detecting the removal?

Thanks!
From: Doron Holan [MSFT] on
Why do you need to register EvtDeviceSurpriseRemoval ? it is a specialized
function that really has very little use in a kmdf driver, the std power
up/down callbacks suffice in 99% of the cases

XP does not support PCIe natively, it would be interacting with the PCIe bus
in legacy mode (PCI). IIRC, you need a special driver to support hotplug
PCI on any windows platform. If you detect that your device has been
removed, you can call WdfDeviceSetFailed. As for an unclaimed bus cycle on
the bus by rying to communicate with a surprise removed device, it depends
on the bios. on some server machines, an unclaimed cycle will lead to a
machine check. on such a system which also supports hot plug PCI, the PCI
device is still gracefully removed before removal so the driver can quiesce
activity before removal. on a std desktop machine, it has no effect and
life goes on.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Michael" <Michael(a)discussions.microsoft.com> wrote in message
news:94D4F2AF-537F-425E-945B-40AA0E92167E(a)microsoft.com...
>I have a WDF driver that supports a PCIe device running on XPe. If I hot
> remove the device, the EvtDeviceSurpriseRemoval callback does not get
> called.
> Does Windows XP support hot plugging of PCIe devices? If the driver is
> able
> to detect that the device was removed, how can it report the missing
> device
> and shutdown the driver cleanly? Also, is there a risk that a read to a
> PCIe
> address will hang the processor indefinitley if the device has been
> removed
> without the bus driver detecting the removal?
>
> Thanks!