From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 14 21:50:12 2003 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 77E8F16A4B3 for ; Tue, 14 Oct 2003 21:50:12 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6A6943FE0 for ; Tue, 14 Oct 2003 21:50:09 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h9F4o9FY046482 for ; Tue, 14 Oct 2003 21:50:09 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h9F4o92q046481; Tue, 14 Oct 2003 21:50:09 -0700 (PDT) (envelope-from gnats) Resent-Date: Tue, 14 Oct 2003 21:50:09 -0700 (PDT) Resent-Message-Id: <200310150450.h9F4o92q046481@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, "Rick C.Petty" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E62816A4B3 for ; Tue, 14 Oct 2003 21:41:10 -0700 (PDT) Received: from kiwi-computer.com (megan.kiwi-computer.com [63.224.10.3]) by mx1.FreeBSD.org (Postfix) with SMTP id 1AF5F43F85 for ; Tue, 14 Oct 2003 21:41:07 -0700 (PDT) (envelope-from rick@kiwi-computer.com) Received: (qmail 18651 invoked by uid 2001); 15 Oct 2003 04:41:06 -0000 Message-Id: <20031015044106.18650.qmail@kiwi-computer.com> Date: 15 Oct 2003 04:41:06 -0000 From: "Rick C.Petty" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/58045: [patch] to add PNY Attache Flash Drive to umass(4) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Rick C.Petty" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2003 04:50:12 -0000 >Number: 58045 >Category: kern >Synopsis: [patch] to add PNY Attache Flash Drive to umass(4) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Oct 14 21:50:09 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Rick C. Petty >Release: FreeBSD 5.1-CURRENT i386 >Organization: >Environment: System: FreeBSD 5.1-CURRENT FreeBSD 5.1-CURRENT #1: Tue Oct 14 13:27:42 EDT 2003 root@:/usr/src/sys/i386/compile/GENERIC i386 >Description: PNY's Attache USB 2.0 Flash Drive is a solid-state memory storage device. However neither the device nor the vendor are listed in dev/usb/usbdevs and the drive fails to operate correctly. The kernel reports "Phase Errors" with varying sizes of residue (1024, 512, 0) as well as numerous "Synchronize cache failed" errors. fdisk(8) does not report correctly and attempts to write the partition map or mount the drive fail. The following patches were applied to a CVSup'd 5-CURRENT as of today (adds the PNY vendor and the product ID which match my flash drive). I guessed at the command protocol and "ignore residue" quirk; the patches allowed fdisk, mount, and read/write to work correctly. The kernel still reports: umass0: Phase Error, residue = 0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 repeatedly, but otherwise it seems to work correctly. Someone with USB/CAM knowledge might suggest a better fix; at least this is a [working] start. >How-To-Repeat: CVS to 5.1-CURRENT as of Oct 14 2003, use GENERIC or a kernel configured with umass & friends. Plug in USB 2.0 PNY Attache Flash Drive and try to fdisk(8) or mount da0s1. Kernel will report numerous Phase Errors with residue and the operation will not succeed. With the following patches, fdisk reported the correct partition table and mount succeeded. >Fix: --- usbdevs.patch begins here --- --- /sys/dev/usb/usbdevs.orig Fri Oct 10 16:58:46 2003 +++ /sys/dev/usb/usbdevs Tue Oct 14 18:10:45 2003 @@ -346,6 +346,7 @@ vendor AGATE 0x0c08 Agate Technologies vendor DMI 0x0c0b DMI vendor LUWEN 0x0c76 Luwen vendor SMC3 0x0d5c Standard Microsystems +vendor PNY 0x0d7d PNY vendor HAWKING 0x0e66 Hawking Technologies vendor MOTOROLA 0x1063 Motorola vendor PLX 0x10b5 PLX @@ -999,6 +1000,9 @@ product PIENGINEERING PS2USB 0x020b PS2 /* PLX products */ product PLX TESTBOARD 0x9060 test board + +/* PNY products */ +product PNY ATTACHE 0x1300 USB 2.0 Flash Drive /* Primax products */ product PRIMAX G2X300 0x0300 G2-200 scanner --- usbdevs.patch ends here --- --- umass.patch begins here --- --- /sys/dev/usb/umass.c.orig Tue Oct 14 07:46:22 2003 +++ /sys/dev/usb/umass.c Tue Oct 14 18:22:54 2003 @@ -358,6 +358,10 @@ Static struct umass_devdescr_t umass_dev UMASS_PROTO_SCSI | UMASS_PROTO_BBB, WRONG_CSWSIG }, + { USB_VENDOR_PNY, USB_PRODUCT_PNY_ATTACHE, RID_WILDCARD, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + IGNORE_RESIDUE + }, { USB_VENDOR_SCANLOGIC, USB_PRODUCT_SCANLOGIC_SL11R, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, NO_QUIRKS --- umass.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: