usb/160299: MicroSDHC-to-USB adapters do not work in FreeBSD 8.x

Hans Petter Selasky hselasky at c2i.net
Tue Aug 30 09:02:31 UTC 2011


On Monday 29 August 2011 23:05:30 Brett Glass wrote:
> >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:

Hi,

Can you try the attached patch and report back. Should work on 8-stable and 9-
current.

--HPS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msc_auto_quirk.patch
Type: text/x-patch
Size: 8797 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20110830/e95677a4/msc_auto_quirk.bin


More information about the freebsd-usb mailing list