From owner-freebsd-usb@FreeBSD.ORG Tue May 24 21:48:44 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 80DF5106566C for ; Tue, 24 May 2011 21:48:44 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (unknown [IPv6:2001:44b8:7c07:5581:266:e1ff:fe0c:8f16]) by mx1.freebsd.org (Postfix) with ESMTP id 253B38FC0C for ; Tue, 24 May 2011 21:48:42 +0000 (UTC) Received: from [128.39.150.177] ([128.39.150.177]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id p4OLmVaP009458 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 25 May 2011 07:18:33 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Tue, 24 May 2011 23:48:30 +0200 To: freebsd-usb@freebsd.org Message-Id: <91D613ED-CA0F-41BF-AD53-2FD42529DCF8@gsoft.com.au> Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-Spam-Score: -0.272 () BAYES_00,RDNS_NONE X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Subject: USB driver locking 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: Tue, 24 May 2011 21:48:44 -0000 Hi, I have a Cypress FX2 based USB interface board connected to our radar = data acquisition chassis. It is used for configuring the hardware and = getting data back to the PC. I wrote a driver which is a very skinny wrapper around the (very handy) = usb_fifo device node code. I have several end points, all bulk. 2 are for serial comms, 2 for a low = speed control bus and 1 for high speed data back to the PC. The PC sends 10-250 byte packets out to modules on the serial bus and = gets replies (after a 10-500 msec) of a similar size. The low speed control bus is driven by the FX2 and the PC sends it 3 = byte packets which is processes to read/write on the control bus, then = sends a 3 byte packet back. I find that my application has rare problems where it does not get a = reply from the micro to a control bus packet, or perhaps the micro = doesn't receive it (I need to add a sequence number or similar to my = protocol to try and detect it I think). I found that this problem happens much less rarely (less than once a = day) on a UP machine than on an SMP one. Given that I am wondering if it is some sort of locking issue, and if = anyone has seen anything similar? I can supply the driver code if anyone is interested :) Thanks. -- 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