How to simulates a device unplug and replug on a PDO? RRS feed

  • Question

  • Hi, i write a driver which simulates a device unplug and replug on a USB PDO by IOCTL_INTERNAL_USB_CYCLE_PORT(only apply to USB), is there other more universal approach to do this? IoInvalidateDeviceRelations(BusRelations)? thanks.
    Thursday, January 17, 2013 9:05 AM


  • there is no generic way to tell a bus driver to reenumerate a PDO.  there is REENUMERATE_SELF_INTERFACE_STANDARD, http://msdn.microsoft.com/en-us/library/windows/hardware/gg604855(v=vs.85).aspx, which is a more generic version of cycle port that SOME bus drivers implement.  KMDF will implement this interface for you in a bus driver that uses a WDFCHILDLIST to enumerate PDOs.  as an FDO, WdfDeviceSetFailed will query for this interface and ask for reenumeration if it is supported

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, January 17, 2013 8:10 PM