From owner-freebsd-usb@FreeBSD.ORG Fri Jul 13 22:33:14 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34F2216A400 for ; Fri, 13 Jul 2007 22:33:14 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.179]) by mx1.freebsd.org (Postfix) with ESMTP id 0D67D13C4B2 for ; Fri, 13 Jul 2007 22:33:14 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: by wa-out-1112.google.com with SMTP id j37so769146waf for ; Fri, 13 Jul 2007 15:33:13 -0700 (PDT) DKIM-Signature: a=rsa-sha1; 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; b=hgjTLLQXvwepszw6aIkaEZTAsasPhm37UTPuZUF9QQl1mj+qd5Zd9YLChDCh83Dxo6NSx5sMIJW/+XwLkYSDlxGnA11TbFZwC5QsYi6YQrdylX13DTmzDbv4FyqnsKPuYPc8+sbwicXLCeRqvXn+8DXwGUyvTEl1aFIrQgCKv1M= 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=cTV7Gd4EQDx+MI0BQFtF/bkgL23tFO4Ez43FqwXiFQToq4ztH0QDoB8vkZ3scg5BITzCQTxKOqvwh67J5nc9GUhHjDtK9ahFF8vCjwFG++/EiLaqfgpfItGrmtXE7SqFkMd6jkZGuMAiZ3kvcJIwWl8PZefepQ1TtLlEGBOxsqU= Received: by 10.114.195.19 with SMTP id s19mr2071189waf.1184365993499; Fri, 13 Jul 2007 15:33:13 -0700 (PDT) Received: by 10.114.176.17 with HTTP; Fri, 13 Jul 2007 15:33:13 -0700 (PDT) Message-ID: Date: Fri, 13 Jul 2007 18:33:13 -0400 From: "Xiaofan Chen" To: "Hans Petter Selasky" In-Reply-To: <200707091835.50445.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200707051724.30175.hselasky@c2i.net> <200707091835.50445.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: libusb usb_interrupt_read hangs 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, 13 Jul 2007 22:33:14 -0000 On 7/9/07, Hans Petter Selasky wrote: > > Perhaps what happens is that the "*pDst.bRam = _UCPU;" > command clears the FIFO > contents of the USB interrupt endpoint in addition to clearing the stall!? > > If the sequence is like this: > > Write to interrupt endpoint. > Reply command is written to FIFO. > Clear interrupt endpoint stall. > There is no data to read, because the FIFO has been emptied as a part of the > stall command. > > Xiaofan Chen: Could you check the datasheet for the chip that is used, what > the stall command actually does? > Sorry that I have three more questions: 1) What is the correct method to correctly respond to clear halt feature request in the firmware so that it can still recover from the stall? 2) For the host, how does it know that the buffer data is still correct if the buffer is not cleared? 2) What cause the stall to happen in the first place? Xiaofan