From owner-freebsd-usb@FreeBSD.ORG Sat Mar 20 19:52:43 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 1C78A1065672 for ; Sat, 20 Mar 2010 19:52:43 +0000 (UTC) (envelope-from mailinglists@martinlaabs.de) Received: from relay01.alfahosting-server.de (relay01.alfahosting-server.de [80.86.191.73]) by mx1.freebsd.org (Postfix) with ESMTP id C68ED8FC08 for ; Sat, 20 Mar 2010 19:52:42 +0000 (UTC) Received: by relay01.alfahosting-server.de (Postfix, from userid 1001) id 7E9D62006DD1A; Sat, 20 Mar 2010 20:30:06 +0100 (CET) X-Spam-DCC: : X-Spam-Level: X-Spam-Status: No, score=0.1 required=7.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.1.7-deb3 Received: from alfa3018.alfahosting-server.de (alfa3018.alfahosting-server.de [82.197.146.36]) by relay01.alfahosting-server.de (Postfix) with ESMTP id 4B7D02006DA50 for ; Sat, 20 Mar 2010 20:30:04 +0100 (CET) Received: from pc.martinlaabs.de (p5B0EE50D.dip.t-dialin.net [91.14.229.13]) by alfa3018.alfahosting-server.de (Postfix) with ESMTP id 22336515C79A for ; Sat, 20 Mar 2010 20:30:04 +0100 (CET) Message-ID: <4BA52239.8000300@martinlaabs.de> Date: Sat, 20 Mar 2010 20:30:01 +0100 From: Martin Laabs User-Agent: Thunderbird 2.0.0.23 (X11/20091224) MIME-Version: 1.0 To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Status: No X-Virus-Checker-Version: clamassassin 1.2.4 with ClamAV 0.94.2/10601/Sat Mar 20 00:42:36 2010 Subject: Find Vendor/Product ID from uhid device 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, 20 Mar 2010 19:52:43 -0000 Hi, I'am currently porting the linux-js joystick driver to the new USB stack. Since this driver operates on top other drivers (in the case of USB ontop the uhid driver) it needs to figure out whether /dev/uhid* is a device it can operate on. The driver scans all /dev/uhidX entries and compares the vendor and product id against a table. In the old stack this was possible through scanning all /dev/ugenX devices, get the device_info struct and compare the udi_devnames[] against the "uhidX" string. However - the udi_devname string disappeared in the new usb stack and this way seems to be not open anymore for me. Can you give me a hint how to figure the vendor and product id of a /dev/uhidX device. Thank you, Martin Laabs