From owner-freebsd-questions Wed Mar 13 22:27:28 2002 Delivered-To: freebsd-questions@freebsd.org Received: from Mail6.nc.rr.com (fe6.southeast.rr.com [24.93.67.53]) by hub.freebsd.org (Postfix) with ESMTP id 3244637B402 for ; Wed, 13 Mar 2002 22:27:20 -0800 (PST) Received: from i8k.babbleon.org ([66.57.85.154]) by Mail6.nc.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Thu, 14 Mar 2002 01:26:55 -0500 Received: by i8k.babbleon.org (Postfix, from userid 111) id C7A5EBA05; Thu, 14 Mar 2002 01:26:52 -0500 (EST) Content-Type: text/plain; charset="iso-8859-1" From: Brian T.Schellenberger To: Igor Kulemzin , freebsd-questions@FreeBSD.ORG Subject: Re: Pen Drive usage in FreeBSD 4.5-STABLE Date: Thu, 14 Mar 2002 01:26:52 -0500 X-Mailer: KMail [version 1.3] References: <28104712358.20020314150010@mail.ru> In-Reply-To: <28104712358.20020314150010@mail.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20020314062652.C7A5EBA05@i8k.babbleon.org> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I ran into the same thing with my LaCie USB-based SCSI drive, and in that case, it wan't a USB problem at all, it was a SCSI problem. In *that* case, the solution was to go to /usr/src/sys/cam/scsi, and edit scsi_da.c (This is the SCSI "Quirks" file) and add an entry for my drive telling the kernel not to use 6-byte mode with my drive. Then I built and installed a new kernel and voila! it worked. If you have an up-to-date kernel, the code for my drive lives (as of yesterday, anyway) at line 265: { /* * LaCie USB drive, among others */ {T_DIRECT, SIP_MEDIA_FIXED, "Maxtor*", "D080H4*", "*"}, /*quirks*/ DA_Q_NO_6_BYTE }, In your case, it would be a little trickier; my disk is recognzied as Mar 13 02:51:24 i8k /kernel: da0 at umass-sim0 bus 0 target 0 lun 0 Mar 13 02:51:24 i8k /kernel: da0: Fixed Direct Access SCSI-0 device which is where I got the above strings. Your disk seems to have no name (?) based on the leading space: | da0: < USB DISK 1.05> Removable Direct Access SCSI-0 device so you might have to find somebody more expert than me, but for your own tests you could just enable this "quirk" for "*", "*", "*", and that would prresumably ensure that nobody used 6-byte for anything. Then you could look around to find a more subtle string that could be committed back to the man source track so that you won't have to re-patch the file every time you upgrade. On Thursday 14 March 2002 01:00 am, Igor Kulemzin wrote: | Hi, | | I have Pen Drive (USB) that works fine in Windows 98. But in FreeBSD I | can't use it. | | I've add this options to kernel config file: | | device scbus | device pass | device da | | and recompile kernel. Also I've add loading usb and umass modules | in /boot/loader.conf. This messages I see in dmesg output: | | .............. | uhci0: port 0xe400-0xe41f irq 11 at | device 7.2 on pci0 usb0: on uhci0 | usb0: USB revision 1.0 | uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 | uhub0: 2 ports with 2 removable, self powered | umass0: USB Disk , rev 1.00/1.00, addr 2 | .............. | .............. | da0 at umass-sim0 bus 0 target 0 lun 0 | da0: < USB DISK 1.05> Removable Direct Access SCSI-0 device | da0: 650KB/s transfers | da0: 62MB (128000 512 byte sectors: 64H 32S/T 62C) | .............. | | When I try to mount this disk with commands: | | mount -t msdos -o ro /dev/da0 /mnt | mount -t msdos -o ro /dev/da0s1 /mnt | | I've got error messages like this: | | READ(06). CDB: 8 0 0 0 1 0 | ILLEGAL REQUEST asc:20,0 | Invalid command operation code | da0: reading primary partition table: error reading fsbn 0 | | And I found that camcontrol output parameters for this USB disk: | | camcontrol modepage da0 -m 5 -P 0 | | Transfer rate: 5000 | Number of heads: 8 | Sectors per track: 32 | Data bytes per sector: 512 | Number of cylinders: 500 | Starting cylinder-write precompensation: 0 | Starting cylinder-reduced write current: 0 | Drive step rate: 0 | Drive step pulse width: 0 | Head settle delay: 0 | Motor on delay: 5 | Motor off delay: 30 | TRDY: 0 | SSN: 0 | MO: 0 | SPC: 0 | Write Compensation: 0 | Head load delay: 0 | Head unload delay: 0 | Pin 34: 0 | Pin 2: 0 | Pin 4: 0 | Pin 1: 0 | Medium rotation rate: 360 | | different with system messages on boot (64H 32S/T 62C). | | How can I use this USB disk in FreeBSD? -- Brian T. Schellenberger . . . . . . . bts@wnt.sas.com (work) Brian, the man from Babble-On . . . . bts@babbleon.org (personal) ME --> http://www.babbleon.org http://www.eff.org <-- GOOD GUYS --> http://www.programming-freedom.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message