From owner-freebsd-bugs@FreeBSD.ORG Thu Aug 28 13:00:38 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 2B34616A4BF for ; Thu, 28 Aug 2003 13:00:38 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D57243FF3 for ; Thu, 28 Aug 2003 13:00:36 -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 h7SK0aUp086422 for ; Thu, 28 Aug 2003 13:00:36 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h7SK0aw9086421; Thu, 28 Aug 2003 13:00:36 -0700 (PDT) Resent-Date: Thu, 28 Aug 2003 13:00:36 -0700 (PDT) Resent-Message-Id: <200308282000.h7SK0aw9086421@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, Hal Burch Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14C9016A4DC for ; Thu, 28 Aug 2003 12:56:40 -0700 (PDT) Received: from exgw2.lumeta.com (exgw4.lumeta.com [65.246.240.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id E56BE43F3F for ; Thu, 28 Aug 2003 12:56:37 -0700 (PDT) (envelope-from hburch@lumeta.com) Received: from lucy.corp.lumeta.com (h65-246-245-10.lumeta.com [65.246.245.10]) by exgw2.lumeta.com (Postfix) with ESMTP id 2EB0F373865 for ; Thu, 28 Aug 2003 15:56:37 -0400 (EDT) Received: from localhost (localhost.corp.lumeta.com [127.0.0.1]) by lucy.corp.lumeta.com (Postfix) with ESMTP id 13E87A892E for ; Thu, 28 Aug 2003 15:56:37 -0400 (EDT) Received: from lucy.corp.lumeta.com ([127.0.0.1]) by localhost (lucy.corp.lumeta.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07046-02 for ; Thu, 28 Aug 2003 15:56:36 -0400 (EDT) Received: from hburch.corp.lumeta.com (hburch.corp.lumeta.com [65.246.246.59]) by lucy.corp.lumeta.com (Postfix) with ESMTP id A3703A892C for ; Thu, 28 Aug 2003 15:56:36 -0400 (EDT) Received: by hburch.corp.lumeta.com (Postfix, from userid 2007) id 2AE12256; Thu, 28 Aug 2003 15:56:31 -0400 (EDT) Message-Id: <20030828195631.2AE12256@hburch.corp.lumeta.com> Date: Thu, 28 Aug 2003 15:56:31 -0400 (EDT) From: Hal Burch To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/56095: Apacer Pen Drive fails to work X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Hal Burch List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2003 20:00:38 -0000 >Number: 56095 >Category: kern >Synopsis: Apacer Pen Drive fails to work >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: Thu Aug 28 13:00:36 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Hal Burch >Release: FreeBSD 4.9-PRERELEASE i386 >Organization: Lumeta Corporation >Environment: FreeBSD hburch-lap.hburch.com 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #23: Thu Aug 28 15:03:26 EDT 2003 root@hburch-lap.hburch.com:/usr/src/sys/compile/LOCAL i386 >Description: I bought a 128 MB "Pen Drive lite 2.0". The vendor (0x0d7d) identifies the manufacturer as Apacer. When I plug it in, it does not work. I get the following messages: umass0: USB DISK 2.0, rev 1.10/0.50, addr 2, SCSI over Bulk-Only umass0:0:0:-1: Attached to scbus0 as device 0 (da0:umass-sim0:0:0:0): got CAM status 0x4 (da0:umass-sim0:0:0:0): fatal error, failed to attach to device (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): removing device entry $ usbdevs -v hburch-lap:~/kern-save $ cat /tmp/devs Controller /dev/usb0: addr 1: self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 addr 2: power 500 mA, config 1, USB DISK 2.0(0x1300), (0x0d7d), rev 0.50 port 2 powered PRs on same device: kern/43627 and kern/50297 >How-To-Repeat: Buy device, plug in, and hope version matches. >Fix: The problem appears to be that umass_match_proto is noticing that bInterfaceProtocol is UIPROTO_MASS_BBB, and decides that it's a ZIP drive. I can fix this by commenting out lines 736 and 739 (about) of umass.c, so that the case reads: case UIPROTO_MASS_BBB: /* sc->drive = ZIP_100; */ sc->proto |= UMASS_PROTO_BBB; sc->transfer_speed = UMASS_ZIP100_TRANSFER_SPEED; /* sc->quirks |= NO_TEST_UNIT_READY; */ break; However, this is clearly the wrong way to fix this. The proper fix is not clear to me. This fix makes the device work. However, when I unplug it after running, I get: umass0: Phase Error, residue = 0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 Although this error does not appear to be causing functional issues, this is fixable by adding the following quirk to cam/scsi_da.c: { /* * Apacer USB drive */ {T_DIRECT, SIP_MEDIA_REMOVABLE, "", "USB DISK 2.0", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, The empty vendor will be the subject of other PRs, as it's fix is two changes unrelated to this issue. >Release-Note: >Audit-Trail: >Unformatted: