Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758147Ab1DYJJE (ORCPT ); Mon, 25 Apr 2011 05:09:04 -0400 Received: from nm11-vm3.bullet.mail.ne1.yahoo.com ([98.138.91.141]:44551 "HELO nm11-vm3.bullet.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1758131Ab1DYJJC (ORCPT ); Mon, 25 Apr 2011 05:09:02 -0400 X-Greylist: delayed 318 seconds by postgrey-1.27 at vger.kernel.org; Mon, 25 Apr 2011 05:09:02 EDT X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 418458.10121.bm@omp1053.mail.ne1.yahoo.com DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=KFaKkoWF5oMMP6u0NiVEwhi1HcK/LSI6jYc9QC7ucEguAatd6+AN8m4Rs1+1evY2T9/TZ8ymIV9x+hNoINopFQnjXQjqM/tkHVxyIS3eZqexiDXLxFxgriDpIwSUe18wPKOxlxuSkdEjv2DcIsC78IyZExIyggz3hryM7ffZNZY=; Message-ID: <951969.99629.qm@web31806.mail.mud.yahoo.com> X-YMail-OSG: D4xKCzUVM1lV.68T5bXwjzTDeCD6NOdFUfujDx8dcb85Gi9 QLLySXsN3U0rQH.b1MZ13J_Hbo1XyUJvaeQZBijJGwUdT3J.zGQcL08vYyv9 LFZmRacpkuyJCfc8MdyPGn202Sz_ZYCUZ6sSra6VORM.Bfel2j.iC.TiXPrg AScXhVqlcdAAVOFvwOt8b4JP7XLGYx2qi9.VPrhCZXRyz8hB8AbrqPA10See 7Gjc8FS5huFqLn544vj1jFWI9sA.MlFt2C75XyfP87szOeMpdxKVWpoOLNek eUDXNrTRuZ9y01f.bkJ7.9yG2FlQYXSov9xPMl_4PeIHctIt5lLb8Whkc7J6 QQ7wdsCv5uyiUWAVDxBCtiBX9zpkh9q7_.23abHR8zF36Q9czu.VcVgFA1FE Ntl_WnqcyWoxpUQ-- X-Mailer: YahooMailClassic/12.0.2 YahooMailWebService/0.8.111.303096 Date: Mon, 25 Apr 2011 02:03:41 -0700 (PDT) From: Luben Tuikov Reply-To: ltuikov@yahoo.com Subject: UASP (UAS) for Linux: Updates To: linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Greg KH MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2638 Lines: 66 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 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 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/