From owner-freebsd-usb@FreeBSD.ORG Wed Jul 9 21:01:08 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 380671065676 for ; Wed, 9 Jul 2008 21:01:08 +0000 (UTC) (envelope-from goaengel@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 78B688FC19 for ; Wed, 9 Jul 2008 21:01:07 +0000 (UTC) (envelope-from goaengel@gmx.net) Received: (qmail invoked by alias); 09 Jul 2008 20:34:25 -0000 Received: from p5498B2E8.dip0.t-ipconnect.de (EHLO localhost) [84.152.178.232] by mail.gmx.net (mp015) with SMTP; 09 Jul 2008 22:34:25 +0200 X-Authenticated: #39106949 X-Provags-ID: V01U2FsdGVkX1/6m09IpNf6azFgQBD2QFDFKZcxoFdSZ2c5XYeS+K 6DwBPXMPOSX7MQ Date: Wed, 9 Jul 2008 22:39:26 +0200 From: Tino Engel To: freebsd-usb@freebsd.org Message-ID: <20080709223926.142cbe5b@gmx.net> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.6899999999999999 Subject: Quirks 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: Wed, 09 Jul 2008 21:01:08 -0000 Dear all, I had the chance to write my first Quirk-PR and therefore took some time looking at the FreeBSD usb system. I am thinking that the solution there is is not the ideal one. Through mailing list discussions I read, I also have the impression, that the usb part of the cam subsystem is kind of a problem child. I read through parts of the usb code and am kind of understanding it. So I am trying to make an attempt to help improving it. That means, that I would like to discuss some ideas and in case this is wanted, volunteer to do some coding. What I was thinking so far is: Since Windows and Linux can handle most of the the devices FreeBSD needs a quirk for out of the box, and at least in the case of linux, I believe they do not hold all quirks in a db, there must be a way of doing it. My idea so far is to do something like this: - When a usb device is connected, try to use it without quirks. - If it stalls, cache device id data - Then emulate a disconnect/connect - Then try all permutations of possible quirks (most common to less common?) for the device - As soon as one permutation causes device not to stall -> done Anyhow my knowledge concerning the topic is not too in-deep, but I would be happy to gather some feedback concerning my idea and maybe about other approaches in this area. Best regards, Tino Engel