From owner-freebsd-bugs@FreeBSD.ORG Sun Feb 26 18:40:20 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42CD016A420 for ; Sun, 26 Feb 2006 18:40:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DFC143D5D for ; Sun, 26 Feb 2006 18:40:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1QIeH1L088647 for ; Sun, 26 Feb 2006 18:40:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1QIeGwK088646; Sun, 26 Feb 2006 18:40:16 GMT (envelope-from gnats) Resent-Date: Sun, 26 Feb 2006 18:40:16 GMT Resent-Message-Id: <200602261840.k1QIeGwK088646@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Oliver Fromme Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1BCDF16A420 for ; Sun, 26 Feb 2006 18:35:38 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F46443D48 for ; Sun, 26 Feb 2006 18:35:37 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (wvaron@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k1QIZUIQ084027; Sun, 26 Feb 2006 19:35:35 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k1QIZUal084026; Sun, 26 Feb 2006 19:35:30 +0100 (CET) (envelope-from olli) Message-Id: <200602261835.k1QIZUal084026@lurza.secnetix.de> Date: Sun, 26 Feb 2006 19:35:30 +0100 (CET) From: Oliver Fromme To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Oliver Fromme Subject: kern/93872: [patch] SCSI quirk required for ELTA 8061 OL USB memory stick / mp3 player X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Oliver Fromme List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Feb 2006 18:40:20 -0000 >Number: 93872 >Category: kern >Synopsis: [patch] SCSI quirk required for ELTA 8061 OL USB memory stick / mp3 player >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Feb 26 18:40:15 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Oliver Fromme >Release: FreeBSD 6-STABLE i386 >Organization: secnetix GmbH & Co. KG http://www.secnetix.de/bsd >Environment: Patch applies to CURRENT, RELENG_6 and RELENG_5. I've only tested it on RELENG_6, though. >Description: I've recently bought a USB memory stick with mp3 player from Elta. The product is called Elta 8061 OL, it has 1 GByte flash memory. When I plug it in, it is detected correctly, but every access to it just hangs, no matter what I try (fdisk, or simply read the first block with dd). All processes are stuck in the "disk wait" state ("D" in ps output). When the USB stick is removed, a bunch of error messages are printed by the kernel, and the stuck processes are released. Adding a DA_Q_NO_SYNC_CACHE quirk to scsi_da.c solves the problem. Processes don't hang, and I can access the flash memory without problems. Please see the patch below. This is printed by "camcontrol devlist": scbus3 on umass-sim0 bus 0: at scbus3 target 0 lun 0 (da0,pass1) This is from "usbdevs -v": Controller /dev/usb0: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 uhub0 port 1 powered port 2 addr 2: full speed, power 500 mA, config 1, product 0x0001(0x0001), vendor 0x0420(0x0420), rev 1.00 umass0 And this is the dmesg output, *without* the patch: umass0: vendor 0x0420 product 0x0001, rev 1.10/1.00, addr 2 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 1.000MB/s transfers da0: 999MB (2047969 512 byte sectors: 64H 32S/T 999C) umass0: BBB reset failed, STALLED umass0: BBB bulk-in clear stall failed, STALLED umass0: BBB bulk-out clear stall failed, STALLED (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 umass0: BBB reset failed, STALLED umass0: BBB bulk-in clear stall failed, STALLED umass0: BBB bulk-out clear stall failed, STALLED umass0: BBB reset failed, STALLED umass0: BBB bulk-in clear stall failed, STALLED umass0: BBB bulk-out clear stall failed, STALLED umass0: BBB reset failed, STALLED umass0: BBB bulk-in clear stall failed, STALLED umass0: BBB bulk-out clear stall failed, STALLED umass0: BBB reset failed, STALLED umass0: BBB bulk-in clear stall failed, STALLED umass0: BBB bulk-out clear stall failed, STALLED umass0: BBB reset failed, STALLED umass0: BBB bulk-in clear stall failed, STALLED umass0: at uhub0 port 2 (addr 2) disconnected (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): removing device entry Opened disk da0 -> 5 umass0: detached >How-To-Repeat: Insert "Elta 8061 OL" USB memory stick / mp3 player and try to access it. >Fix: Unfortunately, the device strings are not very useful. The product and revision strings are empty, and the vendor string contains only "USB 2.0". However, I guess this will also catch other Elta players with similar firmware which also require the quirk. --- cam/scsi/scsi_da.c.orig Sat Nov 26 23:55:20 2005 +++ cam/scsi/scsi_da.c Mon Feb 20 11:46:34 2006 @@ -341,6 +341,13 @@ }, { /* + * Elta 8061OL MP3 Player + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "USB 2.0" , "", ""}, + /*quirks*/ DA_Q_NO_SYNC_CACHE + }, + { + /* * TEAC USB floppy mechanisms */ {T_DIRECT, SIP_MEDIA_REMOVABLE, "TEAC" , "FD-05*", "*"}, >Release-Note: >Audit-Trail: >Unformatted: