Subject: kern/18990: usbdevs and umass quirks (MELCO Inc. MCR-SM2)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <naoki@fukaumi.org>
List: netbsd-bugs
Date: 11/09/2002 18:12:45
>Number:         18990
>Category:       kern
>Synopsis:       usbdevs and umass quirks (MELCO Inc. MCR-SM2)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 09 01:13:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     FUKAUMI Naoki
>Release:        NetBSD 1.6J
>Organization:
	FUKAUMI Naoki
>Environment:
System: NetBSD crusoe.naobsd.org 1.6J NetBSD 1.6J (NT310S) #2: Sat Nov 9 17:42:50 JST 2002 fun@nforce.naobsd.org:/usr/obj/i386/sys/arch/i386/compile/NT310S i386
Architecture: i386
Machine: i386
>Description:
	http://buffalo.melcoinc.co.jp/products/catalog/item/m/mcr-sm2/index.html
	MELCO Inc. MCR-SM2 SmartMedia Card Reader needs umass quirks.

>How-To-Repeat:
	Insert with 16MB card...

[before patch]
umass0 at uhub0 port 2 configuration 1 interface 0
umass0: MELCO INC. MCR-SM2, rev 1.10/5.03, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 1 lun 0: <eUSB, SmartMedia, 5.03> disk removable
sd0: 976 MB, 131076 cyl, 22 head, 0 sec, 32000 bytes/sect x 32000 sectors

[after patch]
umass0 at uhub0 port 2 configuration 1 interface 0
umass0: MELCO INC. MCR-SM2, rev 1.10/5.03, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 1 lun 0: <eUSB, SmartMedia, 5.03> disk removable
sd0: 16000 KB, 500 cyl, 4 head, 16 sec, 512 bytes/sect x 32000 sectors

>Fix:
	patch && make -f Makefile.usbdevs

Index: umass_quirks.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/usb/umass_quirks.c,v
retrieving revision 1.24
diff -u -r1.24 umass_quirks.c
--- umass_quirks.c	2002/10/05 01:11:47	1.24
+++ umass_quirks.c	2002/11/09 09:11:10
@@ -137,6 +137,14 @@
 	  NULL, NULL
 	},
 
+	{ { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_MCRSM2 },
+	  UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC,
+	  0,
+	  PQUIRK_NOBIGMODESENSE,
+	  UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO,
+	  NULL, NULL
+	},
+
 	{ { USB_VENDOR_MICROTECH, USB_PRODUCT_MICROTECH_DPCM },
 	  UMASS_WPROTO_CBI, UMASS_CPROTO_ATAPI,
 	  0,
Index: usbdevs
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/usb/usbdevs,v
retrieving revision 1.278
diff -u -r1.278 usbdevs
--- usbdevs	2002/10/20 13:49:46	1.278
+++ usbdevs	2002/11/09 09:11:11
@@ -930,6 +930,7 @@
 product MELCO LUATX5		0x0005	LUA-TX Ethernet
 product MELCO LUA2TX5		0x0009	LUA2-TX Ethernet
 product MELCO LUAKTX		0x0012	LUA-KTX Ethernet
+product MELCO MCRSM2		0x001b	MCR-SM2 SmartMedia Card Reader/Writer
 
 /* Metricom products */
 product METRICOM RICOCHET_GS	0x0001	Ricochet GS
>Release-Note:
>Audit-Trail:
>Unformatted: