Hello Zhang,
Unfortunately when the upstream device is disconnected the downstream goes into a high Z state that is pulled to idle J by the pull-up. So there is no way to tell from downstream what the state of the upstream bus is. it just looks like it is idling. When a power good is needed, the quick and simple solution is to use a Darlington optocoupler to minimize the power required, to monitor the upstream power, and create your own power good signal. Or you could ignore it altogether and let the peripheral think it is connected. When the cable is plugged in again, it will re-enumerate and start working with a clean slate in any case.
Best Regards,
MSCantrell