From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56697 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNqCu-0002jk-JT for qemu-devel@nongnu.org; Wed, 01 Dec 2010 12:11:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNqCt-0008JZ-3I for qemu-devel@nongnu.org; Wed, 01 Dec 2010 12:11:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33100) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNqCs-0008J4-Rv for qemu-devel@nongnu.org; Wed, 01 Dec 2010 12:11:03 -0500 Date: Wed, 1 Dec 2010 14:58:21 -0200 From: Marcelo Tosatti Message-ID: <20101201165821.GA13677@amt.cnet> References: <20101125170439.548474575@redhat.com> <20101125170602.676792336@redhat.com> <4CF665CE.70600@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CF665CE.70600@redhat.com> Subject: [Qemu-devel] Re: [patch 2/2] support for UHCI suspend / remote wake up List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Matthew Garrett , Adam Jackson , qemu-devel@nongnu.org, kvm , Glauber de Oliveira Costa On Wed, Dec 01, 2010 at 04:12:14PM +0100, Gerd Hoffmann wrote: > On 11/25/10 18:04, Marcelo Tosatti wrote: > >This patch enables USB UHCI global suspend/resume feature. The OS will > >stop the HC once all ports are suspended. If there is activity on the > >port(s), an interrupt signalling remote wakeup will be triggered. > > > >To enable autosuspend for the USB tablet on Linux guests: > > > >echo auto> /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/power/level > > Hmm, did you ever got this working sanely? Yes. Linux and Windows. > /me sees bus disconnects in the guest ... I was seeing bus disconnects when not clearing port resume bit properly. > > port->ctrl&= ~(val& 0x000a); > >+ port->ctrl&= ~(port->ctrl& 0x0040); /* clear port resume detected */ > > } > > This chunk looks suspicious ... > > I suspect the port suspend/resume emulation isn't complete. > > /me goes debugging, > Gerd CONFIG_USB_DEBUG helps.