Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jun 2003 20:50:25 +0800
From:      "Paul Hamilton" <paul@bdug.org.au>
To:        "Freebsd-Questions" <freebsd-questions@freebsd.org>
Subject:   RE: adding a quirk for a USB memory device
Message-ID:  <AGEHIFHGNEMPFNCPLONMCEKKEMAA.paul@bdug.org.au>
In-Reply-To: <AGEHIFHGNEMPFNCPLONMAEFJEMAA.paul@bdug.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for the help Roland.  I was getting ready to edit and recompile
scsi_da.c via doing a kernel  re-compile, when I noticed in archives the
'sysctl  kern.cam.da.no_6_byte=1' hack.

I tried it out on the command line and found it worked!  I didn't have to
recompile after all!  I added the command to /etc/sysctl.conf, and all is
well in USB land ;-)  I can now plug-unplug the USB memory stick.

Just thought I would mention it for the archives.

Cheers,

Paul Hamilton

-----Original Message-----
From: Paul Hamilton [mailto:paul@bdug.org.au]
Sent: Wednesday, 18 June 2003 10:48 PM
To: Freebsd-Questions
Subject: adding a quirk for a USB memory device


Hi all,

So many questions...

I can mount/access (mount -t msdos /dev/da0s1 /mnt) my 'Apacer 16MB
HandySteno 1.1' USB memory key stick as long as it's connected when I power
up my FreeBSD 4.8 server.  It does give an error msg on the console saying:
 (da0:umass-sim0:0:0): READ(6)/WRITE(6) not supported, increasing
minimum_cmd_size to 10.

I take it that it has done the increasing by it's self using the Apacer
quirk in /usr/src/sys/cam/scsi/scsi_da.c

I found a bit of info on this at:
http://www.root.org/~nate/freebsd/quirks.html but it neglects to say how to
recompile scsi_da after it has been edited.  It also doesn't go into much
detail on how to get the info needed to add a quirk.

'camcontrol devlist -v' reports:

# camcontrol devlist -v
scbus0 on umass-sim0 bus 0:
< USB DISK 2.08>                   at scbus0 target 0 lun 0 (da0)
scbus-1 on xpt0 bus 0:
<  >                               at scbus-1 target -1 lun -1 (xpt0)

If I unmount it (umount /mnt), disconnect it, and later remount it I get:

umass0: detached
umass0:   USB Disk, rev 1.10/1.00, addr 2
da0 at umass-sim0 bus 0 target 0 lun 0
da0: < USB DISK 2.08> Removable Direct Access SCSI-0 device
da0: 650KB/s transfers
da0: 15MB (32000 512 byte sectors: 64H 32S/T 15C)
umass0: BBB reset failed, TIMEOUT
umass0: BBB bulk-in clear stall failed, TIMEOUT
umass0: BBB bulk-out clear stall failed, TIMEOUT
umass0: BBB reset failed, TIMEOUT
umass0: BBB bulk-in clear stall failed, TIMEOUT
umass0: BBB bulk-out clear stall failed, TIMEOUT
umass0: BBB reset failed, TIMEOUT
umass0: BBB bulk-in clear stall failed, TIMEOUT
umass0: BBB bulk-out clear stall failed, TIMEOUT
umass0: BBB reset failed, TIMEOUT
umass0: BBB bulk-in clear stall failed, TIMEOUT
umass0: BBB bulk-out clear stall failed, TIMEOUT
umass0: BBB reset failed, TIMEOUT
umass0: BBB bulk-in clear stall failed, TIMEOUT
umass0: BBB bulk-out clear stall failed, TIMEOUT
da0: reading primary partition table: error reading fsbn 0
umass0: BBB reset failed, TIMEOUT
umass0: BBB bulk-in clear stall failed, TIMEOUT
umass0: BBB bulk-out clear stall failed, TIMEOUT
(da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status
== 0x0
....etc

it's then lost, until I next reboot the PC.


Qu: is my Apacer device the same one that is mentioned in the scsi_da.c
quirk i.e.,
                {T_DIRECT, SIP_MEDIA_REMOVABLE, "Apacer", "HandyDrive",
"*"},
                /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE

Qu: Do I need another quirk added to the above Apacer quirk, or a whole new
quirk, as I have a Apacer Handy Steno, not a HandyDrive?

Qu: Since 'camcontrol devlist -v' reports that my USB device as a '< USB
DISK 2.08>' do I need to set that name up as a quirk instead?

Qu: If I do need to edit/create a new quirk, what method do I use to compile
the file etc?

NOTE: *Any* info I appear to be lacking would be appreciated!  :-)

Cheers,

Paul Hamilton




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