From owner-freebsd-scsi@FreeBSD.ORG Wed Feb 1 08:02:05 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 DE1A016A420 for ; Wed, 1 Feb 2006 08:02:05 +0000 (GMT) (envelope-from nate@root.org) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8509643D45 for ; Wed, 1 Feb 2006 08:02:05 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.5.50] (ppp-71-139-114-10.dsl.snfc21.pacbell.net [71.139.114.10]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id k11820Er027801 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 1 Feb 2006 00:02:01 -0800 Message-ID: <43E06B06.80405@root.org> Date: Wed, 01 Feb 2006 00:02:14 -0800 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Florent Thoumie References: <20060130202806.DCC7916A4CA@hub.freebsd.org> <43DEF43A.6090804@root.org> <20060130213338.H79194@ns1.feral.com> <200601311239.10248.flz@xbsd.org> In-Reply-To: <200601311239.10248.flz@xbsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org, Matthew Jacob Subject: Re: cvs commit: src/sys/cam/scsi scsi_da.c src/sys/dev/usb umass.c usbdevs 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: Wed, 01 Feb 2006 08:02:06 -0000 Florent Thoumie wrote: > On Tuesday 31 January 2006 06:33, Matthew Jacob wrote: > >>>>Linux only sends the SYNCHRONIZE_CACHE command if the WCE (Write Cache >>>>Enable) bit of the disk is set. I can't seem to find something >>>>equivalent to this in our CAM framework. I have no particular SCSI >>>>knowledge but I guess I can have a look at this tomorrow. >>>> >>>>I'm forwarding this to freebsd-scsi@ (keep me CC'ed, as I'm not >>>>subscribed to this list, yet). >>> >>>Hmm, is WCE part of the inquiry response? [moving to scsi@ list] >> >>Yes. > > > Hum, reading Linux source and SCSI standard [1], I'm not so sure, but I might > be wrong. We need to request the caching page in scsi_mode_sense_{6,10}. > > I'll try to write something today, but I guess someone having already worked > on scsi will only need 10 minutes to DTRT. > > [1] http://www.danbbs.dk/~dino/SCSI/SCSI2-09.html (table 156) > You might also want to check if we or Linux set the Immediate bit as part of the SYNCHRONIZE CACHE command. It's possible that USB devices don't properly parse that bit. I think the tape driver (sa) does MODE SENSE as part of normal operation but da does not. (Working frm memory here). -- Nate