All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Christoph Hellwig <hch@infradead.org>,
	Douglas Gilbert <dgilbert@interlog.com>,
	linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2 2/2] uas: Make uas work with blk-mq
Date: Sat, 04 Oct 2014 07:46:21 -0700	[thread overview]
Message-ID: <1412433981.21548.6.camel@jarvis.lan> (raw)
In-Reply-To: <542FB590.4030902@redhat.com>

On Sat, 2014-10-04 at 10:53 +0200, Hans de Goede wrote:
> Hi,
> 
> On 10/03/2014 11:47 PM, Greg Kroah-Hartman wrote:
> > On Fri, Oct 03, 2014 at 12:08:57PM +0200, Hans de Goede wrote:
> >> With uas over usb-3 the tags inside the uas iu-s must match the usb-3 stream
> >> ids, and those go from 1 - qdepth.
> >>
> >> Before blk-mq calling scsi_activate_tcq(sdev, qdepth) guaranteed that we would
> >> only get cmnd->request->tag from 0 - (qdepth - 1), and we used those as
> >> uas-tags / stream-ids.
> >>
> >> With blk-mq however we are guaranteed to never get more then qdepth commands
> >> queued at the same time, but the cmnd->request->tag values may be much larger,
> >> which breaks uas.
> >>
> >> This commit fixes this by generating uas tags in the 1 - qdepth range ourselves
> >> instead of using cmnd->request->tag.
> >>
> >> While touching all involved code anyways also rename the uas_cmd_info stream
> >> field to uas_tag, because when using uas over usb-2 streams are not used.
> >>
> >> Cc: Christoph Hellwig <hch@infradead.org>
> >> Reported-by: Douglas Gilbert <dgilbert@interlog.com>
> >> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >> Reviewed-by: Christoph Hellwig <hch@lst.de>
> > 
> > This doesn't apply to my usb-next branch of usb.git, care to refresh it
> > and resend?
> 
> I did this v2 to resolve a conflict with a last minute fix for 3.17 which
> James Bottomley pushed out yesterday. So if this does not apply that likely
> is because that fix is not (yet) in next. See:
> 
> https://git.kernel.org/cgit/linux/kernel/git/jejb/scsi.git/log/?h=fixes
> 
> And specifically:
> 
> https://git.kernel.org/cgit/linux/kernel/git/jejb/scsi.git/commit/?h=fixes&id=2c2d831c81ec75a7b0d8e28caa8e3d9c1fe546f9
> 
> I'm not sure how to proceed here, maybe the best thing is to cherry pick
> that fix into usb-next (should disappear on merge), and then apply
> this one on top ?

Depends:  The fixes tree is based on -rc1, so you could just use that as
the base for the topic branch uas goes in.  That's the usual way.  Or we
could just do it via the SCSI tree, which will have the necessary base.

Which would you prefer?

James



  reply	other threads:[~2014-10-04 14:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03 10:08 [PATCH v2 1/2] uas: Reduce number of function arguments for uas_alloc_foo functions Hans de Goede
2014-10-03 10:08 ` [PATCH v2 2/2] uas: Make uas work with blk-mq Hans de Goede
     [not found]   ` <1412330937-22630-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-10-03 21:47     ` Greg Kroah-Hartman
2014-10-04  8:53       ` Hans de Goede
2014-10-04 14:46         ` James Bottomley [this message]
     [not found]           ` <1412433981.21548.6.camel-doHRWNlmrt9+urZeOPWqwQ@public.gmane.org>
2014-10-05  9:06             ` Hans de Goede
     [not found]               ` <543109F8.3030303-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-10-05  9:10                 ` Christoph Hellwig
     [not found]                   ` <20141005091015.GA29855-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-10-05  9:18                     ` Hans de Goede
2014-10-06  0:10                       ` Greg Kroah-Hartman

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=1412433981.21548.6.camel@jarvis.lan \
    --to=james.bottomley@hansenpartnership.com \
    --cc=dgilbert@interlog.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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.