From owner-freebsd-usb@FreeBSD.ORG Sat Jul 24 11:44:55 2010 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 26DC7106566B for ; Sat, 24 Jul 2010 11:44:55 +0000 (UTC) (envelope-from peerst@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id AF3818FC1A for ; Sat, 24 Jul 2010 11:44:53 +0000 (UTC) Received: by wwe15 with SMTP id 15so5148388wwe.31 for ; Sat, 24 Jul 2010 04:44:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=SOvr8Pz1aYxs/VG/qnu2nf6ztyvs8BnBbnyetg/yJYw=; b=OtsLXFEhXRExMQnYw5XxRoXmH8/k+kbuuEJcMTk3n3EpS2YRl0dV3DIDFRoBBorosa 9dKhLxVyTkQKaXyMeQMA8AFSN8o5pCkEUSvB5VKdtbPh/yfXexEqfdqCGDYQCUfJIkho 7vqW01g6JZJwm+aFdvJyq9LbnyN4wgRHFzKHY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=XQKKuKygOA8Hi13ylaLbtM7vzY8Uix+bEtR+gOaWSBQkL1C2iPNPSsUSH822cViAwx IVItIvGyqMoxGMvjhZXYrXdDeKtSYvnJplPNH9CQb9tWGKvGfFxKVRiMn3mP3APEX2D4 kHFG9pgERS8vhRP8BGsE5x2QkXmiNMthTiPS8= MIME-Version: 1.0 Received: by 10.227.7.131 with SMTP id d3mr4753997wbd.83.1279971892291; Sat, 24 Jul 2010 04:44:52 -0700 (PDT) Received: by 10.227.1.225 with HTTP; Sat, 24 Jul 2010 04:44:52 -0700 (PDT) In-Reply-To: <201007231921.45803.hselasky@c2i.net> References: <201007231657.47682.hselasky@c2i.net> <201007231921.45803.hselasky@c2i.net> Date: Sat, 24 Jul 2010 13:44:52 +0200 Message-ID: From: Peer Stritzinger To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-usb@freebsd.org Subject: Re: FreeBSD 8: libusb async mode + select(2) = nogo? 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: Sat, 24 Jul 2010 11:44:55 -0000 Hi On Fri, Jul 23, 2010 at 7:21 PM, Hans Petter Selasky wrote: > Should work, but it might be that the second poll, when you try to process the > events, don't work like expected. After any event on the two fd's you should > call "libusb_handle_events_locked()" using a "tv = NULL". Rewrote the program to use poll instead of select (which does fit libusb better even if I like select better generally) nothing else changed only poll instead of select. => Works like a charm So to sum it up: select + libusb seems not to work, poll + libusb works however. So is this a general FreeBSD select vs. poll issue or just with the USB stack? How can I help debug this further? Regards Peer Stritzinger