Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Mar 2002 01:26:52 -0500
From:      Brian T.Schellenberger <bts@babbleon.org>
To:        Igor Kulemzin <kulemzinn@mail.ru>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Pen Drive usage in FreeBSD 4.5-STABLE
Message-ID:  <20020314062652.C7A5EBA05@i8k.babbleon.org>
In-Reply-To: <28104712358.20020314150010@mail.ru>
References:  <28104712358.20020314150010@mail.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

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: <Maxtor 4 D080H4 DAH0> 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: <Intel 82371SB (PIIX3) USB controller> port 0xe400-0xe41f irq 11 at
| device 7.2 on pci0 usb0: <Intel 82371SB (PIIX3) USB controller> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020314062652.C7A5EBA05>