From owner-freebsd-usb@FreeBSD.ORG Tue Sep 4 01:31:01 2007 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 496F116A419; Tue, 4 Sep 2007 01:31:01 +0000 (UTC) (envelope-from jflemer@uvm.edu) Received: from eagle.uvm.edu (eagle.uvm.edu [132.198.101.203]) by mx1.freebsd.org (Postfix) with ESMTP id ACD6813C4B7; Tue, 4 Sep 2007 01:31:00 +0000 (UTC) (envelope-from jflemer@uvm.edu) Received: from minus.speednaked.com (c-67-174-118-74.hsd1.co.comcast.net [67.174.118.74]) (authenticated bits=0) by eagle.uvm.edu (8.13.7/8.13.5) with ESMTP id l8416Ysv002164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 3 Sep 2007 21:06:38 -0400 Message-ID: <46DCAF95.6010604@uvm.edu> Date: Mon, 03 Sep 2007 19:06:29 -0600 From: "James E. Flemer" User-Agent: Thunderbird 2.0.0.0 (X11/20070611) MIME-Version: 1.0 To: usb@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Warner Losh , Yamamoto Shigeru Subject: Multiple USB umass devices fail on SCSI synchronize cache X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2007 01:31:01 -0000 There seems to be at least 11 open PRs on USB devices that fail on FreeBSD due to SCSI synchronize cache failure[1]. I recently got another device that also fails (Samsung Digimax L85 camera). One generic approach[2] in the SCSI da driver works for devices (affects both SCSI and USB) that fail on sync cache, and don't lock up. There are devices though that lock up on sync cache, and need to avoid the command all together[3]. There clearly needs to be a quirk for devices that lock up on synchronize cache, unless we can safely recover from a lock-up with a port reset and set the quirk automatically. The only quirk now in the scsi_da quirk table, which might work, but is flawed for USB-IDE bridge type devices (i.e. add a quirk for all bridged IDE devices, not the broken bridge[3]). For devices that can recover, there should be an automatic approach. With the da patch from [2] applied and the sysctl enabled, plus my own patch from [3], all relevant devices I have function as expected. I am not sure if the patch in [2] is safe to enable by default though. Are sync cache soft errors possible, where a retry is desired? Perhaps if the patch in [2] only set the quirk after N sync cache failures (with N tunable)? I'm willing to re-work these patches and/or test other patches if it will help get something committed. I'm only using 6-STABLE at the moment, but may be able find somewhere to test on -CURRENT if that will help to get something committed. [1] http://www.freebsd.org/cgi/query-pr-summary.cgi?multitext=Synchronize+cache+failed [2] http://lists.freebsd.org/pipermail/freebsd-current/2005-January/045779.html [3] http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/95173 keywords: Synchronize cache failed, SYNCHRONIZE_CACHE, NO_SYNCHRONIZE_CACHE, netbsd PQUIRK_NOSYNCCACHE, DA_Q_NO_SYNC_CACHE