Re: [usb-storage] Re: Make UAS work on HS for devices with and without command tagging support

Alan Stern
2011-12-16T21:44:22Z

On Fri, 16 Dec 2011, Sarah Sharp wrote:

> 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.

The block layer already does a lot of this work for you. Look through
block/blk-tags.c and you'll see what I mean: You ought to be able to
assign the same blk_queue_tag to all the request queues for all the
LUNs in your device. And you can call blk_queue_find_tag() to do the
reverse mapping.

Alan Stern