From owner-freebsd-scsi Tue Aug 21 15:28:16 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from smtp017.mail.yahoo.com (smtp017.mail.yahoo.com [216.136.174.114]) by hub.freebsd.org (Postfix) with SMTP id 47AB937B407 for ; Tue, 21 Aug 2001 15:28:08 -0700 (PDT) (envelope-from kc5vdj@yahoo.com) Received: from mkc-65-28-47-209.kc.rr.com (HELO yahoo.com) (65.28.47.209) by smtp.mail.vip.sc5.yahoo.com with SMTP; 21 Aug 2001 22:28:07 -0000 X-Apparently-From: Message-ID: <3B82E077.2020803@yahoo.com> Date: Tue, 21 Aug 2001 17:28:07 -0500 From: Jim Bryant Reply-To: kc5vdj@yahoo.com User-Agent: Mozilla/5.0 (X11; U; Linux i386; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1 X-Accept-Language: en-us MIME-Version: 1.0 To: Nick Hibma Cc: freebsd-scsi@FreeBSD.ORG, Phil Knaack Subject: Re: Microtech USB CameraMate patches: update! References: <20010821200459.A578-100000@heather.plazza.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Nick Hibma wrote: >>In both of the header files, I read that they are automagically generated from the rather elegant awk script. >> >>The problem being that mine had not been regenerated since early-mid June or July [sorry I forgot to write down the date]... >> > > It shouldn't be, 2001/05/17 was the last time the file was modified. > usbdevs*.h is generated after the usbdevs file has been modified, > manually. Well, if that's the case, then I think the USB people should change the comments in the files that lead one to think they would be built whenever usbdevs is changed. Just by reading the files, you would think that if you change usbdevs, that the makefile for the includes is run automatically. If it was changed to reflect the comments in the files, then that would be two less files to cvsup when changes are indeed made, especially if they only take a second to build locally, assuming that the makefile could be modified. In the meantime, I'll post patches to the two include files... Phil included these to me when he sent the patches originally, but as I recall, even though his code was correct, only one of the five patch files actually took when applied, and that's why I used emacs, and generated patches against -current based on my inserting them by hand. > >>The patches I posted for usbdevs, and umass.c are correct. The scsi_da.c one is correct, but as I was playing with them to get them >>to patch -current, the line numbers were off, and thus patch tended to dump core rather nastily. >> > > That shouldn't be. Patch should handle be able to find the correct > location with the context ('with fuzz XX', XX being the line offset). I don't know what caused this, and I have seen patch really work fuzzy in the past, but... patch.core... I didn't save the corefile to find out... the original scsi_da.c patch I posted will produce a patch coredump tho... The revised one I sent won't. I don't subscribe to the list, but since these devices act like SCSI devices, I posted them here, and hopefully someone will commit the patches to -current. They seem to work just fine. Although I don't have SmartMedia cards [my camera only uses CF], I'm assuming that it will work just fine as well. This reader also supports the IBM Microdrive II gigger [assuming someone out there has the dough to buy one, I saw the eBay prices and said "I'll wait a couple of years"]. Anyhow, I'm probably not alone in lack of support for the serial interface on my camera, as I can see, only a limited number of such cameras are supported under anything other than WinBlowz, and a lot of people have to use these readers to get their pix. Trying to get dox outta Polaroid for their serial interface is like squeezing blood outta a turnip, hell, just trying to find someone who knows anything about the camera is hard enough, and it's one of their best-sellers [PDC-700]. I guess that's what you get from a customer-support operation run by their marketing division... #1 way to screw up a technical support operation: Hire marketing majors to run it. [No offense to any marketing types out there, but my experience is that marketing-types can generally screw up anything they touch]. All that aside, let's get these patches into -current! [please] > > Nick > > >>Here is the correct patch for scsi_da.c: >> >>------------------------------------------------------------------------------------------------- >>*** scsi_da.c~ Fri Jul 20 04:20:43 2001 >>--- scsi_da.c Sat Aug 18 07:32:59 2001 >>*************** >>*** 211,216 **** >>--- 211,223 ---- >> >> /* Below a list of quirks for USB devices supported by umass. */ >> { >>+ /* the Microtech USB CameraMate does not like >>+ * the sync-cache command, or READ_6. >>+ */ >>+ {T_DIRECT, SIP_MEDIA_REMOVABLE, "eUSB Compact*", "Compact Flash*", "*"}, >>+ /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE >>+ }, >>+ { >> /* >> * This USB floppy drive uses the UFI command set. This >> * command set is a derivative of the ATAPI command set and >>-------------------------------------------------------------------------------------------------- >> >>Note that the only change is the line numbers. >> >>Jim Bryant wrote: >> >> >>>I have received, and tested the following patches to usbdevs, umass.c, >>>and scsi_da.c from Phil Knaack. >>> >>>These patches do work, and I would like to submit them in Phil's name >>>[please use Phil's name, as all I have done is test the patches he made] >>>to be committed to -current, and if someone can test them in -stable, >>>that too. I can only vouch for these patches under -current, but I >>>don't see any reason they shouldn't work in -stable. >>> >>>BTW: Phil, the patches to usbdevs.h and usbdevs_data.h are not needed, >>>as those get generated automagically from usbdevs at compile-time. >>> >>>I also have a question. How do I make this da1 instead of da0, assuming >>>it's attached all the time? I understand how to wire down SCSI devices >>>under normal conditions, but not using umass... Would just wiring down >>>da0 to ahc1:0:0 suffice, or would I have to deal with the umass driver >>>as well, since it seems to preceed ahc in the probe sequence? >>> >>>/usr/src/sys/dev/usb/usbdevs: >>>----------------------------------------------------------------------- >>>*** usbdevs~ Wed Jul 11 04:08:49 2001 >>>--- usbdevs Thu Aug 16 15:47:47 2001 >>>*************** >>>*** 923,928 **** >>>--- 923,931 ---- >>> /* Trek Technology products */ >>> product TREK THUMBDRIVE 0x1111 ThumbDrive >>> >>>+ /* Microtech products */ >>>+ product MICROTECH CAMERAMATE 0x0006 DPCM_USB CameraMate >>>+ >>> /* UMAX products */ >>> product UMAX ASTRA1236U 0x0002 Astra 1236U Scanner >>> product UMAX ASTRA1220U 0x0010 Astra 1220U Scanner >>>----------------------------------------------------------------------- >>> >>> >>>/usr/src/sys/dev/usb/umass.c: >>>----------------------------------------------------------------------- >>>*** umass.c~ Thu Aug 16 15:43:08 2001 >>>--- umass.c Thu Aug 16 15:45:43 2001 >>>*************** >>>*** 608,613 **** >>>--- 608,622 ---- >>> } >>> #endif >>> >>>+ if (UGETW(dd->idVendor) == USB_VENDOR_MICROTECH >>>+ && UGETW(dd->idProduct) == USB_PRODUCT_MICROTECH_CAMERAMATE) { >>>+ /* the cameramate does not provide valid >>>+ class/subclass information. fake it. */ >>>+ sc->proto = PROTO_SCSI | PROTO_CBI; >>>+ sc->quirks |= NO_TEST_UNIT_READY | NO_START_STOP; >>>+ return(UMATCH_VENDOR_PRODUCT); >>>+ } >>>+ >>> if (UGETW(dd->idVendor) == USB_VENDOR_YEDATA >>> && UGETW(dd->idProduct) == USB_PRODUCT_YEDATA_FLASHBUSTERU) { >>>----------------------------------------------------------------------- >>> >>> >>>/usr/src/sys/cam/scsi/scsi_da.c: >>>----------------------------------------------------------------------- >>>*** scsi_da.c~ Fri Jul 20 04:20:43 2001 >>>--- scsi_da.c Thu Aug 16 15:54:41 2001 >>>*************** >>>*** 211,216 **** >>>--- 211,224 ---- >>> >>> /* Below a list of quirks for USB devices supported by umass. */ >>> { >>>+ /* the Microtech USB CameraMate does not like >>>+ * the sync-cache command, or READ_6. >>>+ */ >>>+ {T_DIRECT, SIP_MEDIA_REMOVABLE, "eUSB Compact*", >>>"Compact Flash*", "*"}, >>>+ /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE >>>+ }, >>>+ { >>> /* >>> * This USB floppy drive uses the UFI command set. This >>> * command set is a derivative of the ATAPI command set and >>>----------------------------------------------------------------------- >>> >>>umass0: Microtech International, Inc DPCM-USB, rev 1.00/1.00, addr 2 >>>da0: Removable Direct Access SCSI-2 device >>> >>>Filesystem 1K-blocks Used Avail Capacity iused ifree %iused >>>Mounted on >>>/dev/ad0s1a 127023 102858 14004 88% 2126 29616 7% / >>>devfs 1 1 0 100% 0 0 100% >>>/dev >>>/dev/ad0s1e 8130540 7364540 115557 98% 350982 1680632 17% >>>/usr >>>/dev/ad0s1f 508143 59025 408467 13% 11961 115013 9% >>>/var >>>/dev/ad0s1g 8130540 5682999 1797098 76% 57626 1973988 3% >>>/home >>>/dev/ad0s1h 1480757 826372 535925 61% 6240 363742 2% >>>/tmp >>>/dev/ad1s1e 12938696 11521840 381761 97% 10361 3227525 0% >>>/misc >>>procfs 4 4 0 100% 107 425 20% >>>/proc >>>linprocfs 4 4 0 100% 1 0 100% >>>/usr/compat/linux/proc >>>/dev/da1s1 4184740 3444184 740556 82% 0 0 100% >>>/ms-dog >>>/dev/da0s1 16024 212 15812 1% 512 0 100% >>>/cf-reader jim -- ET has one helluva sense of humor! He's always anal-probing right-wing schizos! _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message