From owner-freebsd-usb@FreeBSD.ORG Thu Oct 2 10:16:56 2008 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 B79911065689 for ; Thu, 2 Oct 2008 10:16:56 +0000 (UTC) (envelope-from mpoupe@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id 4548C8FC12 for ; Thu, 2 Oct 2008 10:16:56 +0000 (UTC) (envelope-from mpoupe@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so671989fgb.35 for ; Thu, 02 Oct 2008 03:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=yduBOcwXcTE90/knBE3GJqXjqTX8lmzOzr/pNGSKyfs=; b=u67oFEUpuZMyX7KzRxcUzpodxjH/7/h+P2k+UgTB/Ip35KcQcZXiHAz/GdsqJk57jO oowdj2kK4qHEwEHa7MSdIZK6J0zsNRRnKkN1gCb72Y9ww19NwIha2tMk/hmS5jryCG10 YZDgeFo0W95kypR8LSDoIyPoNHo9zZRHVoLHk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=SpvLUQ4tEWv62/7AOfBPmON44jdVzTLt+4yamV6Oy/gGfInY6pgH1+40GMafGhCF1N HhgPYF23G+Yk8+5fJMMRnxMo9FEhRMTFUleJEFkjWAxawldVWpD/qk9H2G+3EYPMb/f/ TkAv8LtTV2ak4i4uPuUFCWvGpfaOcb4DH40ho= Received: by 10.86.80.17 with SMTP id d17mr8431897fgb.47.1222941253464; Thu, 02 Oct 2008 02:54:13 -0700 (PDT) Received: from ?10.11.1.103? ([193.85.150.3]) by mx.google.com with ESMTPS id 12sm1455036fgg.0.2008.10.02.02.54.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 02 Oct 2008 02:54:12 -0700 (PDT) Message-ID: <48E49A6B.6090302@gmail.com> Date: Thu, 02 Oct 2008 11:54:51 +0200 From: Martin Poupe User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: FreeBSD: Asynchronous USB read in usermode 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, 02 Oct 2008 10:16:56 -0000 Hello, I am porting linux application which does both synchronous and asynchronously read from USB device. Synchronous transfer is not a problem - libusb was used and it is working fine on FreeBSD too. Problem is the asynchronous reading, I cannot find any kernel call similar to linux submit urb. I tried the aio_read() but it seems it is not supported on file which is actually USB device. Function usbd_bulk_transfer() (usbdi_util.h) seems interesting, but I am afraid it is only for kernel usage. Is there some method how to read from the USB device asynchronously in usermode ? Thanks, Martin