Signal USB device arrivals to PnP manager
authorHervé Poussineau <hpoussin@reactos.org>
Sun, 11 Sep 2005 13:55:23 +0000 (13:55 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Sun, 11 Sep 2005 13:55:23 +0000 (13:55 +0000)
svn path=/trunk/; revision=17800

reactos/drivers/usb/usbhub/usbhub.c
reactos/drivers/usb/usbport/hcd.h
reactos/drivers/usb/usbport/hub.c
reactos/drivers/usb/usbport/usb.c

index e4d1ca0..e7aacf0 100644 (file)
@@ -99,6 +99,7 @@ UsbhubAddDevice(
                IoDeleteDevice(Fdo);
                return Status;
        }
+       DeviceExtension->dev->dev.dev_ext = Pdo;
        
        DeviceExtension->IsFDO = TRUE;
        Fdo->Flags |= DO_POWER_PAGABLE;
index 5b6a6a0..e2454de 100644 (file)
@@ -453,7 +453,14 @@ extern void usbfs_cleanup(void);
 
 static inline void usbfs_add_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_update_special (void) {}
 
index e3732ff..a348315 100644 (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) */
                if (!usb_new_device(dev, &hub->dev)) {
                        hub->children[port] = dev;
+                       usbfs_add_device(dev);
                        goto done;
                }
 
index 5a4ba48..f9b936f 100644 (file)
@@ -1259,7 +1259,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
                usb_create_driverfs_intf_files (interface);
        }
        /* add a /proc/bus/usb entry */
-       usbfs_add_device(dev);
+       //usbfs_add_device(dev);
 
        return 0;
 fail: