Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S940282AbXHIPIU (ORCPT ); Thu, 9 Aug 2007 11:08:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S935348AbXHIPII (ORCPT ); Thu, 9 Aug 2007 11:08:08 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:57960 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S936647AbXHIPIG (ORCPT ); Thu, 9 Aug 2007 11:08:06 -0400 Date: Thu, 9 Aug 2007 11:08:03 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Andrew Morton cc: Jonathan Corbet , , , Roman Zippel , , Thomas Gleixner , Molnar Subject: Re: [linux-usb-devel] [PATCH] msleep() with hrtimers In-Reply-To: <20070809001640.ec2f3bfb.akpm@linux-foundation.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2083 Lines: 51 On Thu, 9 Aug 2007, Andrew Morton wrote: > This failed the Vaio test. I guess it triggered a USB bug. > > With this patch applied, when I hotplug my wireless mouse, the little LED > on the mouse comes on for a second or so then goes out and no pointy clicky > for me. > > It says: > > [ 152.481522] usb 1-1: new low speed USB device using uhci_hcd and address 2 > > > Without this patch applied, I get > > [ 195.935445] usb 2-1: new low speed USB device using uhci_hcd and address 2 > [ 196.116183] usb 2-1: configuration #1 chosen from 1 choice > [ 196.198362] input: Microsoft Microsoft Wireless Optical Mouse 1.00 as /class/input/input7 > [ 196.223724] input: USB HID v1.11 Mouse [Microsoft Microsoft Wireless Optical Mouse 1.00] on usb-0000:00:1d.1-1 > [ 196.224570] usb 2-1: new device found, idVendor=045e, idProduct=00e1 > [ 196.224579] usb 2-1: new device strings: Mfr=1, Product=2, SerialNumber=0 > [ 196.224585] usb 2-1: Product: Microsoft Wireless Optical Mouse 1.00 > [ 196.224590] usb 2-1: Manufacturer: Microsoft > > and lots of pointy clickiness. > > I would assume that there is some msleep() in USB which is too short, and > the present wild rounding-up which msleep() does covered up the > incorrectly-chosen sleep duration. > > I'm using HZ=250 (http://userweb.kernel.org/~akpm/config-sony.txt) and it > could well be that the mouse would fail just by going to HZ=1000, but I > didn't bother testing that. > > Could one of the USB developers please suggest which msleep()(s) I should > start looking at? It could be one of the calls in drivers/usb/core/hub.c, however almost all of them are at least 10 ms already. There's a 0-ms msleep near the start of hub_port_wait_reset() which might cause problems. It will be easier to pin down the culprit if you turn on CONFIG_USB_DEBUG. Alan Stern - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/