The USB Attached SCSI Protocol driver (UAS, UASP) which can be found here: https://github.com/ltuikov/linux-2.6 off of master, saw the following update: commit 1cc384f0b3a9422237ff218e3be10a4a4c15f9b4 Author: Luben Tuikov <ltuikov@xxxxxxxxx> Date: Fri Apr 22 19:25:07 2011 -0700 [USB] UASP: Driver generated tags on per I_T nexus In UAS, a single tag space exists per I_T nexus, that is, tags are unique on per I_T nexus. Also, tags are shared between COMMAND IUs and TASK MANAGEMENT IUs. The technical reason for these requirements can be deduced by reading the USB 3.0 and UAS specs. This commit implements an infrastructure for driver generated tags on per I_T nexus. A few of the reasons to do this in the driver instead of using the tags generated by the block layer are: * Tags exists per I_T nexus. Linux generates I_T_L nexus tags. Although some provision is made for "host" based tags in Linux, it doesn't scale for the reasons described in the following bullet-points, and for the reason that if in the future multiple UAS interfaces of the same USB device are mapped as separate target ports into the same "SCSI host (template)", then the tag space breaks, as it must not be shared between ports. The solution provided by this commit solves the general case by providing I_T tags. * Linux doesn't provide for a driver to ask for tags to use for Task Management Functions, which are generated by the driver. In Linux tags come in already assigned to commands which the driver should send out to the transport. Generating tags in the driver assures that we can generate (unique, non-duplicate with commands) tags for TMFs too. * When doing error recovery, after an ABORT TASK TMF, Linux generates a TEST UNIT READY with a tag number the same as the task which was aborted (the Task To Be Managed, TTBM) by the preceding ABORT TASK TMF. Clearly an abuse of a tag number. * Tags should form an increasing sequence wrapping when the highest numbered tag has been used. Signed-off-by: Luben Tuikov <ltuikov@xxxxxxxxx> Original posting of the UASP driver can be found here: http://marc.info/?l=linux-usb&m=129165511732388&w=2 Luben -- 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