From owner-freebsd-bugs@FreeBSD.ORG Tue Dec 28 15:50:33 2004 Return-Path: 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 E4C1F16A4CE for ; Tue, 28 Dec 2004 15:50:32 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B658443D45 for ; Tue, 28 Dec 2004 15:50:32 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBSFoWGQ068834 for ; Tue, 28 Dec 2004 15:50:32 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBSFoWk6068828; Tue, 28 Dec 2004 15:50:32 GMT (envelope-from gnats) Resent-Date: Tue, 28 Dec 2004 15:50:32 GMT Resent-Message-Id: <200412281550.iBSFoWk6068828@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, Thomas Pornin Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D9B316A4CE for ; Tue, 28 Dec 2004 15:50:11 +0000 (GMT) Received: from mallaury.noc.nerim.net (smtp-102-tuesday.noc.nerim.net [62.4.17.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id C29B943D53 for ; Tue, 28 Dec 2004 15:50:10 +0000 (GMT) (envelope-from pornin@cronos.bolet.org) Received: from cronos.bolet.org (cronos.bolet.org [80.65.226.87]) by mallaury.noc.nerim.net (Postfix) with ESMTP id 8BE4662EEC for ; Tue, 28 Dec 2004 16:50:07 +0100 (CET) Received: from cronos.bolet.org (localhost.bolet.org [127.0.0.1]) by cronos.bolet.org (8.13.1/8.13.1) with ESMTP id iBSFo804086938 for ; Tue, 28 Dec 2004 16:50:08 +0100 (CET) (envelope-from pornin@cronos.bolet.org) Received: (from pornin@localhost) by cronos.bolet.org (8.13.1/8.13.1/Submit) id iBSFo8ND086937; Tue, 28 Dec 2004 16:50:08 +0100 (CET) (envelope-from pornin) Message-Id: <200412281550.iBSFo8ND086937@cronos.bolet.org> Date: Tue, 28 Dec 2004 16:50:08 +0100 (CET) From: Thomas Pornin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/75578: QUIRK: PNY USB flash key X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Thomas Pornin List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2004 15:50:33 -0000 >Number: 75578 >Category: kern >Synopsis: QUIRK: PNY USB flash key >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Dec 28 15:50:32 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Thomas Pornin >Release: FreeBSD 5.3-STABLE i386 >Organization: >Environment: >Description: I bought a cheap 128 MB USB flash key from PNY. When plugged in, it seems to work, but annoying warnings are emitted when the key is accessed: umass0: Phase Error, residue = 0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 This seems to be due to the cheap key not supporting some sort of SCSI command. Here are the insertion messages: umass0: PNY USB DISK 20X, rev 2.00/1.00, addr 4 da0 at umass-sim0 bus 0 target 0 lun 0 da0: < USB DISK 20X PMAP> Removable Direct Access SCSI-0 device da0: 1.000MB/s transfers da0: 123MB (251904 512 byte sectors: 64H 32S/T 123C) Note: the vendor name is empty. The product name is "USB DISK 20X" and the revision is "PMAP". "usbdevs -v" shows this: full speed, power 200 mA, config 1, USB DISK 20X(0x1600), PNY(0x0d7d), rev 1.00 >How-To-Repeat: >Fix: This patch seems to solve the problem: --- sys/cam/scsi/scsi_da.c-orig Tue Dec 28 15:06:15 2004 +++ sys/cam/scsi/scsi_da.c Tue Dec 28 15:06:20 2004 @@ -318,6 +318,13 @@ {T_DIRECT, SIP_MEDIA_REMOVABLE, "FL" , "NexIA+*", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, + { + /* + * PNY USB flash key + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "" , "USB DISK 20X", "PMAP"}, + /*quirks*/ DA_Q_NO_SYNC_CACHE + }, }; static disk_strategy_t dastrategy; >Release-Note: >Audit-Trail: >Unformatted: >System: FreeBSD titan 5.3-STABLE FreeBSD 5.3-STABLE #0: Tue Dec 28 16:15:02 CET 2004 root@titan:/usr/obj/usr/src/sys/TITAN i386 Base machine is a simple PC (Athlon XP) with USB 1.0 capabilities.