From owner-freebsd-stable@FreeBSD.ORG Thu Mar 31 20:07:14 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B406F16A4CE for ; Thu, 31 Mar 2005 20:07:14 +0000 (GMT) Received: from vidle.i.cz (vidle.i.cz [193.179.36.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id B3E2243D49 for ; Thu, 31 Mar 2005 20:07:13 +0000 (GMT) (envelope-from michal.mertl@i.cz) Received: from ns.i.cz (brana.i.cz [193.179.36.134]) by vidle.i.cz (Postfix) with ESMTP id A9B942E001; Thu, 31 Mar 2005 22:07:12 +0200 (CEST) Received: from localhost (localhost.i.cz [127.0.0.1]) by ns.i.cz (Postfix) with SMTP id 882A3F4B6F; Thu, 31 Mar 2005 22:07:12 +0200 (CEST) X-AV-Checked: Thu Mar 31 22:07:12 2005 ns.i.cz Received: from localhost.localdomain (brana.i.cz [192.168.1.10]) by ns.i.cz (Postfix) with ESMTP id 349BEF4B6D; Thu, 31 Mar 2005 22:07:12 +0200 (CEST) From: Michal Mertl To: Mikhail Godovitcin In-Reply-To: <9010655360.20050331170627@kc.ru> References: <9810651560.20050331150748@kc.ru> <9010655360.20050331170627@kc.ru> Content-Type: multipart/mixed; boundary="=-/tKeQV5MrFdwkGYQcrhO" Date: Thu, 31 Mar 2005 22:07:10 +0200 Message-Id: <1112299630.656.22.camel@genius2.i.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 FreeBSD GNOME Team Port cc: freebsd-stable@freebsd.org Subject: Re: Re[2]: USB JetFlash X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 20:07:14 -0000 --=-/tKeQV5MrFdwkGYQcrhO Content-Type: text/plain Content-Transfer-Encoding: 7bit Mikhail Godovitcin wrote: > Hello! > > Thursday, March 31, 2005, 16:48, you wrote: > > I believe I should be able to help you. I've got smaller JetFlash which > > works. Yours might need a quirk entry in umass.c. > > Can you send us the output of 'usbdevs -v'? > > Yes, sure. Here it is. > > > # usbdevs -v > > Controller /dev/usb0: > > addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 > > port 1 addr 2: full speed, power 100 mA, config 1, Flash Disk(0x2168), USB(0x0ea0), rev 2.00 > > port 2 powered > > > # camcontrol inquiry da0 > > pass0: Removable Direct Access SCSI-2 device > > pass0: Serial Number  > > pass0: 1.000MB/s transfers Thank you. I'm afraid I can't easily help you because your device is different than mine. You can try attached patch anyways. Apply with 'cd /sys/dev/usb;patch < jmtek.diff;cd /sys/modules/umass;make -DUSB_DEBUG=1;make unload;make load'. I won't be surprised if it didn't fix your disk though. You might try to change UMASS_ADD_DELAY in { USB_VENDOR_OTI, USB_PRODUCT_OTI_JETFLASH2, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, UMASS_ADD_DELAY }, to 'IGNORE_RESIDUE | NO_GETMAXLUN | RS_NO_CLEAR_UA'. Maybe FORCE_SHORT_INQUIRY instead/in addition to these. After modifying umass.c you need to rebuild and unload&load the kld. If you have umass (or whole usb) in your kernel ('device umass') you should comment it out, reinstall kernel and reboot. Then you'll be able to try different quirk values. HTH Michal --=-/tKeQV5MrFdwkGYQcrhO Content-Disposition: attachment; filename=jmtek.diff Content-Type: text/x-patch; name=jmtek.diff; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit Index: umass.c =================================================================== RCS file: /home/fcvs/cvs/src/sys/dev/usb/umass.c,v retrieving revision 1.121 diff -u -r1.121 umass.c --- umass.c 25 Mar 2005 01:47:01 -0000 1.121 +++ umass.c 31 Mar 2005 19:53:51 -0000 @@ -314,6 +314,8 @@ # define NO_INQUIRY 0x0400 /* Device cannot handle INQUIRY EVPD, return CHECK CONDITION */ # define NO_INQUIRY_EVPD 0x0800 + /* Device needs time to settle down - should be fixed elsewhere*/ +# define UMASS_ADD_DELAY 0x1000 }; Static struct umass_devdescr_t umass_devdescrs[] = { @@ -387,6 +389,10 @@ UMASS_PROTO_ATAPI | UMASS_PROTO_BBB, NO_QUIRKS }, + { USB_VENDOR_MSYSTEMS, USB_PRODUCT_MSYSTEMS_DELLMEMKEY, RID_WILDCARD, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + UMASS_ADD_DELAY + }, { USB_VENDOR_NEODIO, USB_PRODUCT_NEODIO_ND3260, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY @@ -399,6 +405,10 @@ UMASS_PROTO_ATAPI | UMASS_PROTO_BBB, NO_INQUIRY | NO_GETMAXLUN }, + { USB_VENDOR_OTI, USB_PRODUCT_OTI_JETFLASH2, RID_WILDCARD, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + UMASS_ADD_DELAY + }, { USB_VENDOR_PANASONIC, USB_PRODUCT_PANASONIC_KXLCB20AN, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS @@ -891,6 +901,7 @@ (void) umass_match_proto(sc, sc->iface, uaa->device); id = usbd_get_interface_descriptor(sc->iface); + #ifdef USB_DEBUG printf("%s: ", USBDEVNAME(sc->sc_dev)); switch (sc->proto&UMASS_PROTO_COMMAND) { @@ -2263,6 +2274,7 @@ Static int umass_cam_attach(struct umass_softc *sc) { + int delay_len; #ifndef USB_DEBUG if (bootverbose) #endif @@ -2279,7 +2291,11 @@ * completed, when interrupts have been enabled. */ - usb_callout(sc->cam_scsi_rescan_ch, MS_TO_TICKS(200), + if (sc->quirks && UMASS_ADD_DELAY) + delay_len = 2000; + else + delay_len = 200; + usb_callout(sc->cam_scsi_rescan_ch, MS_TO_TICKS(delay_len), umass_cam_rescan, sc); } Index: usbdevs =================================================================== RCS file: /home/fcvs/cvs/src/sys/dev/usb/usbdevs,v retrieving revision 1.226 diff -u -r1.226 usbdevs --- usbdevs 21 Mar 2005 08:43:54 -0000 1.226 +++ usbdevs 31 Mar 2005 19:54:21 -0000 @@ -529,6 +529,7 @@ vendor SITECOM 0x6189 Sitecom vendor INTEL 0x8086 Intel vendor HP2 0xf003 Hewlett Packard +vendor JMTEK 0x0c76 JMTek, LLC. /* * List of known products. Grouped by vendor. @@ -1188,6 +1189,7 @@ /* M-Systems products */ product MSYSTEMS DISKONKEY 0x0010 DiskOnKey product MSYSTEMS DISKONKEY2 0x0011 DiskOnKey +product MSYSTEMS DELLMEMKEY 0x0015 Dell Memory Key /* National Semiconductor */ product NATIONAL BEARPAW1200 0x1000 BearPaw 1200 @@ -1560,3 +1562,9 @@ /* ZyXEL Communication Co. products */ product ZYXEL OMNI56K 0x1500 Omni 56K Plus product ZYXEL 980N 0x2011 Scorpion-980N keyboard + +/* JMTek, LLC. products */ +product JMTEK JETFLASH 0x0005 Transcend JetFlash + +/* Ours Technology, Inc. products */ +product OTI JETFLASH2 0x2168 Transcend JetFlash 2.0 --=-/tKeQV5MrFdwkGYQcrhO--