What is the sequence of IRPs or calls that happens after HLK surprise removal test?

The Win2016 surprise removal test fails on our bus driver. While analysing the logs, I found that the HLK surprise removal “sub-task” actually passed. However, I see that after this test, the RestartDevice() has been queried.

After spending much time on the web reading articles, I am not able to find what the RestartDevice() and RescanParentDevice() actually does and what is the sequence of IRPs sent from the PnP manager in the process.

Some help in this regard would be highly appreciated.

Thanks in advance.