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

[Xen-devel] Re: [linux-usb-devel] Error recovery in Xen's paravirtualizi

To: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [linux-usb-devel] Error recovery in Xen's paravirtualizing USB driver for Linux
From: Harry Butterworth <harry@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Dec 2005 22:15:20 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 07 Dec 2005 22:11:34 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <Pine.LNX.4.44L0.0512071419410.22006-100000@xxxxxxxxxxxxxxxxxxxx>
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>
References: <Pine.LNX.4.44L0.0512071419410.22006-100000@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2005-12-07 at 14:35 -0500, Alan Stern wrote:

> >     I did have a problem with URBs getting reordered on their way
> > between the front-end and the back-end which led to miscompares where
> > the correct bulk data was written on the USB key but at the wrong LBA. I
> > fixed this by maintaining submission ordering in the URB queue from
> > front-end to back-end.
> 
> Clearly this is necessary for any queue, not just queues of USB URBs.

Some queues, for example sets of SCSI queue simple commands, are allowed
to be reordered.  This is useful for rotational position optimisation on
single disk drives and concurrency on RAID arrays.  Ordering makes sense
for USB though---it just didn't click with me immediately.

> Failing isn't the right approach.  The back-end should unlink all those 
> URBs but keep them available, so that they can be resubmitted if 
> necessary.  When the front-end learns about the error, it has the option 
> of unlinking the URBs or not -- if it doesn't unlink them then the 
> back-end should resubmit them.  Likewise for URBs received from the front 
> end before the flag is cleared; they should be kept on the queue so that 
> they can be submitted when the front-end's completion routine returns.

Thanks.  This is exactly the information I was looking for.

> Suspend/resume is liable to cause trouble.  For instance, what happens to 
> the various front-ends if the back-end decides to suspend a USB device?

I don't know.  Could you explain this scenario in more detail (imagine
that none of the 800 page USB spec sunk in when I read it :-).  What
should happen in this case?

-- 
Harry Butterworth <harry@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>


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