From owner-freebsd-usb@FreeBSD.ORG Thu May 5 07:15:10 2011 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 F2ECA1065670 for ; Thu, 5 May 2011 07:15:10 +0000 (UTC) (envelope-from trevor.l.blackwell@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id AA9F58FC1B for ; Thu, 5 May 2011 07:15:10 +0000 (UTC) Received: by yxl31 with SMTP id 31so846522yxl.13 for ; Thu, 05 May 2011 00:15:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=F3tuUL3vVKjAKGDzpBDchTGbsugXGbEFvoU5bCu1Kjg=; b=JN/jutygW+7YEfuLLfoIZc0WEWXG7k+Wri7TVOsg0DaJvXpcXKUJlqtFAmhQoucZQh ziy34OOKyhfEeCuBdsYN6kDPmvFr+z6Rn8grhuXfiS+6QH4razlTbRq8jzClJ2KkkJnL slnO292ABYlZlBjUgAIUq+ZVLpxqPAkSREpMU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=Yp5Kgj/cV8VQdPZuAhWkNwBZ7d+Bb64xjfGjm2sJKF5amuRc745efs0VoFYyEEolKr BK/eKjdnDmz94S725TDeiJ4XdXFLoje08UpBIZ71LRvxotCn4YeE7VlYfTRy1bU/da/w JZxDerk6TL2cthc3fIhDA4nZkZndpXuWpLYBI= MIME-Version: 1.0 Received: by 10.236.153.162 with SMTP id f22mr2355520yhk.475.1304579709917; Thu, 05 May 2011 00:15:09 -0700 (PDT) Sender: trevor.l.blackwell@gmail.com Received: by 10.236.103.2 with HTTP; Thu, 5 May 2011 00:15:09 -0700 (PDT) In-Reply-To: <201105050841.56095.hselasky@c2i.net> References: <201105050841.56095.hselasky@c2i.net> Date: Thu, 5 May 2011 00:15:09 -0700 X-Google-Sender-Auth: -2UQrDM9M9IQNRI2jOvFqvZzupY Message-ID: From: Trevor Blackwell To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-usb@freebsd.org Subject: Re: Clearing stalls: usbd_xfer_set_stall vs usbd_do_clear_stall_callback 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: Thu, 05 May 2011 07:15:11 -0000 8.2-STABLE. I'm willing to run whatever. I suspect the problem I'm having is the same as this: http://kerneltrap.org/mailarchive/linux-usb/2009/5/15/5761363 I can manually kick it out of the wedged state by sending a RESET_TT transaction to the hub with usbconfig -d ugen1.3 do_request 0x23 0x09 0x0000 0x0001 0 (UT_WRITE_CLASS_OTHER, UR_RESET_TT) I'm working on adding code to do this. My current hack is to do it from uhub_explore. When my driver tries to do a clear-stall and gets a timeout error from the clear-stall, it sets a flag on the parent_hs_hub to request a RESET_TT. uhub_explore notices the flag and does it. Possibly I could also add it to usb_do_clear_stall_callback, but I don't think I can call usb_do_request from inside a callback. Any suggestions? On Wed, May 4, 2011 at 11:41 PM, Hans Petter Selasky wrote: > On Thursday 05 May 2011 03:16:14 Trevor Blackwell wrote: > > We have a system that experiences occasional stalls due to ESD strikes in > > the cable between the host & hub. So I've been extensively testing the > > clear stall logic. > > Which version of FreeBSD are you using? > > --HPS > -- Trevor Blackwell trevor@anybots.com 650 776 7870