Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2001 20:07:43 +0100 (BST)
From:      Nick Hibma <n_hibma@webweaving.org>
To:        Jim Bryant <kc5vdj@yahoo.com>
Cc:        <freebsd-scsi@FreeBSD.ORG>, Phil Knaack <pknaack1@netscape.net>
Subject:   Re: Microtech USB CameraMate patches: update!
Message-ID:  <20010821200459.A578-100000@heather.plazza.uk>
In-Reply-To: <3B7EEEA3.5030507@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.

> 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).

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: <eUSB Compact Flash \\0001> 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
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




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