From owner-freebsd-scsi@FreeBSD.ORG Sat Nov 13 09:34:14 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CAC4106566B; Sat, 13 Nov 2010 09:34:14 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id AE7708FC14; Sat, 13 Nov 2010 09:34:13 +0000 (UTC) Received: by bwz2 with SMTP id 2so3794627bwz.13 for ; Sat, 13 Nov 2010 01:34:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=JYmhMzNeU5OnbnDeUrtS0qRDtJv+dv+6J3HXRmLkOLc=; b=blUU6zzlg0GENwyADU+RZS0V1/ejTnubAGC57nrxVtp7Qjqj4a7aDstkxbslKAEOqh cN/ZpaeXYHpO9y0hhjWC/Hz/yK8p6MJoeFQeBnlBFazkLjpmp9wR/7DVq7g4NiDu8Zsn g4uaAbQAmMFXgrjoT0UjTg/+tryGKpw+GTiMI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=EyHpdeynSoto2XbB2vJRTb08CQJ2MTZNPe5HtvcQibh7KO2SGt6Ef1JJ4oe1YMVoDY q4a5+dkiJRnB7GJsJBmZYWHS47njKIoYgetQES9fF/e8Oeao/2vXe15KbRBhScv4K0JK rW2OoG/RacUEbaakWnj/XMgvPvSW0HykSyNtQ= Received: by 10.204.116.74 with SMTP id l10mr3840744bkq.113.1289640851774; Sat, 13 Nov 2010 01:34:11 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 4sm1950121bki.1.2010.11.13.01.34.08 (version=SSLv3 cipher=RC4-MD5); Sat, 13 Nov 2010 01:34:09 -0800 (PST) Sender: Alexander Motin Message-ID: <4CDE5B8C.4000102@FreeBSD.org> Date: Sat, 13 Nov 2010 11:34:04 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Brandon Gooch References: <4CD45209.5010607@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org, FreeBSD-Current , FreeBSD Stable Subject: Re: Sense fetching [Was: cdrtools /devel ...] 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: Sat, 13 Nov 2010 09:34:14 -0000 Brandon Gooch wrote: > 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... Now uncommitted pass_autosence.patch and possibly cdrtools.patch. -- Alexander Motin