From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Wed, 20 Mar 2002 17:19:57 +0000 Subject: Re: [PATCH] fix some hubs and hid devices at startup Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wed, Mar 20, 2002 at 03:53:47PM +0100, Olaf Hering wrote: > That patch does indeed fix the problem with some devices, sometimes you > even need a sleep 5. > > But since all that runs in background the bootscripts will continue to > run. And if gpm wants the /dev/input/mice node and the mousedriver is > not loaded ... > Or printer.o and rclpd, everything fails :) > > The delay has to be added, either to the hotplug scripts or to the > usbdevfs core. But it will delay the driver loading in both cases, so > the startup scripts may fail. It depends on your configuration and the > speed of your cpu and/or IO. Yes, it's a bandage over the real problem, sorry. But here's a patch from Itai Nahshon that seems to fix a lot of problems that he was having with the latest 2.4.19-pre3 USB code when a device is connected to the bus. It also seems to fix a lot of issues a few keyboards and hubs that I was seeing here. I've applied this to both the 2.4 and 2.5 trees. thanks, greg k-h diff -Nru a/drivers/usb/hub.c b/drivers/usb/hub.c --- a/drivers/usb/hub.c Wed Mar 20 09:15:02 2002 +++ b/drivers/usb/hub.c Wed Mar 20 09:15:02 2002 @@ -655,11 +655,11 @@ * Not covered by the spec - but easy to deal with. * * This implementation uses 400ms minimum debounce timeout and checks - * every 10ms for transient disconnects to restart the delay. + * every 100ms for transient disconnects to restart the delay. */ #define HUB_DEBOUNCE_TIMEOUT 400 -#define HUB_DEBOUNCE_STEP 10 +#define HUB_DEBOUNCE_STEP 100 /* return: -1 on error, 0 on success, 1 on disconnect. */ static int usb_hub_port_debounce(struct usb_device *hub, int port) _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel