From owner-freebsd-usb@FreeBSD.ORG Sat Oct 13 09:52:59 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 D2E0F16A417 for ; Sat, 13 Oct 2007 09:52:59 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.182]) by mx1.freebsd.org (Postfix) with ESMTP id AE64213C465 for ; Sat, 13 Oct 2007 09:52:58 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so1322142waf for ; Sat, 13 Oct 2007 02:52:57 -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=B+Xs2pZH9s4DTKA2b4p8dTILOZKspm8lA8ztxsMO67E=; b=li/ItbYOBNGkzD7Jj+gohBNzOiK/QllsECYH+CMa2zcQKn3LIy/n+EyxHkU2ax5Sx0PdtmfmEYhvw/4v1URk5Ll1GPTH6qmUNbZIu+lUoLDnEspSzcW3r8xTR2hCTdj7hZN8UCGE1MWkiZCZz6pncHT+5wE6ofkgXaRktKz8dCM= 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=IAi+rOn6D1oEDlyjz+/MDtgglPoetWc/82ZvZkbcJCv0UnZulQ2XfpwLSrCyS1MDfKWkypGr+B7Ebrl08+CBgzNA31BLDuORdXpioz2YXx4U4zm96/9x3hARRE0ygFnVq+hyetwBL0CbihLQ4W0oq5ArRmDEzIBkwi+U21GSexQ= Received: by 10.114.81.1 with SMTP id e1mr4617947wab.1192269177790; Sat, 13 Oct 2007 02:52:57 -0700 (PDT) Received: by 10.114.176.17 with HTTP; Sat, 13 Oct 2007 02:52:57 -0700 (PDT) Message-ID: Date: Sat, 13 Oct 2007 17:52:57 +0800 From: "Xiaofan Chen" To: "Hans Petter Selasky" In-Reply-To: <200710121912.03585.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200710121912.03585.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: PICkit 2 again with HPS stack 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: Sat, 13 Oct 2007 09:52:59 -0000 On 10/13/07, Hans Petter Selasky wrote: > Resource temporarily unavailable maps to EAGAIN > according to "man errno". From what I can see from the log > you have provided this means that the "msleep()" > call in "ugenread" timed out. > > What timeout have you programmed in your PICkit ? It is 1000ms. I change it to 10000ms but this does not help. > Can you set the debugging value to 15 using the PICkit ? > Alternativly: > sysctl hw.usb.debug=15 ===[mcuee] ~/Desktop/build/pk2-2.04 # sudo sysctl hw.usb.debug=15 hw.usb.debug: 15 -> 15 ===[mcuee] ~/Desktop/build/pk2-2.04 # sudo ./pk2 --on PK2 version 2.04 - 2006/12/17 ./pk2 --on usb_set_debug: Setting debugging level to 255 (on) Locating USB Microchip PICkit2 (vendor 0x04d8/product 0x0033) 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/ugen1 on /dev/usb1 usb_os_find_devices: Found /dev/ugen0 on /dev/usb1 usb_control_msg: 128 6 512 0 0xbfbfe7e8 8 1000 usb_control_msg: 128 6 512 0 0x8066120 32 1000 usb_control_msg: 128 6 512 0 0xbfbfe7e8 8 1000 usb_control_msg: 128 6 512 0 0x806c0c0 41 1000 skipped 1 class/vendor specific interface descriptors usb_control_msg: 128 6 513 0 0xbfbfe7e8 8 1000 usb_control_msg: 128 6 513 0 0x8066160 32 1000 Found USB PICkit as device '/dev/ugen1' on USB bus /dev/usb1 Setting USB configuration is okay. Claiming USB interface is okay. Sending GETVERSION command using interrupt transfer. USB> 76 Receiving PICkit VERSION information using interrupt transfer. USB error: error reading from interrupt endpoint /dev/ugen1.1: Resource temporarily unavailable Fatal error> USB read did not return 64 bytes ===[mcuee] ~/Desktop/build/pk2-2.04 # dmesg | grep ugen ugenopen: flag=1, mode=8192 ugenioctl: cmd=40125569 ugenclose: flag=1, mode=8192 ugenopen: flag=1, mode=8192 ugenioctl: cmd=40125569 ugenclose: flag=1, mode=8192 ugenopen: flag=3, mode=8192 ugenioctl: cmd=80045572 ugenioctl: cmd=c018556f ugenioctl: cmd=80045572 ugenioctl: cmd=c018556f ugenclose: flag=3, mode=8192 ugenopen: flag=3, mode=8192 ugenioctl: cmd=80045572 ugenioctl: cmd=c018556f ugenioctl: cmd=80045572 ugenioctl: cmd=c018556f ugenioctl: cmd=80045572 ugenioctl: cmd=c018556f ugenioctl: cmd=80045572 ugenioctl: cmd=c018556f ugenclose: flag=3, mode=8192 ugenopen: flag=3, mode=8192 ugenioctl: cmd=80045565 ugen_set_config: configno 1, sc=0xc35c7000 ugenclose: flag=0, mode=0 ugenopen: flag=3, mode=8192 ugenioctl: cmd=80045572 ugenwrite: ugenwrite: transferred 64 bytes ugen_write_clear_stall_callback: sce=0xc35c7084: stall cleared ugen_default_write_callback: waking 0xc35c7084 ugenioctl: cmd=80045572 ugenioctl: cmd=80045571 ugenread: ugen_open_pipe_read: interrupt open done ugen_read_clear_stall_callback: sce=0xc35c7084: stall cleared ugenclose: flag=3, mode=8192 ugenclose: flag=3, mode=8192 To Hans: The full dmesg log will be sent to you per email. Xiaofan