Re: [PATCH v2 2/2] uas: Make uas work with blk-mq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
>> Reported-by: Douglas Gilbert <dgilbert@xxxxxxxxxxxx>
>> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
>> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> 
> 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 ?

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux