public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Matthew Wilcox <willy@linux.intel.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org,
	USB Storage List <usb-storage@lists.one-eyed-alien.net>
Subject: Re: [PATCH] usb/uas: use scsi_host_find_tag() to find command from a tag
Date: Mon, 19 Dec 2011 12:12:26 -0800	[thread overview]
Message-ID: <20111219201226.GC5470@xanatos> (raw)
In-Reply-To: <20111219195050.GQ14291@linux.intel.com>

On Mon, Dec 19, 2011 at 02:50:50PM -0500, Matthew Wilcox wrote:
> On Mon, Dec 19, 2011 at 08:39:55PM +0100, Sebastian Andrzej Siewior wrote:
> > In "usb/uas: use unique tags for all LUNs" we make sure to create unique
> > tags across all LUNs. This patch uses scsi_host_find_tag() to obtain the
> > correct command which is associated with the tag.
> > The following changes were required:
> > - don't use sdev->current_cmnd anymore
> >   Since be can have devices which don't support command tagging we must
> >   ensure that we can tell the two commands apart. devinfo->cmnd is used
> >   for this.
> 
> I don't understand.  There's one devinfo per sdev.  How does moving the
> untagged command anchor from sdev to devinfo change anything?

I thought there was only one devinfo per USB device.  uas_probe() is
only called once per USB device, and that's where devinfo is allocated and
the scsi_host is created.

> It's my understanding that the SCSI core will only send either a single
> untagged command, or tagged commands.  ie any outstanding tagged command
> will cause an untagged command to be deferred, and an outstanding untagged
> command will prevent any other command from being sent to the driver.

Across all scsi_devices on a scsi_host?

In the status command completion for USB 2.0 devices, we can't know
which scsi_device we're completing the command for.  Is it an untagged
command completion for LUN 1 or LUN 2?  We can't tell, because the
device could reorder the commands across LUNs.  So for untagged USB 2.0
devices, we need to be sure there is only one untagged command pending
per scsi_host, and pull the command out of devinfo.

Sarah Sharp

  reply	other threads:[~2011-12-19 20:12 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
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 [this message]
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=20111219201226.GC5470@xanatos \
    --to=sarah.a.sharp@linux.intel.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox