From owner-freebsd-multimedia@freebsd.org Mon Mar 6 05:19:47 2017 Return-Path: Delivered-To: freebsd-multimedia@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 BEDB8CFA8C7 for ; Mon, 6 Mar 2017 05:19:47 +0000 (UTC) (envelope-from mrechberger@gmail.com) Received: from mail-qk0-x22f.google.com (mail-qk0-x22f.google.com [IPv6:2607:f8b0:400d:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 92D551DFC for ; Mon, 6 Mar 2017 05:19:47 +0000 (UTC) (envelope-from mrechberger@gmail.com) Received: by mail-qk0-x22f.google.com with SMTP id p64so18282473qke.1 for ; Sun, 05 Mar 2017 21:19:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=1p6LslJvHTz9/nECpaxOFJL7rm4Fx9U3WD7EetR9OQU=; b=HDP7qNf1Oh0p20FVAqmXSwsvuFPQKA9zG19DNZw/QnkDXsYZWpL0r31PCgBLJV0Zmz 00zPqd5MenGSd0Ta9DT+VTjkgWzstb8ttTjxiSSvhVqF3i1h7OaCOhfKEFKiqCDrLwRl rbm8VV3kvjUQ0qiI3xyxlcTfls8JzlU9sdt+bBla37pxMtWDoPTZ+bruAspFhhUpShN8 UUCSsxfk9sXXm1mSGce6ggwpCaN9DXLMgZvjXtbQM2wzF+Qoal6xRkMKNZIJvesio0Qy 6Sbjt0YBmmO1ps1HZbJosBwEjcJ2ePbV6RXJ5P4X/pZPvFjWFkTRH5NeqoiL9MMO0acC eg7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1p6LslJvHTz9/nECpaxOFJL7rm4Fx9U3WD7EetR9OQU=; b=OBLDhh6cWOlgjs63tRze4JQgcxSykir4WDD8O9WqrJqEFtQ9EaODXX6kDWxJCth7yK Fx+II1kuI55iAZDb6dYORyJa7PJfNj/eNsrlH1WSmd+Nncshae7XxdEhfZ43a9YHtYS2 DtIo4pM7ZJplFAMBS9zL0qDcj3yrk6EQ9T1mznarANTaEuQcrZFY9z9YwoxK8ntby92Y oFyTWKD898+m7jeG2F5oV6z5VSlXjStDQ1V7nHfUg0J8qj/2n6b+zuu/fnoTGKuu3bmD R8vzOxIZJybEdMClWpnzmOl8n3zwYVrUNpqboteE1QC9oUF419ZUB1Bbk9tQVVWKqarV Z1+Q== X-Gm-Message-State: AMke39mgDyKBAtR/Op5d56CEd0/VRMNNyfAZPfITj5Zc0RkjtUV0J5syR6hFjekJqqj0/Y7xIHbWL7fMPgf+FA== X-Received: by 10.237.35.164 with SMTP id j33mr15233131qtc.194.1488777586501; Sun, 05 Mar 2017 21:19:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.174.114 with HTTP; Sun, 5 Mar 2017 21:19:46 -0800 (PST) From: Markus Rechberger Date: Mon, 6 Mar 2017 06:19:46 +0100 Message-ID: Subject: What is wrong with FreeBSD and USB Support To: freebsd-multimedia@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2017 05:19:47 -0000 Hi, I have been trying to port a driver to freebsd for a day now and the result is quite negative. So my feedback about libusb20 and the FreeBSD USB Kernel Stack: 1. the documentation is not clear how to set up asynchronous bulk transfers (please explain the architecture of this API) 2. the errors returned by libusb20 (and probably from the kernel) are not detailed enough (in certain cases I'm able to get libusb20 unknown error, to my understanding every error should have some meaning). 3. the FreeBSD USB Stack messes around with the transfer itself damaging the entire result (eg resulting in stalled USB bulk transfers). 4. The FreeBSD data transfer implementation itself is a disaster, I'm able to transfer data at a rate of 2 MB/sec, anything higher results in a stalled usb transfer?! 5. USB Control messages are 100% slower than with other operating systems (eg. it took 14 seconds to load a driver with FreeBSD while it only takes 7 seconds on other systems). Since I have been using USB stacks with Linux, Mac and some other systems I can say that FreeBSD has the most irritating implementation of all. So finally I wonder what is wrong with FreeBSD's USB support? Best Regards, Markus