From owner-freebsd-wireless@freebsd.org Mon Sep 5 08:41:33 2016 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3F90A9D5E6; Mon, 5 Sep 2016 08:41:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DD52D71; Mon, 5 Sep 2016 08:41:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 294021FE022; Mon, 5 Sep 2016 10:41:31 +0200 (CEST) Subject: Re: Deadlock between device_detach() and usbd_do_request_flags() To: Andriy Voskoboinyk , Adrian Chadd References: <4cf378ff-63e1-7cdc-6120-9578fceec20d@selasky.org> Cc: "freebsd-wireless@freebsd.org" , "freebsd-usb@freebsd.org" From: Hans Petter Selasky Message-ID: <55cff8ce-6132-53ec-3419-d27286dce622@selasky.org> Date: Mon, 5 Sep 2016 10:46:12 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <4cf378ff-63e1-7cdc-6120-9578fceec20d@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2016 08:41:33 -0000 On 09/05/16 09:53, Hans Petter Selasky wrote: > > Hi, > > I think the right solution is to let usbd_do_request_flags() use its own > SX lock for synchronization, instead of re-using the enumeration SX > lock. What do you think about that? > > --HPS > Hi, Another approach which will work is to setup your own USB control endpoint xfer, and use that. I'll have a look and see what can be done. --HPS