From owner-freebsd-usb@FreeBSD.ORG Wed Apr 29 15:18:39 2009 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 AFD9F10656B6 for ; Wed, 29 Apr 2009 15:18:39 +0000 (UTC) (envelope-from ee@athyriogames.com) Received: from caprica.sslcatacombnetworking.com (caprica.sslcatacombnetworking.com [70.86.206.218]) by mx1.freebsd.org (Postfix) with ESMTP id 7B6C28FC1C for ; Wed, 29 Apr 2009 15:18:39 +0000 (UTC) (envelope-from ee@athyriogames.com) Received: from c-71-201-27-66.hsd1.in.comcast.net ([71.201.27.66] helo=laptopv) by caprica.sslcatacombnetworking.com with esmtpa (Exim 4.69) (envelope-from ) id 1LzBYR-0001ct-6X; Wed, 29 Apr 2009 10:18:36 -0500 From: "Engineering" To: References: <200903010045.44904.man@email.com.ua> <200903031516.02744.hselasky@c2i.net> <200903032006.54451.man@email.com.ua> <200903032243.31914.hselasky@c2i.net> In-Reply-To: <200903032243.31914.hselasky@c2i.net> Date: Wed, 29 Apr 2009 10:18:33 -0500 Message-ID: <000f01c9c8dd$c4fdba20$4ef92e60$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcmcSO3rsx4coY1oRzqYjCTzpIsCPgsh3xJw Content-Language: en-us X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - caprica.sslcatacombnetworking.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - athyriogames.com X-Source: X-Source-Args: X-Source-Dir: Cc: Subject: Isochronous transfer missing frames on USB4? 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: Wed, 29 Apr 2009 15:18:40 -0000 Hello all. I am having an odd problem getting a UVC webcam to work on FreeBSD Little background: This is for an arcade game - needs to be able to run for weeks unattended at a bar Running of Intel D945PLNM board, nVidia 9500GT series video card. Storage is compact flash, with a CF-IDE adapter Webcam is no-name Chinese, which is supposed to conform to UVC spec - no other documentation 'Driver' is modified ugen with Hans Petter's newest stack. Running high-speed isochronous transfers. We've been running for months with no problems, but now that production motherboards and cameras are coming in, something is cropping up. The webcam is locked at 160x120, 30fps At this rate, it always gives me 39 frames of data per video frame 37 frames of 1024, 1 frame of 968, 1 frame of 12 Minus the 12 bytes of header on each packet, that is 37*1012+956 = 38400 bytes, which is exactly correct The last 12 byte header contains no data, but contains the end of frame bit Cannot confirm, but it only seems to happen when webcam is plugged into the USB port directly underneath the etherNet jack. Timing issue? Priority? Any suggestions on where to look? Thanks, Sam I have _tons_ of logs and source, but I'll snip what seems relevant for now... Apr 28 17:09:04 kernel: FreeBSD 7.0-RELEASE #9: Wed Mar 18 08:04:55 CDT 2009 Apr 28 17:09:04 kernel: usb4: EHCI version 1.0 Apr 28 17:09:04 kernel: usb4: on ehci0 Apr 28 17:09:04 kernel: usb0: 12Mbps Full Speed USB v1.0 Apr 28 17:09:04 kernel: uhub0: on usb0 Apr 28 17:09:04 kernel: uhub0: 2 ports with 2 removable, self powered Apr 28 17:09:04 kernel: usb1: 12Mbps Full Speed USB v1.0 Apr 28 17:09:04 kernel: uhub1: on usb1 Apr 28 17:09:04 kernel: uhub1: 2 ports with 2 removable, self powered Apr 28 17:09:04 kernel: usb2: 12Mbps Full Speed USB v1.0 Apr 28 17:09:04 kernel: uhub2: on usb2 Apr 28 17:09:04 kernel: uhub2: 2 ports with 2 removable, self powered Apr 28 17:09:04 kernel: usb3: 12Mbps Full Speed USB v1.0 Apr 28 17:09:04 kernel: uhub3: on usb3 Apr 28 17:09:04 kernel: uhub3: 2 ports with 2 removable, self powered Apr 28 17:09:04 kernel: usb4: 480Mbps High Speed USB v2.0 Apr 28 17:09:04 kernel: uhub4: on usb4 Apr 28 17:09:04 kernel: uhub4: 8 ports with 8 removable, self powered Apr 28 17:09:04 kernel: ugen0: on usb4 Apr 28 17:09:04 kernel: make_dev uvc.1 // My debug messages follow Apr 28 17:09:19 kernel: set config 0 Apr 28 17:09:19 kernel: make_dev uvc.1 Apr 28 17:09:19 kernel: set config 1 Apr 28 17:09:19 kernel: make_dev uvc.1 Apr 28 17:09:19 kernel: make_dev uvc.2 Apr 28 17:09:19 kernel: ugen_get_cdesc -1 Apr 28 17:09:19 kernel: usbd_find_idesc 0 0 Apr 28 17:09:19 kernel: UVC Start read uvc returned 0 Apr 28 17:09:19 kernel: High speed 64 frames Apr 28 17:09:19 kernel: ugen_open_pipe_read: isoc open done // Megabytes of this stuff... Shows the raw byte count of each of the 64 frames coming back on iso_read_callback Apr 28 17:09:19 kernel: 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 968 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 Apr 28 17:09:19 kernel: 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 Apr 28 17:09:19 kernel: 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 Apr 28 17:09:19 kernel: 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 0 Apr 28 17:09:19 kernel: 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 968 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 37 frames of 1024, 1 frame of 968, 1 frame of 12 Minus the 12 bytes of header on each packet, that is 37*1012+956 = 38400 bytes, which is exactly correct The last 12 byte header contains no data, but contains the end of frame bit After time - problems cropping up - a complete packet goes missing - easiest to see if the 968 or 12 goes, but it happens to the 1024s too When missing, the packet is completely gone - 0 bytes Apr 29 13:40:25 kernel: 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 968 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 Apr 29 13:40:25 kernel: 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 Apr 29 13:40:25 kernel: 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 Apr 29 13:40:25 kernel: 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 NOTE HERE THE '12' PACKET IS GONE: Apr 29 13:40:25 kernel: 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 968 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Apr 29 13:40:25 kernel: 0 0 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 Apr 29 13:40:25 kernel: 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 0 1024 Apr 29 13:40:25 kernel: 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 Apr 29 13:40:25 kernel: 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 1024 0 0 0 0 0 1024 0 0 0 0 0 0 0 1024 0 0 0 0 968 12 0 0 0