Signal USB device arrivals to PnP manager

svn path=/trunk/; revision=17800
This commit is contained in:
Hervé Poussineau 2005-09-11 13:55:23 +00:00
parent cde1a0c17d
commit 61420d12f3
4 changed files with 11 additions and 2 deletions

View file

@ -99,6 +99,7 @@ UsbhubAddDevice(
IoDeleteDevice(Fdo); IoDeleteDevice(Fdo);
return Status; return Status;
} }
DeviceExtension->dev->dev.dev_ext = Pdo;
DeviceExtension->IsFDO = TRUE; DeviceExtension->IsFDO = TRUE;
Fdo->Flags |= DO_POWER_PAGABLE; Fdo->Flags |= DO_POWER_PAGABLE;

View file

@ -453,7 +453,14 @@ extern void usbfs_cleanup(void);
static inline void usbfs_add_bus(struct usb_bus *bus) {} static inline void usbfs_add_bus(struct usb_bus *bus) {}
static inline void usbfs_remove_bus(struct usb_bus *bus) {} static inline void usbfs_remove_bus(struct usb_bus *bus) {}
static inline void usbfs_add_device(struct usb_device *dev) {} static inline void usbfs_add_device(struct usb_device *dev)
{
if (dev->parent)
{
PDEVICE_OBJECT Pdo = (PDEVICE_OBJECT)dev->parent->dev.dev_ext;
IoInvalidateDeviceRelations(Pdo, BusRelations);
}
}
static inline void usbfs_remove_device(struct usb_device *dev) {} static inline void usbfs_remove_device(struct usb_device *dev) {}
static inline void usbfs_update_special (void) {} static inline void usbfs_update_special (void) {}

View file

@ -1053,6 +1053,7 @@ static void hub_port_connect_change(struct usb_hub *hubstate, int port,
/* Run it through the hoops (find a driver, etc) */ /* Run it through the hoops (find a driver, etc) */
if (!usb_new_device(dev, &hub->dev)) { if (!usb_new_device(dev, &hub->dev)) {
hub->children[port] = dev; hub->children[port] = dev;
usbfs_add_device(dev);
goto done; goto done;
} }

View file

@ -1259,7 +1259,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
usb_create_driverfs_intf_files (interface); usb_create_driverfs_intf_files (interface);
} }
/* add a /proc/bus/usb entry */ /* add a /proc/bus/usb entry */
usbfs_add_device(dev); //usbfs_add_device(dev);
return 0; return 0;
fail: fail: