From owner-freebsd-questions@FreeBSD.ORG Sun Jun 22 06:48:08 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D77EA37B423 for ; Sun, 22 Jun 2003 06:48:01 -0700 (PDT) Received: from cwe.compwest.com.au (compwest.com.au [202.72.147.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B16544013 for ; Sun, 22 Jun 2003 05:50:51 -0700 (PDT) (envelope-from paul@bdug.org.au) Received: from ant.bdug.org.au (ant.parkview.compwest.com.au [202.72.147.43]) by cwe.compwest.com.au (8.12.6/8.11.6) with ESMTP id h5MCokKn003942 for ; Sun, 22 Jun 2003 20:50:48 +0800 (WST) (envelope-from paul@bdug.org.au) Received: from wks (wks.bdug.org.au [192.168.0.2]) by ant.bdug.org.au (8.12.9/8.12.6) with SMTP id h5MCoffe016776; Sun, 22 Jun 2003 20:50:42 +0800 (WST) (envelope-from paul@bdug.org.au) From: "Paul Hamilton" To: "Freebsd-Questions" Date: Sun, 22 Jun 2003 20:50:25 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-reply-to: X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal Subject: RE: adding a quirk for a USB memory device X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2003 13:48:08 -0000 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