When you connect or disconnect a terminal device from the USB, the host uses a process called as bus inventory to identify and manage the state of the terminal device. This process consists of several following steps:
In case of a disconnection of terminal device is sent the notice message to the hub and the host can update the local topology information.