[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH]UHC should not generate interrupt when USBdevice returns NAK


  • To: "Huang, Xinmei" <xinmei.huang@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxxxxxxxx>
  • Date: Fri, 08 Dec 2006 06:36:59 +0000
  • Delivery-date: Thu, 07 Dec 2006 22:37:17 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AccYIFUctQo+acaFStST+nWBI8j1CgACMYGgAJiXCUAAAfLv5A==
  • Thread-topic: [Xen-devel] [PATCH]UHC should not generate interrupt when USBdevice returns NAK

It's checked in but nothing has pushed from our staging tree in the last 24
hours.

 -- Keir

On 8/12/06 6:34 am, "Huang, Xinmei" <xinmei.huang@xxxxxxxxx> wrote:

> 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>
>> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.