All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Butterworth <harry@hebutterworth.freeserve.co.uk>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: xen-devel@lists.xensource.com, linux-usb-devel@lists.sourceforge.net
Subject: Re: [linux-usb-devel] Error recovery in Xen's paravirtualizing USB driver for Linux
Date: Wed, 07 Dec 2005 22:15:20 +0000	[thread overview]
Message-ID: <1133993720.5004.11.camel@localhost> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0512071419410.22006-100000@iolanthe.rowland.org>

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@hebutterworth.freeserve.co.uk>

  reply	other threads:[~2005-12-07 22:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-07 18:31 Error recovery in Xen's paravirtualizing USB driver for Linux harry
2005-12-07 19:35 ` Alan Stern
2005-12-07 22:15   ` Harry Butterworth [this message]
2005-12-08 15:20     ` Alan Stern
2005-12-08 15:59       ` [linux-usb-devel] " Harry Butterworth
2005-12-08 16:20         ` Alan Stern
2005-12-08 17:41           ` [linux-usb-devel] " Harry Butterworth
2005-12-08 18:53             ` Alan Stern
2005-12-08 22:24               ` [linux-usb-devel] " Harry Butterworth
2005-12-09  0:44           ` Greg KH
2005-12-09 11:03             ` [linux-usb-devel] " Harry Butterworth
2005-12-09 16:11             ` Alan Stern
2005-12-09 18:50               ` Harry Butterworth
2005-12-09 19:02                 ` Alan Stern
2005-12-10  4:10               ` Greg KH
2005-12-07 23:00 ` Pete Zaitcev
2005-12-07 23:25   ` [linux-usb-devel] " Harry Butterworth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1133993720.5004.11.camel@localhost \
    --to=harry@hebutterworth.freeserve.co.uk \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=stern@rowland.harvard.edu \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.