2
votes

I need to find USB Host Controller by plugged USB device. I need it to set a specific registry key for that controller which is required to fix KB928631. I am able to get device handle and get the parent device handle using CM_Get_Parent() function.

Unfortunately, there is no information about number of HUBs, so I don’t know how many times CM_Get_Parent() should be called to reach the Host Controller.

Is there any Controller specific data which could be used to differentiate it from HUB?

Currently I am getting CM_DRP_LOCATION_INFORMATION property to and determine whether the string returned by the property started by "PCI bus". If so assume that current device is Host Controller. Is this a reliable solution?

1

1 Answers

0
votes

At my answer here, I mention that the "Enumerator" property is better for this than "Location".