Subject: kern/29771: Some newer USB memory don't work
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <kimoto@ohnolab.org>
List: netbsd-bugs
Date: 03/23/2005 14:04:00
>Number:         29771
>Category:       kern
>Synopsis:       Some newer USB memory don't work
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 23 14:04:00 +0000 2005
>Originator:     Masahiko KIMOTO
>Release:        NetBSD 2.99.16
>Organization:
----------------------------------------------------------------------
Masahiko KIMOTO, Ph. D.
E-mail: kimoto@ohnolab.org        URL: http://www.ohnolab.org/~kimoto
>Environment:
System: NetBSD gaia.earthlight.jp 2.99.16 NetBSD 2.99.16 (GAIA) #39: Sat Mar 5 22:23:22 JST 2005 kimoto@gaia.earthlight.jp:/local/home/kimoto/work/source/netbsd/src/sys/arch/i386/compile/GAIA i386
Architecture: i386
Machine: i386
>Description:
	Some Newer USB memory sticks need quirks.
>How-To-Repeat:
	When such memory is inserted, /dev/scsibus0 appears, but
	it hangs when I scan the device by 'scsictl /dev/scsibus0 scan 0 0'
>Fix:
	apply the following patch.

Index: umass_quirks.c
===================================================================
RCS file: /cvs/cvsroot/src/sys/dev/usb/umass_quirks.c,v
retrieving revision 1.68
diff -c -r1.68 umass_quirks.c
*** umass_quirks.c	2 Mar 2005 11:37:27 -0000	1.68
--- umass_quirks.c	15 Mar 2005 13:37:34 -0000
***************
*** 187,192 ****
--- 187,199 ----
  	  UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO,
  	  NULL, NULL
  	},
+ 	{ { USB_VENDOR_MSYSTEMS, USB_PRODUCT_MSYSTEMS_DISKONKEY3 },
+ 	  UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC,
+ 	  0,
+ 	  PQUIRK_NOBIGMODESENSE,
+ 	  UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO,
+ 	  NULL, NULL
+ 	},
  };
  
  const struct umass_quirk *
Index: usbdevs
===================================================================
RCS file: /cvs/cvsroot/src/sys/dev/usb/usbdevs,v
retrieving revision 1.397
diff -c -r1.397 usbdevs
*** usbdevs	1 Mar 2005 03:18:52 -0000	1.397
--- usbdevs	15 Mar 2005 13:37:34 -0000
***************
*** 1320,1325 ****
--- 1320,1326 ----
  /* M-Systems products */
  product MSYSTEMS DISKONKEY	0x0010	DiskOnKey
  product MSYSTEMS DISKONKEY2	0x0011	DiskOnKey
+ product MSYSTEMS DISKONKEY3	0x0012	DiskOnKey
  
  /* National Instruments */
  product NI GPIB_USB_A		0xc920	GPIB-USB-A
Index: usbdevs.h
===================================================================
RCS file: /cvs/cvsroot/src/sys/dev/usb/usbdevs.h,v
retrieving revision 1.401
diff -c -r1.401 usbdevs.h
*** usbdevs.h	4 Mar 2005 05:03:42 -0000	1.401
--- usbdevs.h	15 Mar 2005 13:37:35 -0000
***************
*** 1,4 ****
! /*	$NetBSD: usbdevs.h,v 1.401 2005/03/04 05:03:42 mycroft Exp $	*/
  
  /*
   * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
--- 1,4 ----
! /*	$NetBSD$	*/
  
  /*
   * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
***************
*** 1327,1332 ****
--- 1327,1333 ----
  /* M-Systems products */
  #define	USB_PRODUCT_MSYSTEMS_DISKONKEY	0x0010		/* DiskOnKey */
  #define	USB_PRODUCT_MSYSTEMS_DISKONKEY2	0x0011		/* DiskOnKey */
+ #define	USB_PRODUCT_MSYSTEMS_DISKONKEY3	0x0012		/* DiskOnKey */
  
  /* National Instruments */
  #define	USB_PRODUCT_NI_GPIB_USB_A	0xc920		/* GPIB-USB-A */
Index: usbdevs_data.h
===================================================================
RCS file: /cvs/cvsroot/src/sys/dev/usb/usbdevs_data.h,v
retrieving revision 1.402
diff -c -r1.402 usbdevs_data.h
*** usbdevs_data.h	4 Mar 2005 05:03:42 -0000	1.402
--- usbdevs_data.h	15 Mar 2005 13:37:37 -0000
***************
*** 1,4 ****
! /*	$NetBSD: usbdevs_data.h,v 1.402 2005/03/04 05:03:42 mycroft Exp $	*/
  
  /*
   * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
--- 1,4 ----
! /*	$NetBSD$	*/
  
  /*
   * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
***************
*** 3850,3855 ****
--- 3850,3859 ----
  	    "DiskOnKey",
  	},
  	{
+ 	    USB_VENDOR_MSYSTEMS, USB_PRODUCT_MSYSTEMS_DISKONKEY3,
+ 	    "DiskOnKey",
+ 	},
+ 	{
  	    USB_VENDOR_NI, USB_PRODUCT_NI_GPIB_USB_A,
  	    "GPIB-USB-A",
  	},
***************
*** 5166,5169 ****
  	    "Scorpion-980N keyboard",
  	},
  };
! const int usb_nproducts = 908;
--- 5170,5173 ----
  	    "Scorpion-980N keyboard",
  	},
  };
! const int usb_nproducts = 909;