From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Matthew Wilcox <willy@linux.intel.com>,
linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org,
USB Storage List <usb-storage@lists.one-eyed-alien.net>
Subject: Re: [usb-storage] Re: Make UAS work on HS for devices with and without command tagging support
Date: Fri, 16 Dec 2011 22:47:39 +0100 [thread overview]
Message-ID: <1324072059.10429.27.camel@dabdike> (raw)
In-Reply-To: <20111216213628.GA5509@xanatos>
On Fri, 2011-12-16 at 13:36 -0800, Sarah Sharp wrote:
> On Fri, Dec 16, 2011 at 09:42:41PM +0100, Sebastian Andrzej Siewior wrote:
> > * Matthew Wilcox | 2011-12-16 15:31:46 [-0500]:
> >
> > >On Fri, Dec 16, 2011 at 09:12:36PM +0100, Sebastian Andrzej Siewior wrote:
> > >> * Sebastian Andrzej Siewior | 2011-12-16 15:47:24 [+0100]:
> > >>
> > >> >>If you want to take a stab at redoing your patch #2 to use only one
> > >> >>status URB for USB 2.0 devices, I would appreciate it. Then I can build
> > >> >>the abort/reset synchronization on top of it.
> > >> >Okay.
> > >>
> > >> Just once things started to become easy.... So while I tried to have
> > >> only one status urb which I always re-submit (as Matthew/ You suggested)
> > >> I run into the problem that I don't have struct scsi_device yet. So I
> > >> just created a device with two luns to see if this struct happens always
> > >> to be same. Ofcourse it is not.
> > >
> > >Can you not send one status URB per LUN (instead of one per command)?
> >
> > The thing is by the time a status URB completes I have only the *TAG*
> > number from the device which tells to which command it belongs. Sending
> > one status per LUN does not help because once a status URB with TAG 1
> > arrived I have no idea to which device/LUN it does belong. ->context
> > does not help here at all.
>
> Oh, right, now I understand. With USB 2.0, we might have one status URB
> per LUN, but they're being queued to the same endpoint ring. Since the
> device can re-order the commands any way it likes, we can't rely on the
> scsi_device that's stored on the urb->context to be correct.
>
> Ok, I think we just need to divide the tag address space equally between
> devices. The devinfo can keep track of the pointers to the scsi_devices
> for each LUN, and what tag range each LUN has. So if you have 255 tags
> available, and two LUNs, you can give one of them tag 1 to 122, and the
> other tags 123 to 254.
Well, no, what you want to do is use a shared tag map at the block
level. That will manage a joint tag space for N queues without your
having to partition it arbitrarily. see scsi_host_find_tag() and
scsi_init_shared_tag_map().
James
next prev parent reply other threads:[~2011-12-16 21:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 18:47 Make UAS work on HS for devices with and without command tagging support Sebastian Andrzej Siewior
2011-12-14 18:47 ` [PATCH 1/2] usb/uas: fix support on HS (device without command tagging) Sebastian Andrzej Siewior
[not found] ` <1323888472-21035-2-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2011-12-15 11:14 ` Sergei Shtylyov
2011-12-14 18:47 ` [PATCH 2/2] usb/uas: fix support on HS (device with " Sebastian Andrzej Siewior
2011-12-14 22:53 ` Make UAS work on HS for devices with and without command tagging support Sarah Sharp
2011-12-15 8:44 ` Sebastian Andrzej Siewior
[not found] ` <4EE9B375.4020606-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2011-12-15 21:12 ` [usb-storage] " Sarah Sharp
2011-12-16 14:47 ` Sebastian Andrzej Siewior
2011-12-16 20:12 ` Sebastian Andrzej Siewior
2011-12-16 20:31 ` Matthew Wilcox
2011-12-16 20:42 ` Sebastian Andrzej Siewior
2011-12-16 21:36 ` Sarah Sharp
2011-12-16 21:44 ` Alan Stern
2011-12-16 21:47 ` James Bottomley [this message]
2011-12-19 16:12 ` Matthew Wilcox
2011-12-19 17:14 ` James Bottomley
2011-12-19 18:36 ` Matthew Wilcox
2011-12-19 20:27 ` James Bottomley
2011-12-19 20:57 ` Matthew Wilcox
2011-12-19 21:22 ` James Bottomley
2011-12-19 16:14 ` [PATCH] usb/uas: use unique tags for all LUNs Sebastian Andrzej Siewior
2011-12-19 19:39 ` [PATCH] usb/uas: use scsi_host_find_tag() to find command from a tag Sebastian Andrzej Siewior
[not found] ` <20111219193955.GA2060-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2011-12-19 19:50 ` Matthew Wilcox
2011-12-19 20:12 ` Sarah Sharp
2011-12-19 21:01 ` Matthew Wilcox
2011-12-16 20:51 ` [usb-storage] Re: Make UAS work on HS for devices with and without command tagging support Sarah Sharp
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=1324072059.10429.27.camel@dabdike \
--to=james.bottomley@hansenpartnership.com \
--cc=bigeasy@linutronix.de \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
--cc=usb-storage@lists.one-eyed-alien.net \
--cc=willy@linux.intel.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.