From owner-freebsd-mobile Sat Aug 24 15:34: 7 2002 Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 87A3437B400 for ; Sat, 24 Aug 2002 15:34:03 -0700 (PDT) Received: from bobj.dyndns.org (cpe-gan-68-101-90-216-cmcpe.ncf.coxexpress.com [68.101.90.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 959B543E72 for ; Sat, 24 Aug 2002 15:34:01 -0700 (PDT) (envelope-from bob88@garbonzo.hos.ufl.edu) Received: from garbonzo.hos.ufl.edu (localhost [127.0.0.1]) by bobj.dyndns.org (8.11.4/8.11.4) with ESMTP id g7OMVte00685; Sat, 24 Aug 2002 18:32:25 -0400 (EDT) (envelope-from bob88@garbonzo.hos.ufl.edu) Message-ID: <3D68095B.3000106@garbonzo.hos.ufl.edu> Date: Sat, 24 Aug 2002 18:31:55 -0400 From: Bob Johnson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0rc3) Gecko/20020601 X-Accept-Language: en-us, en, eo MIME-Version: 1.0 To: Bruce M Simpson Cc: Kevin Oberman , mobile@FreeBSD.ORG Subject: Re: Use of USB "Disk on a key" devices References: <20020811235053.2E7935D04@ptavv.es.net> <20020813100445.GJ23205@spc.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Bruce M Simpson wrote: > Kevin, > > I purchased an 8Mb DiskOnKey device last week from PC World here in > London for 10 GBP kast Thursday. I attempted to get the device to work > simply byhacking its VID and PID into /src/sys/dev/usb/umass.c, but no joy. Assuming it is similar to the two USB flash drives I've played with, you need to hack /src/sys/cam/scsi/scsi_da.c to tell the scsi driver about the capabilities of your device. When you plug the device in to your system, it should be recognized. with a log message something like Aug 20 22:56:06 bobj /kernel: da0: Removable Direct Access SCSI-0 device From that I generated an entry in scsi_da.c that looks like this: { /* Trek ThumbDrive Smart - another USB flash drive */ {T_DIRECT, SIP_MEDIA_REMOVABLE, "TREK2000", "TD-G2", "*"}, /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE } then I rebuilt and reinstalled my kernel and it worked. You can use wildcards to allow one entry to cover a number of devices, e.g. my first effort used the line {T_DIRECT, SIP_MEDIA_REMOVABLE, "TREK*", "*","*"}, which would work with just about any device from TREK. Now that I think about it, I probably should be using {T_DIRECT, SIP_MEDIA_REMOVABLE, "TREK2000", "TD*","*"}, to pick up all models of the ThumbDrive, but that's a guess. > > The device appears to be a BBB/SCSI-transparent one according to its > configuration descriptor. After attempting to attach CAM, commands time out > and are then refused - the device does not respond to SCSI_INQUIRY. IIRC, my drive behaved similarly until I patched the driver. The USB flash drives seem to universally implement an instruction set that supports neither 6 byte commands nor cache sync. The "quirks" entry tells the scsi driver not to use those commands. A device that did not have any special quirks wouldn't need an entry in scsi_da.c - Bob > > There are a few further tips and tricks which I can perform, such as 6-byte > command conversion within the SCSI stack. I will probably attempt to pin > down further details of why the device isn't responding; I will be sure to > let you know. > > BMS > > On Sun, Aug 11, 2002 at 04:50:53PM -0700, Kevin Oberman wrote: > >>There are several vendors supplying solid-state USB "disk" drives of >>between 8 MB and 512 MB. They claim to operate as USB disk drives and >>require no drivers for Windows (newer than 98), Mac OS (9 and newer), >>and Linux (with USB support). They come from several manufacturers >>including TrekStor, Sandisk, EasyDisk, JMTek, Sony, SimpleTech, and >>DiskOnKey (M-Systems). >> >>Has anyone used one of these devices and can they confirm whether or >>not any particular brand works well? I've seen one report that one did >>not work, but that's it. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-mobile" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message