/* This function could be updated to check more types of Hot Plug devices. Currently, it checks USB and PCCard device. */
BOOLEAN IsHotPlugDevice(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
/* This function could be updated to check more types of Hot Plug devices. Currently, it checks USB and PCCard device. */
BOOLEAN IsHotPlugDevice(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
{
  EFI_DEVICE_PATH_PROTOCOL  *CheckDevicePath;
  CheckDevicePath = DevicePath;
  while (!IsDevicePathEnd (CheckDevicePath)) {
    if ((DevicePathType (CheckDevicePath) == MESSAGING_DEVICE_PATH) &&
        ((DevicePathSubType (CheckDevicePath) == MSG_USB_DP) ||
         (DevicePathSubType (CheckDevicePath) == MSG_USB_CLASS_DP) ||
         (DevicePathSubType (CheckDevicePath) == MSG_USB_WWID_DP)))
    {
      return TRUE;
    }
    if ((DevicePathType (CheckDevicePath) == HARDWARE_DEVICE_PATH) &&
        (DevicePathSubType (CheckDevicePath) == HW_PCCARD_DP))
    {
      return TRUE;
    }
    CheckDevicePath = NextDevicePathNode (CheckDevicePath);
  }
  return FALSE;
}