From owner-freebsd-usb@FreeBSD.ORG Mon Aug 29 21:10:09 2011 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 789B21065670 for ; Mon, 29 Aug 2011 21:10:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 56C4A8FC17 for ; Mon, 29 Aug 2011 21:10:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7TLA9Z8044323 for ; Mon, 29 Aug 2011 21:10:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7TLA9Cj044322; Mon, 29 Aug 2011 21:10:09 GMT (envelope-from gnats) Resent-Date: Mon, 29 Aug 2011 21:10:09 GMT Resent-Message-Id: <201108292110.p7TLA9Cj044322@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Brett Glass Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06E261065672 for ; Mon, 29 Aug 2011 21:05:31 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id EB3E98FC0A for ; Mon, 29 Aug 2011 21:05:30 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p7TL5U8A049308 for ; Mon, 29 Aug 2011 21:05:30 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p7TL5Un1049306; Mon, 29 Aug 2011 21:05:30 GMT (envelope-from nobody) Message-Id: <201108292105.p7TL5Un1049306@red.freebsd.org> Date: Mon, 29 Aug 2011 21:05:30 GMT From: Brett Glass To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/160299: MicroSDHC-to-USB adapters do not work in FreeBSD 8.x 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: Mon, 29 Aug 2011 21:10:09 -0000 >Number: 160299 >Category: usb >Synopsis: MicroSDHC-to-USB adapters do not work in FreeBSD 8.x >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 29 21:10:08 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Brett Glass >Release: FreeBSD 8.1-RELEASE >Organization: LARIAT >Environment: >Description: I have tried MicroSDHC cards from several different vendors (Kingston, Sandisk, etc.), with different MicroSDHC-to-USB adapters (also Kingston and Sandisk), in FreeBSD 8.x systems. All cause SCSI errors such as (da1:umass-sim1:1:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0 (da1:umass-sim1:1:0:0): SCSI sense: Error code 0x52 Some USB flash memory sticks also produce similar errors. In all cases the system sometimes hangs in the driver and the memory card or stick gets quite warm, as if the system is trying the failed operation again and again. It appears that the problem, which has existed since FreeBSD 4.x, is that the system expects to be able to issue SCSI commands to flash drives (which are not SCSI drives). As a search of recent PRs reveals, this problem has been addressed as a "quirk" on a per-device basis for many individual devices (including memory sticks and cell phones that emulate them), but keeps recurring as new ones are released. A more general fix is needed. >How-To-Repeat: Place a MicroSDHC card in a USB adapter and insert in a FreeBSD 8.x machine. Try to read and write it. >Fix: This behavior is so common that it should not be characterized as a quirk but as a general property of USB flash devices. All USB flash storage devices should have SYNCHRONIZE CACHE and similar SCSI commands disabled by default. These commands should, of course, be enabled for USB-attached ATAPI rotating media, which supports them. >Release-Note: >Audit-Trail: >Unformatted: