From owner-freebsd-usb@FreeBSD.ORG Fri Apr 25 16:48:05 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 881271065673 for ; Fri, 25 Apr 2008 16:48:05 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id 06BF18FC21 for ; Fri, 25 Apr 2008 16:48:04 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [62.113.133.152] (account mc467741@c2i.net [62.113.133.152] verified) by mailfe03.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 919041310; Fri, 25 Apr 2008 18:47:55 +0200 From: Hans Petter Selasky To: "Xiaofan Chen" Date: Fri, 25 Apr 2008 18:49:10 +0200 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804251849.11283.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: PICDEM FS USB Bootloader under FreeBSD 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: Fri, 25 Apr 2008 16:48:05 -0000 Hi, 1) Try to get debugging from USB instead of OHCI. sysctl hw.usb.ohci.debug=0 sysctl hw.usb.debug=15 Retry. 2) Patch /sys/dev/usb/ugen.c Change all lines looking like the following, that are not in a function named "xxx_callback": sce->read_stall = 1; sce->write_stall = 1; Into: sce->read_stall = 0; sce->write_stall = 0; Recompile ugen an try again. My analysis so far: The USB device refuses a control transfer, possibly the clear-stall request: ohci_setup_standard_chain: addr=2 endpt=0 sumlen=8 speed=2 ohci_setup_standard_chain: nexttog=1; data before transfer: TD(0xc4d6b600) at 0x0b06d600: -TOG0 delay=7 ec=0 cc=15 cbp=0x13ceb210 next=0x0b06d700 be=0x13ceb217 TD(0xc4d6b700) at 0x0b06d700: -R-IN-TOG1 delay=1 ec=0 cc=15 cbp=0x00000000 next=0x00000000 be=0xffffffff _ohci_append_qh: 0xc4d6b680 to 0xc4071980 ohci_check_transfer: xfer=0xc4f61140 checking transfer ohci_non_isoc_done: xfer=0xc4f61140 pipe=0xc4ee81b0 transfer done TD(0xc4d6b600) at 0x0b06d600: -TOG1 delay=7 ec=0 cc=0 cbp=0x00000000 next=0x00000000 be=0x13ceb217 ohci_device_done: xfer=0xc4f61140, pipe=0xc4ee81b0, error=22 The OHCI wants to receive 4 bytes from endpoint 1, but does never get those bytes. The transfer times out. ohci_setup_standard_chain: addr=2 endpt=1 sumlen=4 speed=2 ohci_setup_standard_chain: nexttog=0; data before transfer: TD(0xc4d6b380) at 0x0b06d380: -R-IN-TOG0 delay=1 ec=0 cc=15 cbp=0x13d12140 next=0x00000000 be=0x13d12143 _ohci_append_qh: 0xc4d6b400 to 0xc4071900 ohci_timeout: xfer=0xc4f51070 ohci_device_done: xfer=0xc4f51070, pipe=0xc4ee81d8, error=20 --HPS