From owner-freebsd-current@FreeBSD.ORG Sat Nov 13 02:11:10 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B288106566B; Sat, 13 Nov 2010 02:11:10 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id AC4278FC0A; Sat, 13 Nov 2010 02:11:09 +0000 (UTC) Received: by wyb36 with SMTP id 36so605654wyb.13 for ; Fri, 12 Nov 2010 18:11:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=XTZtD7hKiaN8YOXPK3hT+aftPBaAHfLBCbTu3Tf4Keo=; b=oC5Ztad57ScrtV0Dv8/CGBiHVwCqTyM0HZc6lVQtqtMYd5zWQ7kTMllCOtElG4BKsl xcuEgga2bMLYj4hH+uTLBQxuf1eMFFcllTz/oNwLV8zHjMsaiS5TBI8/S/8fpnQr1Bzd d4hIw8PmDv6G6gNTLiG91IkCAzp/xIaJRWgHM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Y4qttIXt0J2ILt/McwctD1RAMO5KOolgNHQfvhqkmrykZqd/U9QrgOTp0p3E7xagLA Bw5i8N5IriEatVYIF3xeIRA2a4GIusi5su3ukQ4N5ET/ltOF2eh3+DRfSQ+JBRFZ9XAp DMRfgfHKCeK6/CxChKs/eVkxlY6Y/mn1xch9A= MIME-Version: 1.0 Received: by 10.216.171.75 with SMTP id q53mr2596431wel.74.1289612661936; Fri, 12 Nov 2010 17:44:21 -0800 (PST) Received: by 10.216.12.80 with HTTP; Fri, 12 Nov 2010 17:44:21 -0800 (PST) In-Reply-To: <4CD45209.5010607@FreeBSD.org> References: <4CD45209.5010607@FreeBSD.org> Date: Fri, 12 Nov 2010 19:44:21 -0600 Message-ID: From: Brandon Gooch To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-scsi@freebsd.org, FreeBSD-Current , FreeBSD Stable Subject: Re: Sense fetching [Was: cdrtools /devel ...] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2010 02:11:10 -0000 2010/11/5 Alexander Motin : > Hi. > > I've reviewed tests that scgcheck does to SCSI subsystem. It shown > combination of several issues in both CAM, ahci(4) and cdrtools itself. > Several small patches allow us to pass most of that tests: > http://people.freebsd.org/~mav/sense/ > > ahci_resid.patch: Add support for reporting residual length on data > underrun. SCSI commands often returns results shorter then expected. > Returned value allows application to know/check how much data it really > has. It is also important for sense fetching, as ATAPI and USB devices > return sense as data in response to REQUEST_SENSE command. > > sense_resid.patch: When manually requesting sense data (ATAPI or USB), > request only as much data as user requested (not the fixed structure > size), and return respective sense residual length. > > pass_autosence.patch: Unless CAM_DIS_AUTOSENSE is set, always fetch > sense if not done by SIM, independently of CAM_PASS_ERR_RECOVER. As soon > as device freeze released before returning to user-level, user-level > application by definition can't reliably fetch sense data if some other > application (like hald) tries to access device same time. > > cdrtools.patch: Make libscg (part of cdrtools) on FreeBSD to submit > wanted sense length to CAM and do not clear sense return buffer. It is > mostly cosmetics, important probably only for scgcheck. > > Testers and reviewers welcome. I am especially interested in opinion > about pass_autosence.patch -- may be we should lower sense fetching even > deeper, to make it work for all cam_periph_runccb() consumers. > Hey mav, sorry to chime in after so long here, but have some of these patches been committed (as of r215179)? Which patches are still applicable for testing? I assume the cdrtools patch for sure... -Brandon