Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Sep 2007 19:06:29 -0600
From:      "James E. Flemer" <jflemer@uvm.edu>
To:        usb@freebsd.org
Cc:        Warner Losh <imp@freebsd.org>, Yamamoto Shigeru <shigeru@iij.ad.jp>
Subject:   Multiple USB umass devices fail on SCSI synchronize cache
Message-ID:  <46DCAF95.6010604@uvm.edu>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46DCAF95.6010604>