From owner-freebsd-usb@FreeBSD.ORG Tue Oct 16 13:34:23 2007 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 AD93716A418 for ; Tue, 16 Oct 2007 13:34:23 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.177]) by mx1.freebsd.org (Postfix) with ESMTP id 55C1213C47E for ; Tue, 16 Oct 2007 13:34:23 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so2418917waf for ; Tue, 16 Oct 2007 06:34:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=dLiERwn5uHaC1ycVJ7bxCzPWR1fECj6K0HJzntk5QjE=; b=C6I0GzMeGg5MsQC/0jajWec3pICJYndD3w2BRBck7/9G1taAHPpIWootiDRizoQWqzIKld7JpiVXHLJkwyRPRypt4IR8whHvSVVs7K/gzOj4WMuXRjJ5GHfsOD9bsmDJX/80wncwK81vyboUThK0DD9weAUm7VSx7n6mlMHndao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=hq6u3X6/lZGC9TKnrz6SXxSp1XJsP9ji9pCb0xHuSnZiYQN6CBPBxZO0hmNxyMDbqhcw2d9HmTBREYLIwy05cyqCU20GEgiijheGPg33D/ZHJ5b+RZVOg/uqVpF39j39tFgtSuNIYrW11RHwgwrY23HBcYOpOKx04zH2mdQiHGE= Received: by 10.114.79.1 with SMTP id c1mr8424666wab.1192541660239; Tue, 16 Oct 2007 06:34:20 -0700 (PDT) Received: by 10.114.176.17 with HTTP; Tue, 16 Oct 2007 06:34:20 -0700 (PDT) Message-ID: Date: Tue, 16 Oct 2007 21:34:20 +0800 From: "Xiaofan Chen" To: "Hans Petter Selasky" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200710121919.36175.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: Tue, 16 Oct 2007 13:34:23 -0000 On 10/13/07, Xiaofan Chen wrote: > On 10/13/07, Hans Petter Selasky wrote: > > I think that the write STALLED. You can check this by turning on > > debugging on the OHCI controller by: > > > > systctl hw.usb.ohci.debug=15 > > > > Replace "ohci" by "ehci" or "uhci" if you are using such controllers. > > Strange today reading seems to work. I will check other functionality > later. This bootloader device uses bulk transfer. > So this is the last one I want to make to work under FreeBSD right now. Unfortunately verifying and writing are still not working. Reading is working. The bootloader firmware uses a cut-down version of the USB firmware framework. Maybe it is even buggier. ===[mcuee] ~/Desktop/build/fsusb/fsusb-0.1.11-2 # sudo ./fsusb newdemo.hex usb_set_debug: Setting debugging level to 255 (on) Locating USB Microchip(tm) PICDEM-FS USB(tm) (vendor 0x04d8/product 0x000b) usb_os_find_busses: Found /dev/usb0 usb_os_find_busses: Found /dev/usb1 usb_os_find_busses: Found /dev/usb2 usb_os_find_devices: Found /dev/ugen0 on /dev/usb1 usb_control_msg: 128 6 512 0 0xbfbfe988 8 1000 usb_control_msg: 128 6 512 0 0x804d0e0 32 1000 Found USB PICDEM-FS USB as device '/dev/ugen0' on USB bus /dev/usb1 Communication established. Onboard firmware version is 1.0 ^C CTRL-C since it hanges here. ===[mcuee] ~/Desktop # dmesg ... ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x0002 wValue=0x0301 wIndex=0x0001 ohci_device_done: xfer=0xc41a9a20, pipe=0xc3053100 length=10 error=0 ohci_device_done: xfer=0xc41a9a20, pipe=0xc3053100 length=10 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x000e wValue=0x0301 wIndex=0x0001 ohci_device_done: xfer=0xc41aa420, pipe=0xc3053100 length=22 error=0 ohci_device_done: xfer=0xc41aa420, pipe=0xc3053100 length=22 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x0002 wValue=0x0302 wIndex=0x0001 ohci_device_done: xfer=0xc41a9820, pipe=0xc3053100 length=10 error=0 ohci_device_done: xfer=0xc41a9820, pipe=0xc3053100 length=10 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x001c wValue=0x0302 wIndex=0x0001 ohci_device_done: xfer=0xc41a9c20, pipe=0xc3053100 length=36 error=0 ohci_device_done: xfer=0xc41a9c20, pipe=0xc3053100 length=36 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x0002 wValue=0x0301 wIndex=0x0001 ohci_device_done: xfer=0xc3cdaa20, pipe=0xc3054900 length=10 error=0 ohci_device_done: xfer=0xc3cdaa20, pipe=0xc3054900 length=10 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x000e wValue=0x0301 wIndex=0x0001 ohci_device_done: xfer=0xc41a9e20, pipe=0xc3054900 length=22 error=0 ohci_device_done: xfer=0xc41a9e20, pipe=0xc3054900 length=22 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x0002 wValue=0x0302 wIndex=0x0001 ohci_device_done: xfer=0xc41a9420, pipe=0xc3054900 length=10 error=0 ohci_device_done: xfer=0xc41a9420, pipe=0xc3054900 length=10 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x001c wValue=0x0302 wIndex=0x0001 ohci_device_done: xfer=0xc41a9020, pipe=0xc3054900 length=36 error=0 ohci_device_done: xfer=0xc41a9020, pipe=0xc3054900 length=36 error=5 ohci_setup_standard_chain: addr=126 endpt=0 len=16 speed=2 ohci_setup_standard_chain: nexttog=1; data before transfer: TD(0xe6a8b080) at 0x3eb13080: -TOG0 delay=7 ec=0 cc=15 cbp=0x3eb13000 next=0x3eb13060 be=0x3eb13007 TD(0xe6a8b060) at 0x3eb13060: -R-IN-TOG1 delay=7 ec=0 cc=15 cbp=0x3eb13008 next=0x3eb13040 be=0x3eb1300f TD(0xe6a8b040) at 0x3eb13040: -OUT-TOG1 delay=1 ec=0 cc=15 cbp=0x00000000 next=0x00000000 be=0xffffffff _ohci_append_qh: 0xe6a8b0a0 to 0xc3007100 ohci_check_transfer: xfer=0xc3cd9c20 checking transfer ohci_non_isoc_done: xfer=0xc3cd9c20 pipe=0xc41a2900 transfer done TD(0xe6a8b080) at 0x3eb13080: -TOG1 delay=7 ec=0 cc=0 cbp=0x00000000 next=0x00000000 be=0x3eb13007 ohci_non_isoc_done: len=8 ohci_non_isoc_done: len=8 ohci_non_isoc_done: len=0 ohci_non_isoc_done: actlen=16 ohci_device_done: xfer=0xc3cd9c20, pipe=0xc41a2900 length=16 error=0 _ohci_remove_qh: 0xe6a8b0a0 from 0xe6a8b0a0 ohci_device_done: xfer=0xc3cd9c20, pipe=0xc41a2900 length=16 error=5 _ohci_remove_qh: 0xe6a8b0a0 from 0xc3007100 ohci_setup_standard_chain: addr=126 endpt=0 len=40 speed=2 ohci_setup_standard_chain: nexttog=1; data before transfer: TD(0xe6a8b0a0) at 0x3eb130a0: -TOG0 delay=7 ec=0 cc=15 cbp=0x3eb13000 next=0x3eb13080 be=0x3eb13007 TD(0xe6a8b080) at 0x3eb13080: -R-IN-TOG1 delay=7 ec=0 cc=15 cbp=0x3eb13008 next=0x3eb13060 be=0x3eb13027 TD(0xe6a8b060) at 0x3eb13060: -OUT-TOG1 delay=1 ec=0 cc=15 cbp=0x00000000 next=0x00000000 be=0xffffffff _ohci_append_qh: 0xe6a8b0c0 to 0xc3007100 ohci_check_transfer: xfer=0xc41a9220 checking transfer ohci_non_isoc_done: xfer=0xc41a9220 pipe=0xc41a2900 transfer done TD(0xe6a8b0a0) at 0x3eb130a0: -TOG1 delay=7 ec=0 cc=0 cbp=0x00000000 next=0x00000000 be=0x3eb13007 ohci_non_isoc_done: len=8 ohci_non_isoc_done: len=32 ohci_non_isoc_done: len=0 ohci_non_isoc_done: actlen=40 ohci_device_done: xfer=0xc41a9220, pipe=0xc41a2900 length=40 error=0 _ohci_remove_qh: 0xe6a8b0c0 from 0xe6a8b0c0 ohci_device_done: xfer=0xc41a9220, pipe=0xc41a2900 length=40 error=5 _ohci_remove_qh: 0xe6a8b0c0 from 0xc3007100 ohci_setup_standard_chain: addr=126 endpt=0 len=8 speed=2 ohci_setup_standard_chain: nexttog=1; data before transfer: TD(0xe6a9b520) at 0x3e816520: -TOG0 delay=7 ec=0 cc=15 cbp=0x3e8164b0 next=0x3e816500 be=0x3e8164b7 TD(0xe6a9b500) at 0x3e816500: -IN-TOG1 delay=1 ec=0 cc=15 cbp=0x00000000 next=0x00000000 be=0xffffffff _ohci_append_qh: 0xe6a9b540 to 0xc3007100 ohci_check_transfer: xfer=0xc42020e8 checking transfer ohci_non_isoc_done: xfer=0xc42020e8 pipe=0xc41a2900 transfer done TD(0xe6a9b520) at 0x3e816520: -TOG1 delay=7 ec=0 cc=0 cbp=0x00000000 next=0x00000000 be=0x3e8164b7 ohci_non_isoc_done: len=8 ohci_non_isoc_done: len=0 ohci_non_isoc_done: actlen=8 ohci_device_done: xfer=0xc42020e8, pipe=0xc41a2900 length=8 error=21 _ohci_remove_qh: 0xe6a9b540 from 0xe6a9b540 ohci_device_bulk_start: xfer=0xc41f2020 len=5 ohci_setup_standard_chain: addr=126 endpt=1 len=5 speed=2 ohci_setup_standard_chain: nexttog=0; data before transfer: TD(0xe6a9b460) at 0x3e816460: -OUT-TOG0 delay=1 ec=0 cc=15 cbp=0x3eb13000 next=0x00000000 be=0x3eb13004 _ohci_append_qh: 0xe6a9b480 to 0xc3007130 ohci_check_transfer: xfer=0xc41f2020 checking transfer ohci_non_isoc_done: xfer=0xc41f2020 pipe=0xc41a2914 transfer done TD(0xe6a9b460) at 0x3e816460: -OUT-TOG1 delay=1 ec=0 cc=0 cbp=0x00000000 next=0x00000000 be=0x3eb13004 ohci_non_isoc_done: len=5 ohci_non_isoc_done: actlen=5 ohci_device_done: xfer=0xc41f2020, pipe=0xc41a2914 length=5 error=0 _ohci_remove_qh: 0xe6a9b480 from 0xe6a9b480 ohci_setup_standard_chain: addr=126 endpt=0 len=8 speed=2 ohci_setup_standard_chain: nexttog=1; data before transfer: TD(0xe6aac520) at 0x3e7fb520: -TOG0 delay=7 ec=0 cc=15 cbp=0x3e7fb4b0 next=0x3e7fb500 be=0x3e7fb4b7 TD(0xe6aac500) at 0x3e7fb500: -IN-TOG1 delay=1 ec=0 cc=15 cbp=0x00000000 next=0x00000000 be=0xffffffff _ohci_append_qh: 0xe6aac540 to 0xc3007100 ohci_check_transfer: xfer=0xc42130e8 checking transfer ohci_non_isoc_done: xfer=0xc42130e8 pipe=0xc41a2900 transfer done TD(0xe6aac520) at 0x3e7fb520: -TOG1 delay=7 ec=0 cc=0 cbp=0x00000000 next=0x00000000 be=0x3e7fb4b7 ohci_non_isoc_done: len=8 ohci_non_isoc_done: len=0 ohci_non_isoc_done: actlen=8 ohci_device_done: xfer=0xc42130e8, pipe=0xc41a2900 length=8 error=21 _ohci_remove_qh: 0xe6aac540 from 0xe6aac540 ohci_device_bulk_start: xfer=0xc4203020 len=4 ohci_setup_standard_chain: addr=126 endpt=1 len=4 speed=2 ohci_setup_standard_chain: nexttog=0; data before transfer: TD(0xe6aac460) at 0x3e7fb460: -R-IN-TOG0 delay=1 ec=0 cc=15 cbp=0x3e815000 next=0x00000000 be=0x3e815003 _ohci_append_qh: 0xe6aac480 to 0xc3007130 ohci_check_transfer: xfer=0xc4203020 checking transfer ohci_non_isoc_done: xfer=0xc4203020 pipe=0xc41a2928 transfer done TD(0xe6aac460) at 0x3e7fb460: -R-IN-TOG1 delay=1 ec=0 cc=0 cbp=0x00000000 next=0x00000000 be=0x3e815003 ohci_non_isoc_done: len=4 ohci_non_isoc_done: actlen=4 ohci_device_done: xfer=0xc4203020, pipe=0xc41a2928 length=4 error=0 _ohci_remove_qh: 0xe6aac480 from 0xe6aac480 ohci_device_done: xfer=0xc4203020, pipe=0xc41a2928 length=4 error=5 _ohci_remove_qh: 0xe6aac480 from 0xc3007130 ohci_device_done: xfer=0xc42130e8, pipe=0xc41a2900 length=8 error=5 _ohci_remove_qh: 0xe6aac540 from 0xc3007100 ohci_device_done: xfer=0xc41f2020, pipe=0xc41a2914 length=5 error=5 _ohci_remove_qh: 0xe6a9b480 from 0xc3007130 ohci_device_done: xfer=0xc42020e8, pipe=0xc41a2900 length=8 error=5 _ohci_remove_qh: 0xe6a9b540 from 0xc3007100 Any suggestions to fix the problem will be greatly appreciated. Regards, Xiaofan