Subject: kern/12812: Patch needed to add support for Microtech USB-SCSI-HD50 usb scsi adapter
To: None <gnats-bugs@gnats.netbsd.org>
From: None <waddell@caravan.com>
List: netbsd-bugs
Date: 05/03/2001 00:38:09
>Number:         12812
>Category:       kern
>Synopsis:       Patch needed to add support for Microtech USB-SCSI-HD50 usb scsi adapter
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu May 03 00:38:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Harry Waddell
>Release:        NetBSB-current/i-386
>Organization:
Caravan Publishing
>Environment:
NetBSD scimitar 1.5V NetBSD 1.5V (GENERIC_LAPTOP) #7: Wed May  2 23:34:24 PDT 2001     waddell@scimitar:/usr/src/sys/arch/i386/compile/GENERIC_LAPTOP i386

>Description:
The microtech USB-SCSI-HD50 seems to work, e.g. it can actually find devices 
attached to it, after applying the supplied patch below. Since 
Microtech is an OEM for shuttle, at least according to some 
linux usb pages I simply re-purposed an existing Shuttle devices 
definitions and now I get the following result:

umass0 at uhub1 port 3 configuration 1 interface 0
umass0: Microtech International, Inc. USB-SCSI-HD50, rev 1.00/1.00, addr 6
umass0: using SFF8020i over CBI
atapibus0 at umass0 channel 0: 2 targets
cd0 at atapibus0 drive 0: <PIONEER, CD-ROM DR-U12X, 1.06> type 5 cdrom removable

unfortunately, I guess one can not connect a tape drive to an atapi bus:

atapibus0 at umass0 channel 0: 2 targets
uk0 at atapibus0 drive 0: <Quantum, DLT4000, CC37> type 1 sequential removable
uk0: unknown device


>How-To-Repeat:
Attach micotech usb scsi adapter to usb port. attachment of scsi 
targets will fail. scsictl scan will not find devices.
>Fix:


Index: umass.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/usb/umass.c,v
retrieving revision 1.61
diff -u -r1.61 umass.c
--- umass.c     2001/04/26 03:59:32     1.61
+++ umass.c     2001/05/03 07:04:01
@@ -261,6 +261,27 @@
                return (UMATCH_VENDOR_PRODUCT);
        }
 
+
+       if (vendor ==  USB_VENDOR_MICROTECH  &&
+            product == USB_PRODUCT_MICROTECH_SCSIHD50
+           ) {
+
+         //                    sc->drive = SHUTTLE_EUSB;
+#if CBI_I
+               sc->wire_proto = WPROTO_CBI_I;
+               sc->cmd_proto = CPROTO_ATAPI;
+#else
+               sc->wire_proto = WPROTO_CBI;
+               sc->cmd_proto = CPROTO_ATAPI;
+#endif
+               sc->subclass = UISUBCLASS_SFF8020I;
+               sc->protocol = UIPROTO_MASS_CBI;
+               sc->quirks |= NO_TEST_UNIT_READY | NO_START_STOP;
+               return (UMATCH_VENDOR_PRODUCT);
+       }
+
+
+
        if (vendor == USB_VENDOR_MICROTECH &&
            product == USB_PRODUCT_MICROTECH_DPCM) {
                sc->wire_proto = WPROTO_CBI;


>Release-Note:
>Audit-Trail:
>Unformatted: