WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [PATCH]UHC should not generate interrupt when USBdevice

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH]UHC should not generate interrupt when USBdevice returns NAK
From: "Huang, Xinmei" <xinmei.huang@xxxxxxxxx>
Date: Fri, 8 Dec 2006 14:34:25 +0800
Delivery-date: Thu, 07 Dec 2006 22:34:37 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AccYIFUctQo+acaFStST+nWBI8j1CgACMYGgAJiXCUA=
Thread-topic: [Xen-devel] [PATCH]UHC should not generate interrupt when USBdevice returns NAK
Hi all,
Is there any comment on this patch?

Current HID(mouse/tablet) emulator in qemu-dm persistently returns a data in an 
INTERRUPT transfer, even if the device (mouse/tablet) keeps the same status as 
the last interrupt transfer.
This behavior does not reflect the HID/USB/UHCI spec. According to HID spec, 
USB HID device (using interrupt pipe) will return an NAK indicate no interrupt 
pending(i.e. no data needs to be transferred).
Current HID always returns a data package, notifying UHC the device have data 
to transfer and a interrupt on complete will generate at the end of the frame 
in which this interrupt transfer is completed. In fact, most of these 
interrupts are useless and time-consuming.
UHC should let a TD active if receiving an NAK (in non-setup transaction) and 
will not generate an interrtupt on complete for this TD. But current UHC 
emulator in qemu-dm behaves like this: 
        1)update int_mask when a TD is fetched
        2)check int_mask to decide to generate an interrupt or not after this 
TD is executed.If NAK is return when executing this TD, an interrupt on 
complete, which is unwanted, will still be generated.

This patch makes the UHC and HID device emulators work consistently with spec, 
decreasing unwanted interrupts to Guest OS.
 


>-----Original Message-----
>From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
>[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
>Huang, Xinmei
>Sent: 2006年12月5日 12:53
>To: xen-devel@xxxxxxxxxxxxxxxxxxx
>Subject: [Xen-devel] [PATCH]UHC should not generate interrupt 
>when USBdevice returns NAK
>
> 
>This patch adds support for USB mouse/tablet status check and restricts
>Universal Host Controller interrupt generating when received NAK in
>interrupt transfer.
>
>According to usb spec, USB mouse/tablet device returns NAK to host
>controller if its status does not alter in interrupt transfer.
>And UHC should leave a TD active when receiving NAK and execute this
>incompleted TD in a subseqent frame. 
>UHC only generates an interrupt on complete after the TD with ICO bit=1
>is completed.
>
>This patch obliges UHC & USB mouse/tablet to behave consistently with
>spec.
>
>
>Signed-off-by: Xinmei Huang <xinmei.huang@xxxxxxxxx>
>

Attachment: usb.uhci.patch
Description: usb.uhci.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>