From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 6 23:36:20 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E57D016A415 for ; Mon, 6 Nov 2006 23:36:19 +0000 (UTC) (envelope-from lydianconcepts@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21C3443D5C for ; Mon, 6 Nov 2006 23:36:18 +0000 (GMT) (envelope-from lydianconcepts@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so892017uge for ; Mon, 06 Nov 2006 15:36:18 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bcMWrNq62evXlk4MOkhBg7DA/C+yrlmeZlfRc8HMJPqt1RrDMbSkSrWQYsVZFGeE8LQ3/d3YvQxt6mvhPVwe2wR65V7fYxtOtLNT0iwxk+oE+wbt+oPXNf26MTit+RQMTUp+qwzhWRMjfw2HVYjr+pWRlVNqRDPaV0I8vBKYwSY= Received: by 10.78.17.1 with SMTP id 1mr4102740huq.1162856178155; Mon, 06 Nov 2006 15:36:18 -0800 (PST) Received: by 10.78.199.15 with HTTP; Mon, 6 Nov 2006 15:36:18 -0800 (PST) Message-ID: <7579f7fb0611061536v3d76e368mc027e5d9844b534b@mail.gmail.com> Date: Mon, 6 Nov 2006 15:36:18 -0800 From: "Matthew Jacob" To: freebsd-scsi@freebsd.org In-Reply-To: <20061102154941.S41199@ns1.feral.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061102154941.S41199@ns1.feral.com> Subject: Re: basic domain validation patches X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Nov 2006 23:36:20 -0000 I haven't heard anything- please take the time to review these changes. On 11/2/06, mjacob@freebsd.org wrote: > > See http://people.freebsd.org/~mjacob/DV_PATCHES > > The ANSI document on Domain Validation gives an algorithm for doing > Basic Domain Validation as, in part: > > Send an INQUIRY command to a SCSI device 3 times- twice with the > default transfer agreement and once with the transfer agreement set > to the fastest supported values. The Basic test fails when the first > 36 bytes of data returned at the negotiated synchronous speed does not > match the data received at the asynchronous transfer speed. In > addition, the Basic test fails if a CRC error (or parity error for > non-DT clocking) or a timeout occurs. If data miscompare occurs, the > test should be repeated (e.g., this could be due to the target changing > INQUIRY data during SCSI device initialization). After a finite number > of retries, if data miscompare recurs then fall-back should be > attempted (see 5.5.2). > > and 5.5.2 has: > > If Basic or Enhanced tests fail, a fall-back setting is set and the > tests are performed again. The recommended fall-back order is: > > 1. fast-160 > 2. fast-80 > 3. fast-40 (with DT clocking enabled) > 4. fast-40 (with ST clocking enabled) > 5. fast-20 > 6. fast-10; and > 7. asynchrnous transfer. > > I've done an implementation interwoven into the probe code in cam_xpt > such that the following occurs.. > > The normal sequence is: > > ... > INQUIRY (short) > INQUIRY (long) > ... > ('default' sync settings are enabled) > ... > PROBE_TUR_FOR_NEGOTIATION > > > I've changed to be: > > PROBE_TUR_FOR_NEGOTIATION > PROBE_INQUIRY_BASIC_DV1 > ... > PROBE_INQUIRY_BASIC_DV2 > ... > > The idea here is to leverage the two initial INQUIRY commands done at > async mode and compare with the last known one and to do *two* > additional INQUIRY commands (at speed) to see if they compare with the > last ASYNC long INQUIRY command. If they don't, we can do backoff and > just re-enter the state machine at PROBE_TUR_FOR_NEGOTIATION. > > The backoff doesn't do DT/ST settings, but just simply increments the > sync_period factor until we hit 0xf (5 MHz) and then drops to async. > > I don't mess with PPR settings on the theory that the SIM will do the > right thing with PPR settings depending on the values of sync period and > offset. > > By doing fault injection (e..g, failed compares) I've done some testing > and this *appears* to do what one would want. > > Any comments? I *know* there are people out there on this list who have > more experience with DV than I do so I'd appreciate some comments. > > -matt > > > > > _______________________________________________ > freebsd-scsi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" >