From owner-freebsd-usb@FreeBSD.ORG Mon Sep 11 22:50:19 2006 Return-Path: X-Original-To: freebsd-usb@hub.freebsd.org Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F0AB16A412 for ; Mon, 11 Sep 2006 22:50:19 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 956A043D55 for ; Mon, 11 Sep 2006 22:50:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k8BMoIMQ039413 for ; Mon, 11 Sep 2006 22:50:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k8BMoIcK039412; Mon, 11 Sep 2006 22:50:18 GMT (envelope-from gnats) Resent-Date: Mon, 11 Sep 2006 22:50:18 GMT Resent-Message-Id: <200609112250.k8BMoIcK039412@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vladimir Kushnir Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 01C0716A407 for ; Mon, 11 Sep 2006 22:50:00 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8347E43D53 for ; Mon, 11 Sep 2006 22:49:59 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k8BMnxGx009566 for ; Mon, 11 Sep 2006 22:49:59 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k8BMnxX3009565; Mon, 11 Sep 2006 22:49:59 GMT (envelope-from nobody) Message-Id: <200609112249.k8BMnxX3009565@www.freebsd.org> Date: Mon, 11 Sep 2006 22:49:59 GMT From: Vladimir Kushnir To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: usb/103167: Transcend JetFlash120 memory stick problem (with fix) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2006 22:50:19 -0000 >Number: 103167 >Category: usb >Synopsis: Transcend JetFlash120 memory stick problem (with fix) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 11 22:50:17 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Vladimir Kushnir >Release: 7.0-CURRENT >Organization: BITP >Environment: FreeBSD kushnir1.kiev.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Mon Sep 11 19:49:33 EEST 2006 root@kushnir1.kiev.ua:/usr/obj/usr/src/sys/KUSHNIR amd64 >Description: Transcend JetFlash120 memory stick (perhaps, others as well) isn;t detected; system just gives an IOERROR: ehci_pcd: change=0x00 uhub_explore: status change hub=1 port=8 ehci after reset, status=0x00001005 ehci port 8 reset, status = 0x00001005 usbd_new_device bus=0xffffff0000a1b000 port=8 depth=1 speed=3 usbd_new_device: addr=2, getting first desc failed usbd_remove_device: 0xffffff0016b47d00 ehci_device_ctrl_close: pipe=0xffffff001784a180 ehci_intr1: door bell uhub_explore: usb_new_device failed, error=IOERROR uhub1: device problem (IOERROR), disabling port 8 (This is -CURRENT, with USB debugging enabled and "options DIAGNOSTIC") >How-To-Repeat: Try to use it :-) >Fix: Probably, this is a hack but it works here: re-get desc; with this patch a relevant part of dmesg: umass0: on uhub1 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0: Get Max Lun not supported (STALLED) umass0:7:0:-1: Attached to scbus7 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0: 40.000MB/s transfers da0: 980MB (2007040 512 byte sectors: 64H 32S/T 980C) /*------------ patvh begins -----------------*/ *** dev/usb/usb_subr.c.orig Mon Sep 11 19:28:35 2006 --- dev/usb/usb_subr.c Mon Sep 11 20:05:38 2006 *************** *** 1112,1118 **** dd = &dev->ddesc; /* Get the first 8 bytes of the device descriptor. */ ! err = usbd_get_desc(dev, UDESC_DEVICE, 0, USB_MAX_IPACKET, dd); if (err) { DPRINTFN(-1, ("usbd_new_device: addr=%d, getting first desc " "failed\n", addr)); --- 1112,1123 ---- dd = &dev->ddesc; /* Get the first 8 bytes of the device descriptor. */ ! for (i = 0; i < 3; i++) { ! err = usbd_get_desc(dev, UDESC_DEVICE, 0, USB_MAX_IPACKET, dd); ! if (!err) ! break; ! usbd_delay_ms(dev, USB_SET_ADDRESS_SETTLE); ! } if (err) { DPRINTFN(-1, ("usbd_new_device: addr=%d, getting first desc " "failed\n", addr)); >Release-Note: >Audit-Trail: >Unformatted: