From owner-freebsd-usb@FreeBSD.ORG Thu Oct 10 08:08:04 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BC1ACE1B for ; Thu, 10 Oct 2013 08:08:04 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 183B82826 for ; Thu, 10 Oct 2013 08:08:03 +0000 (UTC) Received: from ur.dons.net.au (ppp118-210-202-219.lns20.adl6.internode.on.net [118.210.202.219]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id r9A87kUY015804 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 10 Oct 2013 18:37:52 +1030 (CST) (envelope-from doconnor@gsoft.com.au) Subject: Re: USB config SX lock deadlock Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: multipart/signed; boundary="Apple-Mail=_421D10D3-D54B-4C24-9DCA-115417EDC179"; protocol="application/pgp-signature"; micalg=pgp-sha1 From: "Daniel O'Connor" In-Reply-To: <52565BB1.8070506@bitfrost.no> Date: Thu, 10 Oct 2013 18:37:46 +1030 Message-Id: <2F3BD963-9839-49E5-A67E-E12DE3004009@gsoft.com.au> References: <9783900F-08A1-41FB-81B8-3C9809B82521@gsoft.com.au> <52553000.2010003@bitfrost.no> <52554855.6030404@bitfrost.no> <52564953.8080707@bitfrost.no> <7610BC59-ED91-4807-B145-7F7DD2C725E9@gsoft.com.au> <52565BB1.8070506@bitfrost.no> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1510) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Oct 2013 08:08:04 -0000 --Apple-Mail=_421D10D3-D54B-4C24-9DCA-115417EDC179 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 10/10/2013, at 18:18, Hans Petter Selasky wrote: > If you use synchronous USB control requests, then those should always = error out. Yes it is synchronous (uses usbd_do_request_flags). >> The usb_fifo_* code handles all wakeups so I am not sure. >=20 > The usb_fifo code only will only do refcounting. If you do USB control = requests, you should use the f_ioctl_post, callback, because the f_ioctl = callback does not protect against attach and detach or the enumeration = thread running. Sorry, I misspoke earlier :( The usb_fifo code is only used for the RS485 and high speed data bus, = the other (low speed configuration bus) is done using ioctl -> = usbd_do_request(UT_*_VENDOR_DEVICE). I will see about cranking up the debug level and trying to provoke a = failure on the bench. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --Apple-Mail=_421D10D3-D54B-4C24-9DCA-115417EDC179 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iD8DBQFSVmBS5ZPcIHs/zowRAswaAJ9Q0FcqRP+kaIsptlsK9x7snHEH5QCfYq7r lQlCklXcC8rrLhBLCCR1HOE= =mPKY -----END PGP SIGNATURE----- --Apple-Mail=_421D10D3-D54B-4C24-9DCA-115417EDC179--