From owner-freebsd-usb@FreeBSD.ORG Sun Jul 26 00:10:04 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 504121065675 for ; Sun, 26 Jul 2009 00:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 245798FC0A for ; Sun, 26 Jul 2009 00:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6Q0A3Pa027367 for ; Sun, 26 Jul 2009 00:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6Q0A3AY027366; Sun, 26 Jul 2009 00:10:03 GMT (envelope-from gnats) Date: Sun, 26 Jul 2009 00:10:03 GMT Message-Id: <200907260010.n6Q0A3AY027366@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Alastair Hogge Cc: Subject: Re: usb/137129: SteelSeries Ikari USB laser mouse not attaching X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alastair Hogge List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jul 2009 00:10:04 -0000 The following reply was made to PR usb/137129; it has been noted by GNATS. From: Alastair Hogge To: Hans Petter Selasky Cc: bug-followup@freebsd.org, al@devacid.com Subject: Re: usb/137129: SteelSeries Ikari USB laser mouse not attaching Date: Sun, 26 Jul 2009 08:08:14 +0800 On Sun July 26 2009 00:09:02 Hans Petter Selasky wrote: > On Saturday 25 July 2009 17:58:14 Alastair Hogge wrote: > > How can I find out if the mouse is being driven by libusb? > > What application are you using your mouse with? X11 or some Game? OK. Mouse works in console, X11, & tested with some games I have installed. > --HPS -al From owner-freebsd-usb@FreeBSD.ORG Sun Jul 26 00:41:15 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09F181065670; Sun, 26 Jul 2009 00:41:15 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D3C448FC18; Sun, 26 Jul 2009 00:41:14 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6Q0fElC058400; Sun, 26 Jul 2009 00:41:14 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6Q0fEO6058396; Sun, 26 Jul 2009 00:41:14 GMT (envelope-from linimon) Date: Sun, 26 Jul 2009 00:41:14 GMT Message-Id: <200907260041.n6Q0fEO6058396@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-usb@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: usb/137138: [umass] [patch] QUIRK: ASUS PDA Flash disk emulation 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: Sun, 26 Jul 2009 00:41:15 -0000 Old Synopsis: QUIRK: ASUS PDA Flash disk emulation New Synopsis: [umass] [patch] QUIRK: ASUS PDA Flash disk emulation Responsible-Changed-From-To: freebsd-bugs->freebsd-usb Responsible-Changed-By: linimon Responsible-Changed-When: Sun Jul 26 00:40:32 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=137138 From owner-freebsd-usb@FreeBSD.ORG Sun Jul 26 09:24:17 2009 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 790B6106566B for ; Sun, 26 Jul 2009 09:24:17 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.swip.net [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id 0D5968FC12 for ; Sun, 26 Jul 2009 09:24:16 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=-gZE2kl7ImYA:10 a=MXw7gxVQKqGXY79tIT8aFQ==:17 a=6I5d2MoRAAAA:8 a=ZeYadvoGNWPzc2ayG7QA:9 a=7Tk7GV2nCpaSwLYnOcUA:7 a=uOZ64pqbc598SdJ1bpdn-JMNkjkA:4 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 543765274; Sun, 26 Jul 2009 11:24:15 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, Alastair Hogge Date: Sun, 26 Jul 2009 11:24:06 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <200907260010.n6Q0A3AY027366@freefall.freebsd.org> In-Reply-To: <200907260010.n6Q0A3AY027366@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907261124.07320.hselasky@c2i.net> Cc: Subject: Re: usb/137129: SteelSeries Ikari USB laser mouse not attaching 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: Sun, 26 Jul 2009 09:24:17 -0000 Committed into USB P4 with some minor modifications: http://perforce.freebsd.org/chv.cgi?CH=166576 --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Jul 26 11:00:15 2009 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 474C510656D0 for ; Sun, 26 Jul 2009 11:00:15 +0000 (UTC) (envelope-from agh@coolrhaug.com) Received: from mail5.qnetau.com (mail5.qnetau.com [202.146.209.190]) by mx1.freebsd.org (Postfix) with ESMTP id 8D0808FC08 for ; Sun, 26 Jul 2009 11:00:14 +0000 (UTC) (envelope-from agh@coolrhaug.com) Received: (qmail 12777 invoked by uid 399); 26 Jul 2009 10:33:29 -0000 Received: from unknown (HELO madcat.localnet) (agh@coolrhaug.com@203.59.9.21) by mail5.qnetau.com with ESMTPAM; 26 Jul 2009 10:33:29 -0000 X-Originating-IP: 203.59.9.21 X-Sender: agh@coolrhaug.com From: Alastair Hogge To: Hans Petter Selasky Date: Sun, 26 Jul 2009 18:33:56 +0800 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <200907260010.n6Q0A3AY027366@freefall.freebsd.org> <200907261124.07320.hselasky@c2i.net> In-Reply-To: <200907261124.07320.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907261833.56811.agh@coolrhaug.com> Cc: freebsd-usb@freebsd.org Subject: Re: usb/137129: SteelSeries Ikari USB laser mouse not attaching 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: Sun, 26 Jul 2009 11:00:15 -0000 On Sun July 26 2009 17:24:06 Hans Petter Selasky wrote: > Committed into USB P4 with some minor modifications: > > http://perforce.freebsd.org/chv.cgi?CH=166576 Great! Thanks a lot. > --HPS -al From owner-freebsd-usb@FreeBSD.ORG Sun Jul 26 13:07:01 2009 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 BEF61106564A for ; Sun, 26 Jul 2009 13:07:01 +0000 (UTC) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (ns0.blackend.org [82.227.222.164]) by mx1.freebsd.org (Postfix) with ESMTP id 37DA68FC12 for ; Sun, 26 Jul 2009 13:07:00 +0000 (UTC) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (localhost [127.0.0.1]) by abigail.blackend.org (8.13.4/8.13.3) with ESMTP id n6QCtgM3040701 for ; Sun, 26 Jul 2009 14:55:42 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: (from marc@localhost) by abigail.blackend.org (8.13.4/8.13.3/Submit) id n6QCtgeO040700 for freebsd-usb@FreeBSD.org; Sun, 26 Jul 2009 14:55:42 +0200 (CEST) (envelope-from marc) Date: Sun, 26 Jul 2009 14:55:42 +0200 From: Marc Fonvieille To: freebsd-usb@FreeBSD.org Message-ID: <20090726125542.GA40587@abigail.blackend.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Useless-Header: blackend.org X-Operating-System: FreeBSD 4.11-STABLE User-Agent: Mutt/1.5.9i Cc: Subject: SANE, USB image scanner and -CURRENT 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: Sun, 26 Jul 2009 13:07:02 -0000 Hello, I'm trying to make run a scanner using the USB interface under 8.0-BETA2 with graphics/sane-backends and graphics/sane-frontends but SANE is unable to detect the scanner. When I plug the scanner dmesg gives: ugen2.2: at usbus2 'usbconfig dump_device_desc' gives ugen2.2: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0110 bDeviceClass = 0x00ff bDeviceSubClass = 0x0000 bDeviceProtocol = 0x00ff bMaxPacketSize0 = 0x0008 idVendor = 0x04a9 idProduct = 0x220e bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0000 bNumConfigurations = 0x0001 Both 'sane-find-scanner -q' and 'scanimage -L' are unable to find any scanner. So I tried to inform SANE via /usr/local/etc/sane.d/plustek.conf (the right config file for my scanner) that the scanner was [usb] 0x04a9 0x220e or (2nd try) [usb] 0x04a9 0x220e device /dev/ugen2.2 or (3rd try) [usb] device /dev/ugen2.2 but both 'sane-find-scanner -q' and 'scanimage -L' still gives nothing. Then I read the CVS logs about SANE's ports and http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/sane-backends/Makefile seems to say that SANE is broken since removal of uscanner(8), am I right? -- Marc From owner-freebsd-usb@FreeBSD.ORG Sun Jul 26 13:12:28 2009 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 A9674106566B for ; Sun, 26 Jul 2009 13:12:28 +0000 (UTC) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (ns0.blackend.org [82.227.222.164]) by mx1.freebsd.org (Postfix) with ESMTP id 2AB598FC2F for ; Sun, 26 Jul 2009 13:12:27 +0000 (UTC) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (localhost [127.0.0.1]) by abigail.blackend.org (8.13.4/8.13.3) with ESMTP id n6QDCOXh041007 for ; Sun, 26 Jul 2009 15:12:24 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: (from marc@localhost) by abigail.blackend.org (8.13.4/8.13.3/Submit) id n6QDCOS5041006 for freebsd-usb@FreeBSD.org; Sun, 26 Jul 2009 15:12:24 +0200 (CEST) (envelope-from marc) Date: Sun, 26 Jul 2009 15:12:24 +0200 From: Marc Fonvieille To: freebsd-usb@FreeBSD.org Message-ID: <20090726131224.GA40957@abigail.blackend.org> References: <20090726125542.GA40587@abigail.blackend.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090726125542.GA40587@abigail.blackend.org> X-Useless-Header: blackend.org X-Operating-System: FreeBSD 4.11-STABLE User-Agent: Mutt/1.5.9i Cc: Subject: Re: SANE, USB image scanner and -CURRENT 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: Sun, 26 Jul 2009 13:12:28 -0000 On Sun, Jul 26, 2009 at 02:55:42PM +0200, Marc Fonvieille wrote: > Then I read the CVS logs about SANE's ports and > http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/sane-backends/Makefile > seems to say that SANE is broken since removal of uscanner(8), am I > right? > Ok, I read the Makefile, SANE is by default w/o libusb support cause it's broken with libusb coming with 8.X so it's normal that the scanner is not found. Is there any plan in fixing that problem before 8.0-RELEASE? -- Marc From owner-freebsd-usb@FreeBSD.ORG Sun Jul 26 13:27:45 2009 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 A6E901065672 for ; Sun, 26 Jul 2009 13:27:45 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id 0C33C8FC12 for ; Sun, 26 Jul 2009 13:27:44 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=aZKx5Da07SIA:10 a=MXw7gxVQKqGXY79tIT8aFQ==:17 a=6I5d2MoRAAAA:8 a=3Y-mc-mJCypneQ5jSq0A:9 a=GIAmh1Re4sPtYx7RZ6cA:7 a=7yahk85dybHtDaCwY5dwS42EeCkA:4 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 230733565; Sun, 26 Jul 2009 15:27:43 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sun, 26 Jul 2009 15:27:36 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <20090726125542.GA40587@abigail.blackend.org> <20090726131224.GA40957@abigail.blackend.org> In-Reply-To: <20090726131224.GA40957@abigail.blackend.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907261527.36773.hselasky@c2i.net> Cc: Subject: Re: SANE, USB image scanner and -CURRENT 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: Sun, 26 Jul 2009 13:27:45 -0000 On Sunday 26 July 2009 15:12:24 Marc Fonvieille wrote: > On Sun, Jul 26, 2009 at 02:55:42PM +0200, Marc Fonvieille wrote: > > Then I read the CVS logs about SANE's ports and > > http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/sane-backends/Makefi > >le seems to say that SANE is broken since removal of uscanner(8), am I > > right? > > Ok, I read the Makefile, SANE is by default w/o libusb support cause > it's broken with libusb coming with 8.X so it's normal that the scanner > is not found. > Is there any plan in fixing that problem before 8.0-RELEASE? I think this is an old error. Have you tried compiling SANE from ports with libusb support enabled? --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Jul 26 14:46:26 2009 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 659DB10656E1 for ; Sun, 26 Jul 2009 14:46:26 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id F27EC8FC1B for ; Sun, 26 Jul 2009 14:46:25 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=-gZE2kl7ImYA:10 a=MXw7gxVQKqGXY79tIT8aFQ==:17 a=ousrC4rJJkL-K6QFYOwA:9 a=Zq7zyqHrxm6SbH23-_kA:7 a=iBArQSa7M4fUSlrl8OdhPH-GoFoA:4 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1279285054; Sun, 26 Jul 2009 16:46:24 +0200 To: freebsd-usb@freebsd.org, Alastair Hogge Content-Disposition: inline From: Hans Petter Selasky Date: Sun, 26 Jul 2009 16:46:16 +0200 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <200907261646.17843.hselasky@c2i.net> Cc: Subject: Re: usb/137129: SteelSeries Ikari USB laser mouse not attaching 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: Sun, 26 Jul 2009 14:46:27 -0000 Hi, again. I think I have found a more general solution. Can you remove the quirk and try the following patch instead to ukbd_probe(): ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#22 - src/sys/dev/usb/input/ukbd.c ==== @@ -711,7 +711,15 @@ if (error) return (ENXIO); + /* + * NOTE: we currently don't support USB mouse and USB keyboard + * on the same USB endpoint. + */ if (hid_is_collection(d_ptr, d_len, + HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE))) { + /* most likely a mouse */ + error = ENXIO; + } else if (hid_is_collection(d_ptr, d_len, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_KEYBOARD))) { if (usb_test_quirk(uaa, UQ_KBD_IGNORE)) error = ENXIO; --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Jul 26 16:10:39 2009 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 3EC501065672 for ; Sun, 26 Jul 2009 16:10:39 +0000 (UTC) (envelope-from agh@coolrhaug.com) Received: from mail5.qnetau.com (mail5.qnetau.com [202.146.209.190]) by mx1.freebsd.org (Postfix) with ESMTP id 910FC8FC16 for ; Sun, 26 Jul 2009 16:10:38 +0000 (UTC) (envelope-from agh@coolrhaug.com) Received: (qmail 39549 invoked by uid 399); 26 Jul 2009 16:10:37 -0000 Received: from unknown (HELO madcat.localnet) (agh@coolrhaug.com@203.59.9.21) by mail5.qnetau.com with ESMTPAM; 26 Jul 2009 16:10:37 -0000 X-Originating-IP: 203.59.9.21 X-Sender: agh@coolrhaug.com From: Alastair Hogge To: Hans Petter Selasky Date: Mon, 27 Jul 2009 00:11:04 +0800 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <200907261646.17843.hselasky@c2i.net> In-Reply-To: <200907261646.17843.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907270011.04356.agh@coolrhaug.com> Cc: freebsd-usb@freebsd.org Subject: Re: usb/137129: SteelSeries Ikari USB laser mouse not attaching 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: Sun, 26 Jul 2009 16:10:39 -0000 On Sun July 26 2009 22:46:16 Hans Petter Selasky wrote: > Hi, again. Hey, > I think I have found a more general solution. Can you remove the quirk and > try the following patch instead to ukbd_probe(): Yep. > ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#22 - > src/sys/dev/usb/input/ukbd.c ==== > @@ -711,7 +711,15 @@ > if (error) > return (ENXIO); > > + /* > + * NOTE: we currently don't support USB mouse and USB keyboard > + * on the same USB endpoint. > + */ > if (hid_is_collection(d_ptr, d_len, > + HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE))) { > + /* most likely a mouse */ > + error = ENXIO; > + } else if (hid_is_collection(d_ptr, d_len, > HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_KEYBOARD))) { > if (usb_test_quirk(uaa, UQ_KBD_IGNORE)) > error = ENXIO; OK, that works. > --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Jul 26 18:09:59 2009 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 3575B106564A for ; Sun, 26 Jul 2009 18:09:59 +0000 (UTC) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (ns0.blackend.org [82.227.222.164]) by mx1.freebsd.org (Postfix) with ESMTP id A2E4C8FC1C for ; Sun, 26 Jul 2009 18:09:58 +0000 (UTC) (envelope-from marc@blackend.org) Received: from gothic.blackend.org (gothic.blackend.org [192.168.1.203]) by abigail.blackend.org (8.13.4/8.13.3) with ESMTP id n6QI9rSt044062; Sun, 26 Jul 2009 20:09:53 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: from gothic.blackend.org (localhost [127.0.0.1]) by gothic.blackend.org (8.14.3/8.14.3) with ESMTP id n6QIAVRf015271; Sun, 26 Jul 2009 20:10:31 +0200 (CEST) (envelope-from marc@gothic.blackend.org) Received: (from marc@localhost) by gothic.blackend.org (8.14.3/8.14.3/Submit) id n6QIAQeb015270; Sun, 26 Jul 2009 20:10:26 +0200 (CEST) (envelope-from marc) Date: Sun, 26 Jul 2009 20:10:26 +0200 From: Marc Fonvieille To: Hans Petter Selasky Message-ID: <20090726181026.GB1223@gothic.blackend.org> References: <20090726125542.GA40587@abigail.blackend.org> <20090726131224.GA40957@abigail.blackend.org> <200907261527.36773.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200907261527.36773.hselasky@c2i.net> X-Useless-Header: blackend.org X-Operating-System: FreeBSD 8.0-BETA2 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-usb@freebsd.org Subject: Re: SANE, USB image scanner and -CURRENT 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: Sun, 26 Jul 2009 18:09:59 -0000 On Sun, Jul 26, 2009 at 03:27:36PM +0200, Hans Petter Selasky wrote: > On Sunday 26 July 2009 15:12:24 Marc Fonvieille wrote: > > On Sun, Jul 26, 2009 at 02:55:42PM +0200, Marc Fonvieille wrote: > > > Then I read the CVS logs about SANE's ports and > > > http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/sane-backends/Makefi > > >le seems to say that SANE is broken since removal of uscanner(8), am I > > > right? > > > > Ok, I read the Makefile, SANE is by default w/o libusb support cause > > it's broken with libusb coming with 8.X so it's normal that the scanner > > is not found. > > Is there any plan in fixing that problem before 8.0-RELEASE? > > I think this is an old error. Have you tried compiling SANE from ports with > libusb support enabled? > It's impossible cause of this Makefile part: .if (defined(WITHOUT_USB) || ${OSVERSION} > 800000) CONFIGURE_ARGS+= --disable-libusb .else .if ${OSVERSION} < 800069 LIB_DEPENDS+= usb-0.1.8:${PORTSDIR}/devel/libusb .endif .endif So SANE is built w/o libusb support even if you check the option. I tried to comment this part but the build failed on sanei_usb.c etc. I think someone with USB foo should have a look to the port. -- Marc From owner-freebsd-usb@FreeBSD.ORG Sun Jul 26 18:32:38 2009 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 0FA69106564A; Sun, 26 Jul 2009 18:32:38 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 1958C8FC14; Sun, 26 Jul 2009 18:32:36 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=RZLChLOEjtsA:10 a=MXw7gxVQKqGXY79tIT8aFQ==:17 a=6I5d2MoRAAAA:8 a=fBQm-7HePQRKpWkIK9YA:9 a=8Nrc-uSqvupmRLBQHT8A:7 a=XjEPqWIqaV-ubroR3UCZL1ZStxgA:4 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1285477784; Sun, 26 Jul 2009 20:32:35 +0200 From: Hans Petter Selasky To: Marc Fonvieille , freebsd-ports@freebsd.org Date: Sun, 26 Jul 2009 20:32:23 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <20090726125542.GA40587@abigail.blackend.org> <200907261527.36773.hselasky@c2i.net> <20090726181026.GB1223@gothic.blackend.org> In-Reply-To: <20090726181026.GB1223@gothic.blackend.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907262032.26232.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: SANE, USB image scanner and -CURRENT (problem solved) 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: Sun, 26 Jul 2009 18:32:38 -0000 On Sunday 26 July 2009 20:10:26 Marc Fonvieille wrote: > On Sun, Jul 26, 2009 at 03:27:36PM +0200, Hans Petter Selasky wrote: > > On Sunday 26 July 2009 15:12:24 Marc Fonvieille wrote: > > > On Sun, Jul 26, 2009 at 02:55:42PM +0200, Marc Fonvieille wrote: > > > > Then I read the CVS logs about SANE's ports and > > > > http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/sane-backends/Ma > > > >kefi le seems to say that SANE is broken since removal of uscanner(8), > > > > am I right? > > > > > > Ok, I read the Makefile, SANE is by default w/o libusb support cause > > > it's broken with libusb coming with 8.X so it's normal that the scanner > > > is not found. > > > Is there any plan in fixing that problem before 8.0-RELEASE? > > > > I think this is an old error. Have you tried compiling SANE from ports > > with libusb support enabled? > > It's impossible cause of this Makefile part: > > .if (defined(WITHOUT_USB) || ${OSVERSION} > 800000) > CONFIGURE_ARGS+= --disable-libusb > .else > .if ${OSVERSION} < 800069 > LIB_DEPENDS+= usb-0.1.8:${PORTSDIR}/devel/libusb > .endif > .endif > > So SANE is built w/o libusb support even if you check the option. I > tried to comment this part but the build failed on sanei_usb.c etc. > > I think someone with USB foo should have a look to the port. Patch: /usr/ports/graphics/sane-backends/work/sane-backends-1.0.20/sanei/sanei_usb.c At beginning of file change: #if defined (__FreeBSD__) #include #include #endif /* __FreeBSD__ */ To: #if (defined (__FreeBSD__) && (__FreeBSD_version < 800064)) #include #include #endif /* __FreeBSD__ */ That's all. ... Making all in po gmake[1]: Entering directory `/usr/ports/graphics/sane-backends/work/sane- backends-1.0.20/po' generating sane-backends.bg.mo from sane-backends.bg.po generating sane-backends.cs.mo from sane-backends.cs.po generating sane-backends.da.mo from sane-backends.da.po generating sane-backends.de.mo from sane-backends.de.po generating sane-backends.en_GB.mo from sane-backends.en_GB.po generating sane-backends.eo.mo from sane-backends.eo.po generating sane-backends.es.mo from sane-backends.es.po generating sane-backends.fi.mo from sane-backends.fi.po generating sane-backends.fr.mo from sane-backends.fr.po generating sane-backends.it.mo from sane-backends.it.po generating sane-backends.nb.mo from sane-backends.nb.po generating sane-backends.nl.mo from sane-backends.nl.po generating sane-backends.pl.mo from sane-backends.pl.po generating sane-backends.pt.mo from sane-backends.pt.po generating sane-backends.ru.mo from sane-backends.ru.po generating sane-backends.sv.mo from sane-backends.sv.po gmake[1]: Leaving directory `/usr/ports/graphics/sane-backends/work/sane- backends-1.0.20/po' gmake[1]: Entering directory `/usr/ports/graphics/sane-backends/work/sane- backends-1.0.20' gmake[1]: Nothing to be done for `all-am'. gmake[1]: Leaving directory `/usr/ports/graphics/sane-backends/work/sane- backends-1.0.20' --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Jul 26 20:17:53 2009 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 E4653106564A for ; Sun, 26 Jul 2009 20:17:53 +0000 (UTC) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (ns0.blackend.org [82.227.222.164]) by mx1.freebsd.org (Postfix) with ESMTP id 3B97B8FC12 for ; Sun, 26 Jul 2009 20:17:52 +0000 (UTC) (envelope-from marc@blackend.org) Received: from gothic.blackend.org (gothic.blackend.org [192.168.1.203]) by abigail.blackend.org (8.13.4/8.13.3) with ESMTP id n6QKHl7F045302; Sun, 26 Jul 2009 22:17:47 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: from gothic.blackend.org (localhost [127.0.0.1]) by gothic.blackend.org (8.14.3/8.14.3) with ESMTP id n6QKIPFd075321; Sun, 26 Jul 2009 22:18:25 +0200 (CEST) (envelope-from marc@gothic.blackend.org) Received: (from marc@localhost) by gothic.blackend.org (8.14.3/8.14.3/Submit) id n6QKIPNR075320; Sun, 26 Jul 2009 22:18:25 +0200 (CEST) (envelope-from marc) Date: Sun, 26 Jul 2009 22:18:25 +0200 From: Marc Fonvieille To: Hans Petter Selasky Message-ID: <20090726201824.GA75277@gothic.blackend.org> References: <20090726125542.GA40587@abigail.blackend.org> <200907261527.36773.hselasky@c2i.net> <20090726181026.GB1223@gothic.blackend.org> <200907262032.26232.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200907262032.26232.hselasky@c2i.net> X-Useless-Header: blackend.org X-Operating-System: FreeBSD 8.0-BETA2 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-usb@freebsd.org, freebsd-ports@freebsd.org Subject: Re: SANE, USB image scanner and -CURRENT (problem solved) 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: Sun, 26 Jul 2009 20:17:54 -0000 On Sun, Jul 26, 2009 at 08:32:23PM +0200, Hans Petter Selasky wrote: > On Sunday 26 July 2009 20:10:26 Marc Fonvieille wrote: > > On Sun, Jul 26, 2009 at 03:27:36PM +0200, Hans Petter Selasky wrote: > > > On Sunday 26 July 2009 15:12:24 Marc Fonvieille wrote: > > > > On Sun, Jul 26, 2009 at 02:55:42PM +0200, Marc Fonvieille wrote: > > > > > Then I read the CVS logs about SANE's ports and > > > > > http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/sane-backends/Ma > > > > >kefi le seems to say that SANE is broken since removal of uscanner(8), > > > > > am I right? > > > > > > > > Ok, I read the Makefile, SANE is by default w/o libusb support cause > > > > it's broken with libusb coming with 8.X so it's normal that the scanner > > > > is not found. > > > > Is there any plan in fixing that problem before 8.0-RELEASE? > > > > > > I think this is an old error. Have you tried compiling SANE from ports > > > with libusb support enabled? > > > > It's impossible cause of this Makefile part: > > > > .if (defined(WITHOUT_USB) || ${OSVERSION} > 800000) > > CONFIGURE_ARGS+= --disable-libusb > > .else > > .if ${OSVERSION} < 800069 > > LIB_DEPENDS+= usb-0.1.8:${PORTSDIR}/devel/libusb > > .endif > > .endif > > > > So SANE is built w/o libusb support even if you check the option. I > > tried to comment this part but the build failed on sanei_usb.c etc. > > > > I think someone with USB foo should have a look to the port. > > > Patch: > > /usr/ports/graphics/sane-backends/work/sane-backends-1.0.20/sanei/sanei_usb.c > > At beginning of file change: > > #if defined (__FreeBSD__) > #include > #include > #endif /* __FreeBSD__ */ > > To: > > #if (defined (__FreeBSD__) && (__FreeBSD_version < 800064)) > #include > #include > #endif /* __FreeBSD__ */ > > That's all. > > ... > Thanks a lot! It works now. I just committed your fix to the port, now the USB scanners work under 8.X! I'm currently testing under 8.X all USB things I have under the hand, I may contact you again in future :) -- Marc From owner-freebsd-usb@FreeBSD.ORG Mon Jul 27 11:07:04 2009 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 BB173106566B for ; Mon, 27 Jul 2009 11:07:04 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A79808FC1C for ; Mon, 27 Jul 2009 11:07:04 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6RB744T019138 for ; Mon, 27 Jul 2009 11:07:04 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6RB74bX019134 for freebsd-usb@FreeBSD.org; Mon, 27 Jul 2009 11:07:04 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 27 Jul 2009 11:07:04 GMT Message-Id: <200907271107.n6RB74bX019134@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-usb@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-usb@FreeBSD.org 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: Mon, 27 Jul 2009 11:07:05 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o usb/137138 usb [umass] [patch] QUIRK: ASUS PDA Flash disk emulation o usb/137129 usb SteelSeries Ikari USB laser mouse not attaching o usb/137035 usb Sony cyber-shot DSC-P72 not accessible - cam quirks o usb/136761 usb [usbdevs] [patch] Teach usbdevs / u3g(4) about Huawei o usb/135938 usb [aue] aue driver only passes traffic in promisc mode o usb/135857 usb RTL8187 Wireless Adapter o usb/135575 usb [usbdevs] [patch] Add HTC Wizard phone vid/pid informa o usb/135542 usb [keyboard] boot loader does not work with a usb keyboa o usb/135372 usb Quirk report for Teclast TL-C300 usb media player o usb/135348 usb [umass] USB Drive Hangs with ZFS (JMicron USB2/eSata) o usb/135206 usb machine reboots when inserted USB device o usb/135200 usb SAMSUNG i740 usb mass: Synchronize cache failed, statu o usb/135182 usb UMASS quirk - Olympus FE20 camera o usb/134950 usb Lowering DTR for USB-modem via ubsa is not possible o usb/134633 usb Add support for WILLCOM03(SHARP smart phone) o usb/134631 usb [usbdevs] [patch] WiSPY DBx support requires usb tweak o usb/134476 usb [usb2] [umass] [quirk] Add quirk for Cypress xx6830xx o usb/134299 usb Kernel Panic plugging in MF626 USB UMTS Stick u3g o usb/134193 usb System freeze on usb MP3 player insertion o usb/134117 usb [Patch] Add support for 'Option GlobeTrotter HSDPA Mod o usb/134085 usb [umass] Adding usb quirk for Sony USB flash drive o usb/133989 usb [newusb] [ukbd] USB keyboard dead at mountroot> prompt f usb/133545 usb [usb] [panic] Kernel crash in usb2_intr_schedule_adjus o usb/133390 usb umass crashes system in 7.1 when Olympus D-540 attache o usb/133296 usb rum driver not working properly in hostap mode p usb/132799 usb [usb][patch]GENESYS USB2IDE requires NO_SYNCHRONIZE_CA o usb/132785 usb [usb] [patch] Gemtech remote powersocket is classed as o usb/132594 usb USB subsystem causes page fault and crashes o usb/132312 usb Xorg 7.4 halts USB controller o usb/132080 usb [patch] [usb] Kernel panic after NOMEM caused by rum c o usb/132066 usb [ukbd] Keyboard failure USB keyboard DELL 760 o usb/132036 usb [panic] page fault when connecting Olympus C740 camera o usb/131912 usb [uslcom] [patch] New devices using Silicon Labs chips o usb/131900 usb [usbdevs] [patch] Additional product identification co o usb/131583 usb [umass] Failure when detaching umass Device o usb/131576 usb [aue] ADMtek USB To LAN Converter can't send data o usb/131521 usb Registering Belkin UPS to usb_quirks.c f usb/131123 usb [patch] re-add UQ_ASSUME_CM_OVER_DATA USB quirk o usb/131074 usb no run-time detection of usb devices plugged into exte o usb/130736 usb Page fault unplugging USB stick o usb/130325 usb [usb] [patch] fix tools/tools/usb/print-usb-if-vids.sh o usb/130230 usb Samsung Electronics YP-U3 does not attach in 7.1-RELEA o usb/130208 usb Boot process severely hampered by umass0 error o usb/130122 usb [newusb] DVD drive detects as 'da' device o docs/129962 usb [newusb] usbconfig(8) refers to non-existant usb2_core o usb/129945 usb [usbdevs] [patch] add u3g support for Longcheer WM66 U o usb/129766 usb [usb] plugging in usb modem HUAWEI E226 panics system o usb/129758 usb [uftdi] [patch] add Pyramid LCD usb support o usb/129673 usb [uhci] uhci (uhub) confused on replugging USB 1.1 scan o usb/129522 usb [ubsa] [patch] add support for ZTE AC8700 modem o usb/129500 usb [umass] [panic] FreeBSD Crashes when connecting SanDis o usb/129311 usb [usb] [panic] Instant crash with an USB card reader o usb/129251 usb [usbdevs] [patch] Liebert UPS being assigned uhid and o usb/129173 usb [uplcom] [patch] Add support for Corega CG-USBRS232R a s usb/128990 usb [usb] u3g does not handle RTS/CTS available on for exa o usb/128977 usb [usb] [patch] uaudio is not full duplex o usb/128803 usb [usbdevs] [patch] Quirk for I-Tuner Networks USBLCD4X2 o usb/128485 usb [umodem] [patch] Nokia N80 modem support o usb/128425 usb [umass] Cannot Connect Maxtor Onetouch 4 USB drive f usb/128418 usb [panic] [rum] loading if_rum causes panic, looks like o usb/128324 usb [uplcom] [patch] remove baud rate restriction for PL23 o usb/127980 usb [umass] [patch] Fix Samsung YP U2 MP3 player on 7.x an o usb/127926 usb [boot] USB Timeout during bootup s usb/127549 usb [umass] [patch] Meizu MiniPlayer M6 (SL) requires some s usb/127453 usb [request] ubsa, uark, ubser, uftdi, and friends should o usb/127423 usb [boot] BTX halted on Gigabyte GA-MA69VM-S2 / AMD Sempr o usb/127342 usb [boot] [panic] enabling usb keyboard and mouse support o usb/127248 usb [ucom] panic while uplcom devices attaach and detach o kern/127222 usb [ohci]: Regression in 7.0 usb storage generic driver o usb/126884 usb [ugen] [patch] Bug in buffer handling in ugen.c f usb/126848 usb [usb]: USB Keyboard hangs during Installation o usb/126740 usb [ulpt] doesn't work on 7.0-RELEASE, 10 second stall be o usb/126519 usb [usb] [panic] panic when plugging in an iphone o kern/126396 usb [panic] kernel panic after unplug USB Bluetooth device o usb/125736 usb [ukbd] [hang] system hangs after AT keyboard detect if o usb/125631 usb [ums] [panic] kernel panic during bootup while 'Logite o usb/125510 usb [panic] repeated plug and unplug of USB mass storage d o usb/125450 usb [panic] Removing USB flash card while being accessed c o usb/125264 usb [patch] sysctl for set usb mouse rate (very useful for o usb/125238 usb [ums] Habu Mouse turns off in X o usb/125088 usb [keyboard] Touchpad not detected on Adesso AKB-430UG U o usb/124980 usb [panic] kernel panic on detaching unmounted umass devi o kern/124777 usb [ucom] USB cua devices don't revert to tty devices whe o usb/124758 usb [rum] [panic] rum panics SMP kernel o usb/124708 usb [panic] Kernel panic on USB KVM reattach o usb/124604 usb [ums] Microsoft combo wireless mouse doesn't work o usb/123969 usb [usb] Supermicro H8SMi-2 usb problem: port reset faile o usb/123714 usb [usb] [panic] Panic when hald-storage-probe runs with o usb/123691 usb usbd(8): usbd hangs o usb/123690 usb [usb] [panic] Panic on USB device insertion when usb l o usb/123611 usb [usb] BBB reset failed, STALLED from Imation/Mitsumi U o usb/123509 usb [umass] continuous reset Samsung SGH-G600 phone o usb/123352 usb [usbdevs] [patch] Add Option GTMAX3.6/7.2 and Quallcom o usb/123351 usb [usbdevs] [patch] Add Reiner SCT cyberJack, Omnikey [2 o usb/122992 usb [umass] [patch] MotoROKR Z6 Phone not recognised by um o usb/122956 usb [ubsa] [patch] add support for Novatel Wireless XU870 o usb/122936 usb [ucom] [ubsa] Device does not receive interrupt o usb/122905 usb [ubsa] [patch] add Huawei E220 to ubsa o usb/122819 usb [usb] [patch] Patch to provide dynamic additions to th o usb/122813 usb [udbp] [request] udbp driver should be removed in favo o usb/122621 usb [new driver] [patch] New driver for Sierra Wireless 3G o usb/122547 usb [ehci] USB Printer not being recognized after reboot o usb/122539 usb [ohci] [panic] AnyDATA ADU-E1000D - kernel panic: ohci o usb/122483 usb [panic] [ulpt] Repeatable panic in 7.0-STABLE o usb/122119 usb [umass] umass device causes creation of daX but not da o usb/122025 usb [uscanner] [patch] uscanner does not attach to Epson R o usb/121755 usb [ohci] [patch] Fix panic after ohci/uhub cardbus devic o usb/121734 usb [ugen] ugen HP1022 printer device not working since up o usb/121708 usb [keyboard] nforce 650i mobo w/ usb keyboard infinite k o usb/121474 usb [cam] [patch] QUIRK: SAMSUNG HM250JI in LaCie usb hard o usb/121426 usb [patch] [uscanner] add HP ScanJet 3570C o usb/121275 usb [boot] [panic] FreeBSD fails to boot with usb legacy s o usb/121232 usb [usb] [panic] USB CardBus card removal causes reboot s p usb/121184 usb [uipaq] [patch] add ids from linux ipaq driver (plus a o usb/121169 usb [umass] Issues with usb mp3 player o usb/121045 usb [uftdi] [patch] Add support for PC-OP-RS1 and KURO-RS o usb/120786 usb [usb] [panic] Kernel panic when forced umount of a det o usb/120729 usb [panic] fault while in kernel mode with connecting USB o usb/120572 usb [umass] [patch] quirk to support ASUS P535 as umass (a o usb/120321 usb [hang] System hangs when transferring data to WD MyBoo o usb/120283 usb [panic] Automation reboot with wireless keyboard & mou o usb/120034 usb [hang] 6.2 & 6.3 hangs on boot at usb0: OHCI with 1.5 o usb/119981 usb [axe] [patch] add support for LOGITEC LAN-GTJ/U2 gigab o usb/119977 usb [ums] Mouse does not work in a Cherry-USB keyboard/mou o usb/119653 usb [cam] [patch] iriver s7 player sync cache error patch o usb/119633 usb [umass] umass0: BBB reset failed, IOERROR [regression] o usb/119513 usb [irq] inserting dlink dwl-g630 wireless card results i o usb/119509 usb [usb] USB flaky on Dell Optiplex 755 o usb/119481 usb [hang] FreeBSD not responding after connecting USB-Mas o usb/119389 usb [umass] Sony DSC-W1 CBI reset failed, STALLED [regress o usb/119227 usb [ubsa] [patch] ubsa buffer is too small; should be tun o usb/119201 usb [cam] [patch] Quirks for Olympus FE-210 camera, LG and o usb/118485 usb [usbdevs] [patch] Logitech Headset Workaround o usb/118480 usb [umass] Timeout in USB mass storage freezes vfs layer o usb/118353 usb [panic] [ppp] repeatable kernel panic during ppp(4) se o usb/118141 usb [ucom] usb serial and nokia phones ucomreadcb ucomread o usb/118140 usb [ucom] [patch] quick hack for ucom to get it behave wi o usb/118098 usb [umass] 6th gen iPod causes problems when disconnectin o usb/117955 usb [umass] [panic] inserting minolta dimage a2 crashes OS o usb/117946 usb [panic] D-Link DUB-E100 rev. B1 crashes FreeBSD 7.0-BE o usb/117938 usb [ums] [patch] Adding support for MS WL Natural and MS o usb/117911 usb [ums] [request] Mouse Gembird MUSWC not work o usb/117893 usb [umass] Lacie USB DVD writing failing o usb/117613 usb [uhci] [irq] uhci interrupt storm & USB leaked memory o usb/117598 usb [uaudio] [patch] Not possible to record with Plantroni o usb/117313 usb [umass] [panic] panic on usb camera insertion o usb/117200 usb [ugen] ugen0 prints strange string on attach if detach o usb/117183 usb [panic] USB/fusefs -- panic while transferring large a o usb/116947 usb [ukbd] [patch] [regression] enable boot protocol on th o usb/116699 usb [usbhid] USB HID devices do not initialize at system b o usb/116561 usb [umodem] [panic] RELENG_6 umodem panic "trying to slee o usb/116282 usb [ulpt] Cannot print on USB HP LJ1018 or LJ1300 o usb/115935 usb [usbdevs] [patch] kernel counterproductively attaches o usb/115933 usb [uftdi] [patch] RATOC REX-USB60F (usb serial converter o usb/115400 usb [ehci] Problem with EHCI on ASUS M2N4-SLI o usb/115298 usb [ulpt] [panic] Turning off USB printer panics kernel o usb/114916 usb [umass] [patch] USB Maxtor drive (L300RO) requires qui o kern/114780 usb [uplcom] [panic] Panics while stress testing the uplco o usb/114682 usb [umass] generic USB media-card reader unusable o usb/114310 usb [libusb] [patch] [panic] USB hub attachment panics ker o usb/114068 usb [umass] [patch] Problems with connection of the umass o conf/114013 usb [patch] WITHOUT_USB allow to compil a lot of USB stuff s usb/113977 usb [request] Need a way to set mode of USB disk's write c o usb/113672 usb [ehci] [panic] Kernel panic with AEWIN CB6971 s usb/113629 usb [ukbd] Dropped USB keyboard events on Dell Latitude D6 o usb/113432 usb [ucom] WARNING: attempt to net_add_domain(netgraph) af a usb/113060 usb [usbdevs] [patch] Samsung printer not working in bidir o usb/112944 usb [ulpt] [patch] Bi-directional access to HP LaserJet 10 o usb/112640 usb [usb] [hang] Kernel freezes when writing a file to an o usb/112631 usb [panic] Problem with SONY DSC-S80 camera on umount s usb/112568 usb [umass] [request] USB mode may wrong when mounting Pla o usb/112463 usb [umass] problem with Samsung USB DVD writer, libscg an o usb/112461 usb [ehci] [request] ehci USB 2.0 doesn't work on nforce4 o usb/111753 usb [uhid] [panic] Replicable system panic involving UHID o usb/110856 usb [ugen] [patch] interrupt in msgs are truncated when bu o usb/110197 usb [umass] Sony PSP umass device does not detach from EHC o usb/109397 usb [panic] on boot from USB flash o usb/109274 usb [usb] MCP55 USB Controller fails to attach in AMD64 Cu o usb/108513 usb [umass] Creative MuVo TX FM fails in 6.2-RELEASE [regr s usb/108344 usb [panic] kernel with atausb panics when unplugging USB o usb/108056 usb [ohci] Mouse gets powered off during device probe when o usb/107935 usb [uplcom] [panic] panic while accessing /dev/cuaU0 o usb/107924 usb [patch] usbd(8) does not call detach o usb/107848 usb [umass] [request] cannot access Samsung flash disk o usb/107827 usb [ohci] [panic] ohci_add_done addr not found o usb/107496 usb [uhub] USB device problem on RELENG_6_2 (SHORT_XFER) [ o usb/107388 usb [new driver] [patch] add utoppy device from NetBSD o usb/107248 usb [umass] [patch] scsi_da.c quirk for Cowon iAUDIO X5 MP o usb/107243 usb [cam] [patch] Apacer USB Flash Drive quirk o usb/106861 usb [usbdevs] [patch]: usbdevs update: Add product ACER Ze s usb/106832 usb [usb] USB HP printer is not detected by kernel when AC o usb/106648 usb [umass] [hang] USB Floppy on D1950 10 min Hang on Inse o usb/106621 usb [axe] [patch] DLINK DUB-E100 support broken o usb/106615 usb [uftdi] uftdi module does not automatically load with o usb/106041 usb [usb] [request] FreeBSD does not recognise Mustek Bear o usb/105361 usb [panic] Kernel panic during unmounting mass storage (C o usb/105186 usb [ehci] [panic] USB 2.0/ehci on FreeBSD 6.2-PRE/AMD64 c o usb/105065 usb [ata] [usb] SATA - USB Bridge o usb/104830 usb [umass] system crashes when copying data to umass devi o usb/104645 usb [umass] [request] Rave C-201 MP3 player does not commu o usb/104352 usb [ural] [patch] ural driver doesnt work o usb/104292 usb [umass] [hang] system lockup on forced umount of usb-s o usb/104290 usb [umass] [patch] quirk: TOSHIBA DVD-RAM drive (libretto o usb/103917 usb [uhub] USB driver reports "Addr 0 should never happen" o usb/103418 usb usbhidctl(1): [patch] [request] usbhidctl: add ability o usb/103289 usb [request] USB 2.0 problems on AMD LX-800 CPU and CS-55 o usb/103046 usb [ulpt] [patch] ulpt event driven I/O with select(2) an o usb/103025 usb [uhub] [panic] wrong detection of USB device for FreeB o usb/102976 usb [panic] Casio Exilim Digital Camera causes panic on in o usb/102678 usb [keyboard] Dell PowerEdge DRAC5 USB Keyboard does not o usb/102066 usb [ukbd] usb keyboard and multimedia keys don't work o usb/101775 usb [libusbhid] [patch] possible error in report descripto o usb/101761 usb [usb] [patch] [request] usb.h: increase maximal size o o usb/101752 usb [umass] [panic] 6.1-RELEASE kernel panic on usb device o usb/101448 usb [ohci] FBSD 6.1-STABLE/AMD64 crashes under heavy USB/O o usb/101096 usb [ural] [panic] USB WLAN occasionally causes kernel-pan o usb/100746 usb [keyboard] system does not boot due to USB keyboard pr o usb/99538 usb [keyboard] while using USB keyboard default params of o usb/99431 usb [keyboard] FreeBSD on MSI 6566E (Intel 845E motherboar o kern/99200 usb [bluetooth] SMP-Kernel crashes reliably when Bluetooth o usb/98343 usb [boot] BBB reset failed errors with Creative Muvo MP3 o usb/97472 usb [cam] [patch] add support for Olympus C150,D390 s usb/97286 usb [mouse] [request] MS Wireless Intellimouse Explorer 2. o usb/97175 usb [umass] [hang] USB cardreader hangs system o usb/96457 usb [umass] [panic] fatback on umass = reboot o usb/96381 usb [cam] [patch] add a quirk table entry for a flash ram o usb/96224 usb [usb] [msdosfs] mount_msdosfs cause page fault in sync s usb/96120 usb [ums] [request] USB mouse not always detected s usb/95636 usb [umass] [boot] 5 minute delay at boot when using VT620 o usb/95562 usb [umass] Write Stress in USB Mass drive causes "vinvalb s usb/95348 usb [keyboard] USB keyboard unplug causes noise on screen o usb/95037 usb [umass] USB disk not recognized on hot-plug. o usb/94897 usb [panic] Kernel Panic when cleanly unmounting USB disk o usb/94717 usb [ulpt] Reading from /dev/ulpt can break work of a UHCI o usb/94384 usb [panic] kernel panic with usb2 hardware o usb/93872 usb [cam] [patch] SCSI quirk required for ELTA 8061 OL USB o usb/93828 usb [ohci] [panic] ohci causes panic on boot (HP Pavillion o usb/93389 usb [umass] [patch] Digital Camera Pentax S60 don't work o usb/93155 usb [ulpt] /dev/ulpt0: device busy, USB printer does not w o usb/92852 usb [ums] [patch] Vertical scroll not working properly on o usb/92171 usb [panic] panic unplugging Vodafone Mobile Connect (UMTS o usb/92142 usb [uhub] SET_ADDR_FAILED and SHORT_XFER errors from usb o usb/92083 usb [ural] [panic] panic using WPA on ural NIC in 6.0-RELE o usb/92052 usb [ulpt] usbd causes defunct process with busy file-hand o usb/91906 usb [ehci] [hang] FreeBSD hangs while booting with USB leg o usb/91896 usb camcontrol(8): Serial Number of USB Memory Sticks is n o usb/91811 usb [umass] Compact Flash in HP Photosmart 2610 return " o usb/91629 usb [usb] usbd_abort_pipe() may result in infinite loop o usb/91546 usb [umodem] [patch] Nokia 6630 mobile phone does not work o usb/91538 usb [ulpt] [patch] Unable to print to EPSON CX3500 o usb/91283 usb [boot] [regression] booting very slow with usb devices o usb/91238 usb [umass] USB tape unit fails to write a second tape fil o usb/90700 usb [umass] [panic] Kernel panic on connect/mount/use umas o usb/89954 usb [umass] [panic] USB Disk driver race condition? s usb/89003 usb [request] LaCie Firewire drive not properly supported o usb/88743 usb [hang] [regression] USB makes kernel hang at boot (reg o usb/88408 usb [axe] axe0 read PHY failed o usb/87648 usb [mouse] Logitech USB-optical mouse problem. o usb/87224 usb [usb] Cannot mount USB Zip750 o usb/86767 usb [umass] [patch] bogus "slice starts beyond end of the o usb/86298 usb [mouse] Known good USB mouse won't work with correct s s usb/85067 usb [uscanner] Cannot attach ScanJet 4300C to usb device f usb/84750 usb [hang] 6-BETA2 reboot/shutdown with root_fs on externa s usb/84336 usb [usb] [reboot] instant system reboot when unmounting a o usb/84326 usb [umass] Panic trying to connect SCSI tape drive via US o usb/83977 usb [ucom] [panic] ucom1: open bulk out error (addr 2): IN o usb/83863 usb [ugen] Communication problem between opensc/openct via o usb/83756 usb [ums] [patch] Microsoft Intellimouse Explorer 4.0A doe o usb/83563 usb [umass] [panic] Page Fault while detaching Mpman Usb d o usb/83504 usb [kernel] [patch] SpeedTouch USB stop working on recent o usb/82660 usb [ehci] [panic] EHCI: I/O stuck in state 'physrd'/panic s usb/82569 usb [umass] [panic] USB mass storage plug/unplug causes sy o usb/82520 usb [udbp] [reboot] Reboot when USL101 connected o usb/82350 usb [ucom] [panic] null pointer dereference in USB stack o usb/81621 usb [ehci] [hang] external hd hangs under load on ehci o usb/80935 usb [uvisor] [patch] uvisor.c is not work with CLIE TH55. o usb/80862 usb [patch] USB locking issues: missing some Giant calls o usb/80854 usb [patch] [request] suggestion for new iface-no-probe me o usb/80829 usb [modules] [panic] possible panic when loading USB-modu s usb/80777 usb [request] usb_rem_task() should wait for callback to c s usb/80776 usb [udav] [request] UDAV device driver shouldn't use usb_ o usb/80774 usb [patch] have "usbd_find_desc" in line with the other " o usb/80361 usb [umass] [patch] mounting of Dell usb-stick fails o usb/80040 usb [sound] [hang] Use of sound mixer causes system freeze o usb/79723 usb [usb] [request] prepare for high speed isochronous tra o usb/79722 usb [ehci] wrong alignments in ehci.h a usb/79656 usb [ehci] RHSC interrupts lost o usb/79524 usb [ulpt] printing to Minolta PagePro 1[23]xxW via USB fa o usb/79287 usb [uhci] [hang] UHCI hang after interrupt transfer o usb/79269 usb [ohci] USB ohci da0 plug/unplug causes crashes and loc o usb/78984 usb [umass] [patch] Creative MUVO umass failure o usb/77294 usb [ucom] [panic] ucom + ulpcom panic o usb/77184 usb [umass] [panic] kernel panic on USB device disconnect, o usb/76732 usb [ums] Mouse problems with USB KVM Switch o usb/76653 usb [umass] [patch] Problem with Asahi Optical usb device o usb/76461 usb [umass] disklabel of umass(4)-CAM(4)-da(4) not used by o usb/76395 usb [uhci] USB printer does not work, usbdevs says "addr 0 s usb/75928 usb [umass] [request] Cytronix SmartMedia card (SMC) reade o usb/75800 usb [ucom] ucom1: init failed STALLED error in time of syn o usb/75797 usb [sound] [regression] 5.3-STABLE(2005 1/4) detect USB h o usb/75764 usb [umass] [patch] "umass0: Phase Error" - no device for o usb/75705 usb [umass] [panic] da0 attach / Optio S4 (with backtrace) o usb/74771 usb [umass] [hang] mounting write-protected umass device a s usb/74453 usb [umass] [patch] Q-lity CD-RW USB ECW-043 (ScanLogic SL o usb/74211 usb [umass] USB flash drive causes CAM status 0x4 on 4.10R o usb/73307 usb [panic] Kernel panics on USB disconnect s usb/72733 usb [ucom] [request] Kyocera 7135 Palm OS connection probl o usb/71455 usb [umass] Slow USB umass performance of 5.3 o usb/71417 usb [ugen] Cryptoflex e-gate USB token (ugen0) communicati o usb/71416 usb [ugen] Cryptoflex e-gate USB token (ugen0) detach is n o usb/71280 usb [aue] aue0 device (linksys usb100tx) doesn't work in 1 o usb/71155 usb [ulpt] misbehaving usb-printer hangs processes, causes o usb/70523 usb [umct] [patch] umct sending/receiving wrong characters o usb/69006 usb [usbdevs] [patch] Apple Cinema Display hangs USB ports o usb/68232 usb [ugen] [patch] ugen(4) isochronous handling correction o usb/67301 usb [uftdi] [panic] RTS and system panic o usb/66547 usb [ucom] Palm Tungsten T USB does not initialize correct o usb/63621 usb [umass] [panic] USB MemoryStick Reader stalls/crashes s usb/62257 usb [umass] [request] card reader UCR-61S2B is only half-s o usb/59698 usb [keyboard] [patch] Rework of ukbd HID to AT code trans s bin/57255 usb [patch] usbd(8) and multi-function devices s usb/52026 usb [usb] [request] umass driver support for InSystem ISD2 s usb/51958 usb [urio] [patch] update for urio driver o i386/46371 usb USB controller cannot be initialized on IBM Netfinity o usb/40948 usb [umass] [request] USB HP CDW8200 does not work o usb/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem 326 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Jul 27 19:40:02 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64D331065670; Mon, 27 Jul 2009 19:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3E6CF8FC0A; Mon, 27 Jul 2009 19:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6RJe2cd014036; Mon, 27 Jul 2009 19:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6RJe1on014035; Mon, 27 Jul 2009 19:40:01 GMT (envelope-from gnats) Resent-Date: Mon, 27 Jul 2009 19:40:01 GMT Resent-Message-Id: <200907271940.n6RJe1on014035@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@freebsd.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Cc: thompsa@freebsd.org, hselasky@c2i.net, alfred@freebsd.org Resent-Reply-To: FreeBSD-gnats-submit@freebsd.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 185E2106566B for ; Mon, 27 Jul 2009 19:36:32 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 657158FC08 for ; Mon, 27 Jul 2009 19:36:31 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from phoenix.codelabs.ru (ppp85-141-160-233.pppoe.mtu-net.ru [85.141.160.233]) by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256) id 1MVVzq-000N84-2A for FreeBSD-gnats-submit@freebsd.org; Mon, 27 Jul 2009 23:36:30 +0400 Message-Id: <20090727193629.BF055B8090@phoenix.codelabs.ru> Date: Mon, 27 Jul 2009 23:36:29 +0400 (MSD) From: Eygene Ryabinkin To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: thompsa@freebsd.org, hselasky@c2i.net, alfred@freebsd.org Cc: Subject: usb/137188: [usb][patch] correctly handle USB report descriptors with interleaved report IDs X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 19:40:02 -0000 >Number: 137188 >Category: usb >Synopsis: [usb][patch] correctly handle USB report descriptors with interleaved report IDs >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 27 19:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Eygene Ryabinkin >Release: FreeBSD 8.0-BETA2 amd64 >Organization: Code Labs >Environment: System: FreeBSD 8.0-BETA2 amd64 >Description: Some devices can have interleaved report IDs. For example, when vendor groups some items inside logical collections and these items come from various report IDs, they will be interleaved. Current code sets item position to zero everytime when new report ID is encountered. Such behaviour isn't enforced by the HID specification (at least I hadn't found such place in the HID spec v 1.11), so I take that interleaved IDs are OK and the code should be changed to handle these devices. >How-To-Repeat: One can reproduce this with, for example, Microsoft Wireless Laser Mouse 5000: it has Z-axis and tilt axis output items grouped with their feature items that control sensitivity. HID descriptor for this mouse can be found in the supplied patch. For me, without the below patch Z-axis is reported to be at offset 0, so button clicks produce extra wheel movements that are translated to scrolls under Xorg. And that's very funny when click produces scrolls -- it reminds me old game with the hiding mouse pointer under WFWG 3.11. >Fix: The following patch adds the ability to save current item positions when new report ID is encountered. It fixes both kernel parser and libusbhid one. Patches are generally the same, modulo differences between kernel- and user-side needs. --- correctly-handle-interleaved-report-IDs.patch begins here --- begin 644 0001-HID-correctly-handle-interleaved-report-IDs-inside-t.patch M1G)O;2`W-#=C-36=E;F4@4GEA8FEN M:VEN(#QR96$M9F)S9$!C;V1E;&%B2!H86YD;&4@:6YT97)L96%V960@#$I6T-O;G-U;65R*#!X8RE="D-/3$Q%0U1)3TX@07!P;&EC871I M;VXH,2D*("!54T%'12!004=%($=E;F5R:6,@1&5S:W1O<"@P>#$I"B`@55-! M1T4@36]U&,I"B`@("!54T%'12!!0R!086XH,'@R,S@I6T-O;G-U M;65R*#!X8RE="B`@("!215!/4E0@0T]53E0@,0H@("`@4D503U)4(%-)6D4@ M.`H@("`@3$]'24-!3"!-24Y)355-("TQ,C<*("`@($Q/1TE#04P@34%824U5 M32`Q,C<*("`@($E.4%54("@@1&%T82!687)I86)L92!296QA=&EV92`I("@V M*0H@("`@4D503U)4($E$(#(P"B`@("!54T%'12!004=%($UI8W)O&9F,#`I"B`@("!54T%'12!5;FMN;W=N(%5S86=E*#!X9F4P,2E;36EC&9E,#(I6TUI8W)O&9F,#`I70H@("`@55-!1T4@56YK M;F]W;B!5&9E,#`I6TUI8W)O&9F,#`I70H@("`@4D50 M3U)4($-/54Y4(#(*("`@(%)%4$]25"!325I%(#$*("`@($Q/1TE#04P@34%8 M24U532`Q"B`@("!)3E!55"`H($1A=&$@5F%R:6%B;&4@06)S;VQU=&4@*2`H M,BD*("`@(%5304=%(%5N:VYO=VX@57-A9V4H,'AF9C`S*5M-:6-R;W-O9G0H M,'AF9C`P*5T*("`@(%)%4$]25"!#3U5.5"`Q"B`@("!215!/4E0@4TE:12`R M"B`@("!,3T=)0T%,($U!6$E-54T@,PH@("`@24Y0550@*"!$871A(%9A#(I6T=E;F5R:6,@1&5S:W1O<"@P>#$I70H@($-/3$Q%0U1)3TX@3&]G M:6-A;"@R*0H@("`@4D503U)4($E$(#$W"B`@("!54T%'12!0;VEN=&5R*#!X M,2E;1V5N97)I8R!$97-K=&]P*#!X,2E="B`@("!#3TQ,14-424].(%!H>7-I M8V%L*#`I"B`@("`@(%5304=%(%!!1T4@0G5T=&]N*#!X.2D*("`@("`@55-! M1T4@34E.24U532!"=71T;VXQ*#$I"B`@("`@(%5304=%($U!6$E-54T@0G5T M=&]N-2@U*0H@("`@("!215!/4E0@0T]53E0@-0H@("`@("!215!/4E0@4TE: M12`Q"B`@("`@($Q/1TE#04P@34%824U532`Q"B`@("`@($E.4%54("@@1&%T M82!687)I86)L92!!8G-O;'5T92`I("@R*0H@("`@("!215!/4E0@4TE:12`S M"B`@("`@(%)%4$]25"!#3U5.5"`Q"B`@("`@($E.4%54("@@0V]N#$I70H@("`@("!54T%'12!9*#!X,S$I6T=E;F5R:6,@1&5S:W1O<"@P M>#$I70H@("`@("!215!/4E0@0T]53E0@,@H@("`@("!215!/4E0@4TE:12`X M"B`@("`@($Q/1TE#04P@34E.24U532`M,3(W"B`@("`@($Q/1TE#04P@34%8 M24U532`Q,C<*("`@("`@24Y0550@*"!$871A(%9A#0X*5M'96YE&,I"B`@("`@("`@3$]'24-!3"!-24Y)355-("TQ,C<* M("`@("`@("!,3T=)0T%,($U!6$E-54T@,3(W"B`@("`@("`@4D503U)4(%-) M6D4@.`H@("`@("`@(%5304=%($%#(%!A;B@P>#(S."E;0V]N&1U;7!="C`P,#`@ M,#4@,$,@,#D@,#$@03$@,#$@,#4@,#$@,#D@,#(@03$@,#(@.#4@,3,@,#4@ M,$,*,#`Q,"`P02`S."`P,B`Y-2`P,2`W-2`P."`Q-2`X,2`R-2`W1B`X,2`P M-B`X-2`Q-"`P-@HP,#(P(#`P($9&(#!!(#`Q($9%(#2!P;&%C960@=&\@=&AE(&]F9G-E M="`P+"!M86MI;F<*'1E;F1E M9"!I;B!T:&4@7=H97)E+@H*4VEG;F5D+6]F9BUB>3H@ M17EG96YE(%)Y86)I;FMI;B`\7,O9&5V+W5S M8B]U"`S86)C,#,V M+BXP,#)A,F0V(#$P,#8T-`HM+2T@82]L:6(O;&EB=7-B:&ED+W!A7,O=&EM92YH/@HK M(VEN8VQU9&4@/'-Y2D@>R!R971U"`\('D@/R!X(#H@>3L@ M?0H@"B!S=&%T:6,@:6YT(&AI9%]G971?:71E;5]R872!E>&ES="P@<&]S:71I;VYS(&%R92!R97-T;W)E9#L* M*R`J("T@:68@<&]S:71I;VYS(&9O2!O;FQY($5.3TU%32!C86X@8F4@ MPHK M"0D):&0M/FMP7V-U65T+B`@0W)E871E M(&YE=R!S;&]T(&9O2AH9"T^:W!?8W5R+3YK:6YD<&]S+"!H9"T^:VEN9'!OPI`0"`M,3`P M+#$W("LQ.3$L,C<@0$`@:&ED7W-T87)T7W!APH@"0EH:61?:71E;5]T("IH M:2`](',M/F-U'0@/2!H:3L*(`E]"BL**PE33$E35%]&3U)%04-(7U-! M1D4H8W5R+"`FPHK"0E33$E3 M5%]214U/5D4H)G,M/FMP7VQIPHK"0D)+RH* M*PD)"2`J(%-A=F4@8W5RPHK M"7-TF4@9F]R(&%L;"!) M1',L('=E('-H;W5L9"!S=6T@=&AE('9A;'5EPHK"0ES:7IE(#T@,#L**PD)4TQ)4U1?1D]214%#2"AC=7(L("9D+3YK M<%]L:7-T+"!N97AT*0HK"0D)F4@/2`H*'-I>F4@*R`W*2`^ M/B`S*3L**PE]"B`):&ED7V5N9%]P87)S92AD*3L*+0ER971U7,O9&5V+W5S8B]U7,O9&5V+W5S8B]U"`J+PH@"75I;G0X7W0@;W5S86=E.PD)+RH@8W5RPHK"0E33$E35%]214U/5D4H)G,M/G!O71E*'-TF4I M"B!]"B`*("\J+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM*@HK("H):&ED M7W-W:71C:%]R:60**R`J"BL@*B!3879E2!S879E9"!A;F0**R`J(')EF5R;V5D+`HK M"2`J('-O(&%N>2!S=6)S97%U96YT(&QO;VMU<',@=VEL;"!G:79E('1H92!R M:6=H="!O9F9S970N"BL)("HO"BL):68@*"%S+3YC<&]S*2!["BL)"2\J($YE M=R!R97!OF4@86YD(&ENF5O9BAS+3YC<&]S6S!=*2P@ M35]414U0+`HK"0D@($U?5T%)5$]+('P@35]:15)/*3L**PD)'0I('L**PD):68@*&-U'0I.PHK"7T**PHK"2IP;W,@/2!S+3YC<&]S M+3YP;W,["BL)Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Mon Jul 27 19:50:04 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4798E106567D; Mon, 27 Jul 2009 19:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2045E8FC2E; Mon, 27 Jul 2009 19:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6RJo3Cd021174; Mon, 27 Jul 2009 19:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6RJo3Po021172; Mon, 27 Jul 2009 19:50:03 GMT (envelope-from gnats) Resent-Date: Mon, 27 Jul 2009 19:50:03 GMT Resent-Message-Id: <200907271950.n6RJo3Po021172@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@freebsd.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Cc: thompsa@freebsd.org, alfred@freebsd.org, hselasky@c2i.net Resent-Reply-To: FreeBSD-gnats-submit@freebsd.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FAE71065677 for ; Mon, 27 Jul 2009 19:45:01 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 162BE8FC0A for ; Mon, 27 Jul 2009 19:45:01 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from phoenix.codelabs.ru (ppp85-141-160-233.pppoe.mtu-net.ru [85.141.160.233]) by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256) id 1MVW83-000O17-E8 for FreeBSD-gnats-submit@freebsd.org; Mon, 27 Jul 2009 23:45:00 +0400 Message-Id: <20090727194459.393CFB8090@phoenix.codelabs.ru> Date: Mon, 27 Jul 2009 23:44:59 +0400 (MSD) From: Eygene Ryabinkin To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: thompsa@freebsd.org, alfred@freebsd.org, hselasky@c2i.net Cc: Subject: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 19:50:04 -0000 >Number: 137189 >Category: usb >Synopsis: [usb][patch] create and use sysctl nodes for HID report descriptors >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 27 19:50:03 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Eygene Ryabinkin >Release: FreeBSD 8.0-BETA2 amd64 >Organization: Code Labs >Environment: System: FreeBSD 8.0-BETA2 amd64 >Description: usbhidctl in 8.x can dump report descriptors only from the uhid(4) devices. When, for example, ums(4) or ukbd(4) grab HID devices, there is no way to dump and decode their descriptors via usbhidctl. >How-To-Repeat: Run 'usbhidctl -f /dev/ums0 -d' and see how it will fail. >Fix: The following patch makes kernel-side changes: it introduces general framework to create opaque sysctl nodes 'dev...hiddesc' that are exporting HID descriptor to the userspace. --- 0003-UHID-implement-new-sysctl-node-hiddesc.patch begins here --- begin 644 0003-UHID-implement-new-sysctl-node-hiddesc.patch M1G)O;2`S-3,R931F-3EC,#6=E;F4@4GEA8FEN M:VEN(#QR96$M9F)S9$!C;V1E;&%B7-C=&PN"@I3:6=N960M;V9F+6)Y.B!% M>6=E;F4@4GEA8FEN:VEN(#QR96$M9F)S9$!C;V1E;&%B7,O9&5V+W5S8B]I;G!U="]U:&ED+F,@?"`@("`U("LK*RLK"B!S>7,O9&5V M+W5S8B]I;G!U="]U:V)D+F,@?"`@(#,T("LK*RLK*RLK*RLK*RLK*RLK*RLK M*RLK*RTM+2TM+2TM+2T*('-Y7,O9&5V+W5S8B]I;G!U="]U M:&ED+F,@8B]S>7,O9&5V+W5S8B]I;G!U="]U:&ED+F,*:6YD97@@-#$Q865B M-BXN,C0S,C0Y,2`Q,#`V-#0*+2TM(&$OF4I.PHK"B`)"`R.34T-F$U+BYC,F,Y9F%C M(#$P,#8T-`HM+2T@82]S>7,O9&5V+W5S8B]I;G!U="]U:V)D+F,**RLK(&(O MPH@"75I;G0X7W0)#`Q"D!`("TW,C8L,3$@*S#`P,#,I+`H@"0D)("`@(&AI9%]I;G!U M="P@,"P@)G-C+3YS8U]L;V-?87!P;&5?9FXL("9F;&%GF4H:&ED7W!T71E(&9OF4H:&ED7W!TF4L"BL)"2`@("!H:61?;W5T<'5T+"`F7-C=&Q?:&%N9&QEF4I.PHK"B`) M+RH@;&]C:R!K97EB;V%R9"!M=71E>"`J+PH@"B`);71X7VQO8VLH)D=I86YT M*3L*0$`@+3@U-RPV("LX-C8L."!`0"!U:V)D7V%T=&%C:"AD979I8V5?="!D M978I"B`*(&1E=&%C:#H*(`EU:V)D7V1E=&%C:"AD978I.PHK"6EF("AS8RT^ M:&ED7W)D97-C*0HK"0EF%]I;FET*"9S8RT^"D["B`*(`EI9B`H97)R*2!["BL)"7-C+3YH M:61?F4@/2!H:61?F4H9%]P='(L(&1? M;&5N+"!H:61?:6YP=70L("9S8RT^PHM"0D)=6US7VAI9%]P M87)S92AS8RP@9&5V+"!D7W!TF4L(&DI.PH@"0E]"B`)?0H@"D!`("TU-C&9E2@F M"D["B`**PEI9B`H7,O9&5V+W5S8B]U7,O9&5V M+W5S8B]U"P*(`E]"B`)2!W86YT('-U8V@@7-C=&Q?:&%N M9&QEF4I"BM["BL):68@*&1E"AD978I+`HK M"2`@("!365-#5$Q?0TA)3$1214XH9&5V:6-E7V=E=%]S>7-C=&Q?=')E92AD M978I*2P**PD@("`@3TE$7T%55$\L(")H:61D97-C(BP@0U1,5%E015]35%)) M3D=\0U1,1DQ!1U]21"P**PD@("`@9&5S8RP@*&EN="ES:7IE+"!H:61?7-C=&Q?:&%N9&QE MF5?="!S:7IE*3L*("-E M;F1I9@D)"0D)+RH@7TM%4DY%3"`J+PH@(V5N9&EF"0D)"0DO*B!?55-"7TA) 51%](7R`J+PHM+2`*,2XV+C,N,0H* ` end --- 0003-UHID-implement-new-sysctl-node-hiddesc.patch ends here --- This patch handles user-level stuff: libusbhid is extended with the new function that obtains HID report descriptor from all available places (currently, from the sysctl and iocal calls). usbhidctl is modified to use this new API function. --- 0004-libusbhid-use-new-sysctl-node-hiddesc-to-get-HID-des.patch begins here --- begin 644 0004-libusbhid-use-new-sysctl-node-hiddesc-to-get-HID-des.patch M1G)O;2`X96(V-F4V.#9B,C1B-V1F9&8S831C83$W-38U,34U,&,V93EF,F%F M($UO;B!397`@,3<@,#`Z,#`Z,#`@,C`P,0I&6=E;F4@4GEA8FEN M:VEN(#QR96$M9F)S9$!C;V1E;&%B3H@17EG96YE(%)Y86)I;FMI;B`\7,O9&5V+W5S8B]U M7!E7-C=&PN:#X*(`H@ M(VEN8VQU9&4@/&%S7!E+F@^"B`C:6YC M;'5D92`\97)R;F\N:#X**R-I;F-L=61E(#QF8VYT;"YH/@H@(VEN8VQU9&4@ M/'-T9&QI8BYH/@H@(VEN8VQU9&4@/'-TPHK"2\J(&-H96-K M('-I>F4@*B\**PEI9B`H;&5N(#T](#`I"BL)"7)E='5R;B`P.PHK"BL)+RH@ M8VAE8VL@14Y$7T-/3$Q%0U1)3TX@*B\**PEI9B`H*&1A=&$I6VQE;B`M(#%= M("$](#!X0S`I"BL)"7)E='5R;B`P.PHK"BL)F5?="!S>7-C=&Q?;G-I>F4L(&DL(&H["BL):6YT('-E M96Y?9&EG:70["BL**PES;&%S:"`]('-T7-C=&Q?;G-I M>F4@/0HK"2`@("!S:7IE;V8H(F1E=BXB*2`K('-T7-C=&Q?;F%M92D**PD)0HK("H@ M=7-E9"!M96-H86YIPHK"79O:60@*F1E7-C M=&Q?;F]D92`](%]H:61?9&5V;F%M95]T;U]S>7-C=&Q?;F%M92AD978I.PHK M"6EF("AS>7-C=&Q?;F]D92`]/2!.54Q,*0HK"0EG;W1O(&)A9#L**PHK"2\J M($1E=&5R;6EN92!T:&4@7-C=&Q?;F]D92P@9&5S8U]D871A M+"`F9&5S8U]S:7IE+"!.54Q,+"`P*3L**PEI9B`H97)R*0HK"0EG;W1O(&)A M9#L**PHK"69R964H&QE;B`](#8U-3,U.PHK"75G9"YU9V1?;6%X;&5N(#T@ M54=$7TU!6%-)6D4["B`):68@*&EO8W1L*&9D+"!54T)?1T547U)%4$]25%]$ M15-#+"`F=6=D*2`\(#`I('L*("-I9F1E9B!(241?0T]-4$%4-PH@"0DO*B!C M;W5L9"!N;W0@PHM"0DO*B!I;G9A;&ED(&5N9"!B>71E("HO"BL) M+RH@0VAE8VL@9&5S8W)I<'1O2`J+PHK"6EF("@A7VES7W9A M;&ED7VAI9%]D97-C*&1A=&$L('5G9"YU9V1?86-T;&5N*2D@>PH@"0EF2!C86QL:6YG"B!W:71H(&$@9FEL92!D97-C2UQ=6%L M:69I960@<&%T:"!T;R!T:&4@9&5V:6-E.R!T:&ES(&9U;F-T:6]N(&%L;&]W M6EN9PHK;V8@=&AE(')E<&]R="!D97-C"!B.#7,O9&5V+W5S M8B]U"!F.3`Q.&4R+BXQ861A-C7,O9&5V+W5S8B]U7,O9&5V+W5S M8B]UPH@"75I;G0X7W0)=6%I7V%L=%]I;F1E>#L*('T["B`* M*R\J($UA>&EM86P@=F%L=64@;V8@=&AE('9AVUA>&QE M;BP@86-T;&5N+"!O9F9S971]+B`J+PHK(V1E9FEN90E51T1?34%84TE:10DV M-34S-0HK"B!S=')U8W0@=7-B7V=E;E]D97-C"`T.#4T,3AF+BXU93`T,34U(#$P,#8T-`HM M+2T@82]URelease-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Mon Jul 27 20:00:11 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64FF01065676; Mon, 27 Jul 2009 20:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2338FC1D; Mon, 27 Jul 2009 20:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6RK0BJa028253; Mon, 27 Jul 2009 20:00:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6RK0Bd4028252; Mon, 27 Jul 2009 20:00:11 GMT (envelope-from gnats) Resent-Date: Mon, 27 Jul 2009 20:00:11 GMT Resent-Message-Id: <200907272000.n6RK0Bd4028252@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@freebsd.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Cc: thompsa@freebsd.org, alfred@freebsd.org, hselasky@c2i.net Resent-Reply-To: FreeBSD-gnats-submit@freebsd.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1CD2106566C for ; Mon, 27 Jul 2009 19:58:48 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 8411D8FC0C for ; Mon, 27 Jul 2009 19:58:48 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from phoenix.codelabs.ru (ppp85-141-160-233.pppoe.mtu-net.ru [85.141.160.233]) by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256) id 1MVWLP-000PrN-5c for FreeBSD-gnats-submit@freebsd.org; Mon, 27 Jul 2009 23:58:47 +0400 Message-Id: <20090727195803.573AAB8090@phoenix.codelabs.ru> Date: Mon, 27 Jul 2009 23:58:03 +0400 (MSD) From: Eygene Ryabinkin To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: thompsa@freebsd.org, alfred@freebsd.org, hselasky@c2i.net Cc: Subject: usb/137190: [usb][patch] inhibit spurious button releases for some complex mices X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 20:00:11 -0000 >Number: 137190 >Category: usb >Synopsis: [usb][patch] inhibit spurious button releases for some complex mices >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 27 20:00:10 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Eygene Ryabinkin >Release: FreeBSD 8.0-BETA2 amd64 >Organization: Code Labs >Environment: System: FreeBSD 8.0-BETA2 amd64 >Description: My Microsoft Wireless Laser Mouse 5000 shows weird behaviour when I do press some button and trying to select the text inside the terminal moving the pointer: looks like extra button press/release events are generated. Running 'xev' I see such events in the utility's output. >How-To-Repeat: Get the mentioned mice and try to select some text in the terminal: you'll likely won't be able to select everything you want. >Fix: The problem is that this mice is "complex": it has other output descriptors whose output also goes to the ums(4) driver. It produces no data that will be consumed by the driver, but due to the logics of the callback function, variable 'buttons' will be different from the initial softc's button state of some button was physically pressed when this "foreign" data comes. The following patch makes ums(4) to be resistant to such callback input. --- 0007-ums-avoid-spurious-button-releases-for-complex-mices.patch begins here --- begin 644 0007-ums-avoid-spurious-button-releases-for-complex-mices.patch M1G)O;2`U,#8S9F1F-F,Y-&4P8C0Q-#4W8V8Y-C!C-F8S86)A9#$R9#@S.30X M($UO;B!397`@,3<@,#`Z,#`Z,#`@,C`P,0I&6=E;F4@4GEA8FEN M:VEN(#QR96$M9F)S9$!C;V1E;&%B"!M M:6-EF5D(&)Y('5M2!Z M97)O(&]U="!B=71T;VX*F5R;R!A="!T:&4@8F5G:6YN:6YG(&]F('1H92!H86YD;&5R"F%N M9"!S;V9T8R!D871A(&ES(&UO9&EF:65D(&EF('1H92!B=71T;VX@2!H96QD('=I;&P@<')O9'5C90IE>'1R82!M M;W5S92!P3H@17EG96YE(%)Y86)I;FMI;B`\"DI"BL)"6EF("@H:6YF;RT^"`K/2!H:61?9V5T7V1A=&$H8G5F+"!L96XL("9I M;F9O+3YS8U]L;V-?>"D["BL)"0EG;W1?;6EN95]D871A*RL["BL)"7T*(`H@ M"0EI9B`H*&EN9F\M/G-C7V9L86=S("8@54U37T9,04=?65]!6$E3*2`F)@HM M"0D@("`@*&ED(#T](&EN9F\M/G-C7VEI9%]Y*2D**PD)("`@("AI9"`]/2!I M;F9O+3YS8U]I:61?>2DI('L*(`D)"61Y(#T@+6AI9%]G971?9&%T82AB=68L M(&QE;BP@)FEN9F\M/G-C7VQO8U]Y*3L**PD)"6=O=%]M:6YE7V1A=&$K*SL* M*PD)?0H@"B`)"6EF("@H:6YF;RT^B`M/2!T96UP.PHK"0D)9V]T7VUI;F5?9&%T82LK.PH@"0E]"B`* M(`D):68@*"AI;F9O+3YS8U]F;&%G"!\?"!D>2!\?"!D>B!\?"!D="!\?"!D=R!\?`HM"0D@("`@*&)U M='1O;G,@(3T@"!\?"!D>2!\?"!D>B!\?"!D="!\?"!D=R!\?`HK M"0D@("`@*&)U='1O;G,@(3T@PH@ M"B`)"0E$4%))3E1&3B@V+"`B>#HE9"!Y.B5D('HZ)60@=#HE9"!W.B5D(&)U M='1O;G,Z,'@E,#AX7&XB+`H@"0D)("`@(&1X+"!D>2P@9'HL(&1T+"!D=RP@ 78G5T=&]NRelease-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Mon Jul 27 20:10:03 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57A23106566B for ; Mon, 27 Jul 2009 20:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3AA2F8FC1D for ; Mon, 27 Jul 2009 20:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6RKA3g1035208 for ; Mon, 27 Jul 2009 20:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6RKA3S3035207; Mon, 27 Jul 2009 20:10:03 GMT (envelope-from gnats) Date: Mon, 27 Jul 2009 20:10:03 GMT Message-Id: <200907272010.n6RKA3S3035207@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Eygene Ryabinkin Cc: Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 20:10:03 -0000 The following reply was made to PR usb/137189; it has been noted by GNATS. From: Eygene Ryabinkin To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Cc: Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors Date: Tue, 28 Jul 2009 00:01:28 +0400 I forgot to add another patch that enabled usbhidctl to parse all report IDs and not just report ID zero. --- 0005-usbhidctl-dump-report-descriptor-for-all-IDs.patch begins here --- begin 600 0005-usbhidctl-dump-report-descriptor-for-all-IDs.patch M1G)O;2!E9C`U-&,Y-65B8C1B-&0W86%F8S6=E;F4@4GEA8FEN M:VEN(#QR96$M9F)S9$!C;V1E;&%BF5S(&%R92!A;'-O(&-A M;&-U;&%T960@9F]R(&%L;"!R97!O3H@17EG96YE(%)Y86)I;FMI;B`\"`U93`T,34U+BXX-&,V.30P(#$P,#8T-`HM+2T@82]UF4@/2!H:61?F4HF4@)60@8GET97-< M;B(L('-I>F4I.PH@"BT)71EF4@)60@8GET97-<;B(L('-I>F4I.PH@?0H@"BTM(`HQ (+C8N,RXQ"@H` ` end --- 0005-usbhidctl-dump-report-descriptor-for-all-IDs.patch ends here --- -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # From owner-freebsd-usb@FreeBSD.ORG Mon Jul 27 20:10:03 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB5401065679; Mon, 27 Jul 2009 20:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 947978FC21; Mon, 27 Jul 2009 20:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6RKA38R035239; Mon, 27 Jul 2009 20:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6RKA3Bk035238; Mon, 27 Jul 2009 20:10:03 GMT (envelope-from gnats) Resent-Date: Mon, 27 Jul 2009 20:10:03 GMT Resent-Message-Id: <200907272010.n6RKA3Bk035238@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@freebsd.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Cc: thompsa@freebsd.org, alfred@freebsd.org, hselasky@c2i.net Resent-Reply-To: FreeBSD-gnats-submit@freebsd.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26AAD1065674 for ; Mon, 27 Jul 2009 20:04:05 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id D25D68FC0C for ; Mon, 27 Jul 2009 20:04:04 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from phoenix.codelabs.ru (ppp85-141-160-233.pppoe.mtu-net.ru [85.141.160.233]) by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256) id 1MVWQV-0000To-BP for FreeBSD-gnats-submit@freebsd.org; Tue, 28 Jul 2009 00:04:03 +0400 Message-Id: <20090727195109.E4574B8079@phoenix.codelabs.ru> Date: Mon, 27 Jul 2009 23:51:09 +0400 (MSD) From: Eygene Ryabinkin To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: thompsa@freebsd.org, alfred@freebsd.org, hselasky@c2i.net Cc: Subject: usb/137191: [usb][patch] export ums(4) output report parser data to the userspace X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 20:10:04 -0000 >Number: 137191 >Category: usb >Synopsis: [usb][patch] export ums(4) output report parser data to the userspace >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 27 20:10:03 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Eygene Ryabinkin >Release: FreeBSD 8.0-BETA2 amd64 >Organization: Code Labs >Environment: System: FreeBSD 8.0-BETA2 amd64 >Description: It is sometimes useful to see how various mouse functions are recognized by the ums(4) driver. One can recompile the kernel with USB_DEBUG, but that's not always viable. Another way to proceed is to create sysctl node that will show parser's data. >How-To-Repeat: Try to understand how bits in the output report descriptors are mapped to the buttons and mouse movements by the ums(4) driver with the stock FreeBSD kernel. >Fix: The following patch adds sysctl named 'dev.ums..parseinfo' that dumps parser internal state in the human-readable form. --- 0006-ums-4-add-sysctl-node-to-give-away-mouse-report-pars.patch begins here --- begin 644 0006-ums-4-add-sysctl-node-to-give-away-mouse-report-pars.patch M1G)O;2`T.#`V9C6=E;F4@4GEA8FEN M:VEN(#QR96$M9F)S9$!C;V1E;&%B7-C=&P@;F]D92!T;R!G:79E(&%W87D@;6]U&%M<&QE+`IW:&5N('5S97(@3H@17EG96YE(%)Y86)I;FMI;B`\ M7,O9&5V+W5S8B]I;G!U="]U;7,N8PII;F1E M>"!F-C,W86,Q+BXR,&)C9#,S(#$P,#8T-`HM+2T@82]S>7,O9&5V+W5S8B]I M;G!U="]U;7,N8PHK*RL@8B]S>7,O9&5V+W5S8B]I;G!U="]U;7,N8PI`0"`M M-C,L-B`K-C,L-R!`0"!?7T9"4T1)1"@B)$9R965"4T0D(BD["B`C:6YC;'5D M92`\7,O8V]N9BYH/@H@(VEN8VQU M9&4@/'-Y7-C=&Q?8W1X*&1E=BDL"BL) M("`@(%-94T-43%]#2$E,1%)%3BAD979I8V5?9V5T7W-Y7-C=&P@:&%N9&QEPHK M"0EI;F9O(#T@)G-C+3YS8U]I;F9O6VE=.PHK"BL)"2\J($1O;B=T(&5M:70@ M96UP='D@:6YF;R`J+PHK"0EI9B`H*&EN9F\M/G-C7V9L86=S("8**PD)("`@ M("A535-?1DQ!1U]87T%825,@?"!535-?1DQ!1U]97T%825,@?"!535-?1DQ! M1U]:7T%825,@?`HK"0D@("`@(%5-4U]&3$%'7U1?05A)4R!\(%5-4U]&3$%' M7U=?05A)4RDI(#T](#`@)B8**PD)("`@(&EN9F\M/G-C7V)U='1O;G,@/3T@ M,"D**PD)"6-O;G1I;G5E.PHK"BL)"7-B=69?<')I;G1F*'-B+"`B:25D.B(L M(&D@*R`Q*3L**PD):68@*"AI;F9O+3YS8U]F;&%GF4I.PHK"0EI9B`H*&EN9F\M/G-C7V9L86=S("8@54U37T9,04=? M6E]!6$E3*2D**PD)"7-B=69?<')I;G1F*'-B+"`B(%HZF4I.PHK"BL)"69ORelease-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Mon Jul 27 20:17:21 2009 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 317E310656A9 for ; Mon, 27 Jul 2009 20:17:21 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id D9B768FC20 for ; Mon, 27 Jul 2009 20:17:20 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=OQd8XaUp6koymSmmmBqQ65lMsLxhOnqP+M0YeSPKjyka6+znqcnbNa4b/qG/4RUKWZSdNyEMPxlZ9Etf4SFdR8DawKUkwj9bbmvJCKBkOGNO67snasBisxMFoXdIa1ZVd1TOHEUd2MxKd1U9/niCG8Ga3cFj7WsfHFk1tLKWg/4=; Received: from phoenix.codelabs.ru (ppp85-141-160-233.pppoe.mtu-net.ru [85.141.160.233]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1MVWO3-0000CE-9q; Tue, 28 Jul 2009 00:01:31 +0400 Date: Tue, 28 Jul 2009 00:01:28 +0400 From: Eygene Ryabinkin To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Message-ID: <8RwwU1KLz1ezvFiU9HsY6uoNfkU@nflB3XSqYRRHWdyVHMOFGnCK5Pk> References: <20090727194459.393CFB8090@phoenix.codelabs.ru> <200907271950.n6RJo3jj021164@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200907271950.n6RJo3jj021164@freefall.freebsd.org> Sender: rea-fbsd@codelabs.ru Cc: Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 20:17:21 -0000 I forgot to add another patch that enabled usbhidctl to parse all report IDs and not just report ID zero. --- 0005-usbhidctl-dump-report-descriptor-for-all-IDs.patch begins here --- begin 600 0005-usbhidctl-dump-report-descriptor-for-all-IDs.patch M1G)O;2!E9C`U-&,Y-65B8C1B-&0W86%F8S6=E;F4@4GEA8FEN M:VEN(#QR96$M9F)S9$!C;V1E;&%BF5S(&%R92!A;'-O(&-A M;&-U;&%T960@9F]R(&%L;"!R97!O3H@17EG96YE(%)Y86)I;FMI;B`\"`U93`T,34U+BXX-&,V.30P(#$P,#8T-`HM+2T@82]UF4@/2!H:61?F4HF4@)60@8GET97-< M;B(L('-I>F4I.PH@"BT)71EF4@)60@8GET97-<;B(L('-I>F4I.PH@?0H@"BTM(`HQ (+C8N,RXQ"@H` ` end --- 0005-usbhidctl-dump-report-descriptor-for-all-IDs.patch ends here --- -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # From owner-freebsd-usb@FreeBSD.ORG Mon Jul 27 21:40:06 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64FEB106564A for ; Mon, 27 Jul 2009 21:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 533598FC1E for ; Mon, 27 Jul 2009 21:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6RLe603004616 for ; Mon, 27 Jul 2009 21:40:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6RLe6lH004615; Mon, 27 Jul 2009 21:40:06 GMT (envelope-from gnats) Date: Mon, 27 Jul 2009 21:40:06 GMT Message-Id: <200907272140.n6RLe6lH004615@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/137188: [usb][patch] correctly handle USB report descriptors with interleaved report IDs X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 21:40:06 -0000 The following reply was made to PR usb/137188; it has been noted by GNATS. From: Hans Petter Selasky To: Eygene Ryabinkin Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: usb/137188: [usb][patch] correctly handle USB report descriptors with interleaved report IDs Date: Mon, 27 Jul 2009 22:37:21 +0200 On Monday 27 July 2009 21:36:29 Eygene Ryabinkin wrote: > usb/137188 Hi, Kernel part committed. I removed the malloc() part from the initial patch, because it is simpler to not use malloc in this case. Is the following working for you: http://perforce.freebsd.org/chv.cgi?CH=166650 Second, can you port the kernel HID parser into libusbhid, because the kernel one is more advanced and handles more HID features than the userland one. When you are done, send a new patch. Thanks, --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Jul 27 21:50:04 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2D5310656B3 for ; Mon, 27 Jul 2009 21:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D0C618FC1C for ; Mon, 27 Jul 2009 21:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6RLo3uO011566 for ; Mon, 27 Jul 2009 21:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6RLo3TK011565; Mon, 27 Jul 2009 21:50:03 GMT (envelope-from gnats) Date: Mon, 27 Jul 2009 21:50:03 GMT Message-Id: <200907272150.n6RLo3TK011565@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 21:50:04 -0000 The following reply was made to PR usb/137189; it has been noted by GNATS. From: Hans Petter Selasky To: Eygene Ryabinkin Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors Date: Mon, 27 Jul 2009 22:41:38 +0200 On Monday 27 July 2009 21:44:59 Eygene Ryabinkin wrote: > >Number: 137189 > >Category: usb > >Synopsis: [usb][patch] create and use sysctl nodes for HID report > > descriptors Confidential: no > >Severity: non-critical > >Priority: medium > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Mon Jul 27 19:50:03 UTC 2009 > >Closed-Date: > >Last-Modified: > >Originator: Eygene Ryabinkin > >Release: FreeBSD 8.0-BETA2 amd64 > >Organization: > > Code Labs > > >Environment: > > System: FreeBSD 8.0-BETA2 amd64 > > >Description: > > usbhidctl in 8.x can dump report descriptors only from the uhid(4) > devices. When, for example, ums(4) or ukbd(4) grab HID devices, > there is no way to dump and decode their descriptors via usbhidctl. > > >How-To-Repeat: > > Run 'usbhidctl -f /dev/ums0 -d' and see how it will fail. > Hi, Can you change your patch, so that usbhidctl uses libusb to get the HID descriptor, instead of sysctl? 1) Locate all HID descriptors on a per interface basis: struct usb_hid_descriptor * hid_get_descriptor_from_usb(struct usb_config_descriptor *cd, struct usb_interface_descriptor *id) { struct usb_descriptor *desc = (void *)id; if (desc == NULL) { return (NULL); } while ((desc = usb_desc_foreach(cd, desc))) { if ((desc->bDescriptorType == UDESC_HID) && (desc->bLength >= USB_HID_DESCRIPTOR_SIZE(0))) { return (void *)desc; } if (desc->bDescriptorType == UDESC_INTERFACE) { break; } } return (NULL); } 2) Retrieve HID descriptor using control request: usb_error_t usbd_req_get_hid_desc(struct usb_device *udev, struct mtx *mtx, void **descp, uint16_t *sizep, struct malloc_type *mem, uint8_t iface_index) { struct usb_interface *iface = usbd_get_iface(udev, iface_index); struct usb_hid_descriptor *hid; usb_error_t err; if ((iface == NULL) || (iface->idesc == NULL)) { return (USB_ERR_INVAL); } hid = hid_get_descriptor_from_usb (usbd_get_config_descriptor(udev), iface->idesc); if (hid == NULL) { return (USB_ERR_IOERROR); } *sizep = UGETW(hid->descrs[0].wDescriptorLength); if (*sizep == 0) { return (USB_ERR_IOERROR); } if (mtx) mtx_unlock(mtx); *descp = malloc(*sizep, mem, M_ZERO | M_WAITOK); if (mtx) mtx_lock(mtx); if (*descp == NULL) { return (USB_ERR_NOMEM); } err = usbd_req_get_report_descriptor (udev, mtx, *descp, *sizep, iface_index); if (err) { free(*descp, mem); *descp = NULL; return (err); } return (USB_ERR_NORMAL_COMPLETION); } See kernel code in sys/dev/usb/ for reference and man libusb. --HPS --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Jul 27 21:50:06 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EF9A10656AE for ; Mon, 27 Jul 2009 21:50:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0CC5E8FC2D for ; Mon, 27 Jul 2009 21:50:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6RLo58h011579 for ; Mon, 27 Jul 2009 21:50:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6RLo5MF011578; Mon, 27 Jul 2009 21:50:05 GMT (envelope-from gnats) Date: Mon, 27 Jul 2009 21:50:05 GMT Message-Id: <200907272150.n6RLo5MF011578@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/137190: [usb][patch] inhibit spurious button releases for some complex mices X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 21:50:06 -0000 The following reply was made to PR usb/137190; it has been noted by GNATS. From: Hans Petter Selasky To: Eygene Ryabinkin Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: usb/137190: [usb][patch] inhibit spurious button releases for some complex mices Date: Mon, 27 Jul 2009 22:43:38 +0200 On Monday 27 July 2009 21:58:03 Eygene Ryabinkin wrote: > The problem is that this mice is "complex": it has other output descriptors > whose output also goes to the ums(4) driver. It produces no data that will > be consumed by the driver, but due to the logics of the callback function, > variable 'buttons' will be different from the initial softc's button state > of some button was physically pressed when this "foreign" data comes. > > The following patch makes ums(4) to be resistant to such callback input. For multi descriptor mouse devices, please try this patch and report back. http://perforce.freebsd.org/chv.cgi?CH=166592 http://perforce.freebsd.org/chv.cgi?CH=166590 Download the latest version from USB P4 and report back. --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Jul 28 11:10:57 2009 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 17E3E1065680 for ; Tue, 28 Jul 2009 11:10:57 +0000 (UTC) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (ns0.blackend.org [82.227.222.164]) by mx1.freebsd.org (Postfix) with ESMTP id 6B5598FC1C for ; Tue, 28 Jul 2009 11:10:55 +0000 (UTC) (envelope-from marc@blackend.org) Received: from gothic.blackend.org (gothic.blackend.org [192.168.1.203]) by abigail.blackend.org (8.13.4/8.13.3) with ESMTP id n6SBAqkG069780; Tue, 28 Jul 2009 13:10:52 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: from gothic.blackend.org (localhost [127.0.0.1]) by gothic.blackend.org (8.14.3/8.14.3) with ESMTP id n6SBBVkR001461; Tue, 28 Jul 2009 13:11:31 +0200 (CEST) (envelope-from marc@gothic.blackend.org) Received: (from marc@localhost) by gothic.blackend.org (8.14.3/8.14.3/Submit) id n6SBBVaV001460; Tue, 28 Jul 2009 13:11:31 +0200 (CEST) (envelope-from marc) Date: Tue, 28 Jul 2009 13:11:31 +0200 From: Marc Fonvieille To: freebsd-usb@freebsd.org Message-ID: <20090728111131.GA1383@gothic.blackend.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Useless-Header: blackend.org X-Operating-System: FreeBSD 8.0-BETA2 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Hans Petter Selasky Subject: uvisor(4) and Palm Z22 under 8.X 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: Tue, 28 Jul 2009 11:10:57 -0000 Hello, I'm trying to sync a Palm Z22 under 8.0-BETA2 with pilot-xfer from palm/pilot-link. If I plug the Z22, the system doesn't create a /dev/cuaUx node. I had the same problem under 7.X and 6.X, I used to patch uvisor.c (a very dirty hack btw) to allow the creation of the device node. So I applied the same changes to sys/dev/usb/serial/uvisor.c Index: uvisor.c =================================================================== --- uvisor.c (révision 195917) +++ uvisor.c (copie de travail) @@ -375,7 +375,7 @@ struct uvisor_connection_info coninfo; struct uvisor_palm_connection_info pconinfo; uint16_t actlen; - uWord wAvail; +/* uWord wAvail;*/ uint8_t buffer[256]; if (sc->sc_flag & UVISOR_FLAG_VISOR) { @@ -496,7 +496,7 @@ goto done; } } - DPRINTF("getting available bytes\n"); +/* DPRINTF("getting available bytes\n"); req.bmRequestType = UT_READ_VENDOR_ENDPOINT; req.bRequest = UVISOR_REQUEST_BYTES_AVAILABLE; USETW(req.wValue, 0); @@ -508,7 +508,7 @@ } DPRINTF("avail=%d\n", UGETW(wAvail)); - DPRINTF("done\n"); + DPRINTF("done\n");*/ done: return (err); } With this patch a /dev/cuaU0 node is created. If I launch a: # pilot-xfer -p /dev/cuaU0 -i /home/marc/projet/misc/livres.pdb Listening for incoming connection on /dev/cuaU0... connected! Installing 'livres.pdb' ... (16 bytes) ERROR: pi_file_install failed (-305, PalmOS 0x0000). Thank you for using pilot-link. So it fails where it worked on 7.X and 6.X. Here are some info from usbconfig(8): ugen2.2: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0110 bDeviceClass = 0x00ff bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0008 idVendor = 0x0830 idProduct = 0x0061 bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0000 bNumConfigurations = 0x0001 Any advices? -- Marc From owner-freebsd-usb@FreeBSD.ORG Tue Jul 28 11:51:47 2009 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 4ED72106564A; Tue, 28 Jul 2009 11:51:47 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 028628FC1A; Tue, 28 Jul 2009 11:51:46 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=nXpFIIviiSIb6VbkcJRrTGof2rlrvUat7MGKUprnWrlOU14yf0f0Det51kaVmY2iguEsX6YqTEHSQ4qDi2b/0bJ56+zoEK6XIzaWeYf+dROtd/LIJ8Ok6mRyr1JIGsqIQHZOQ03Y/oU6h47reVwBxLe/m/jj+HUxAbkw5bEu6/Y=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1MVlDd-00026N-Md; Tue, 28 Jul 2009 15:51:45 +0400 Date: Tue, 28 Jul 2009 15:51:43 +0400 From: Eygene Ryabinkin To: bug-followup@FreeBSD.org, freebsd-usb@FreeBSD.org Message-ID: References: <20090727194459.393CFB8090@phoenix.codelabs.ru> <200907271950.n6RJo3jj021164@freefall.freebsd.org> <8RwwU1KLz1ezvFiU9HsY6uoNfkU@nflB3XSqYRRHWdyVHMOFGnCK5Pk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8RwwU1KLz1ezvFiU9HsY6uoNfkU@nflB3XSqYRRHWdyVHMOFGnCK5Pk> Sender: rea-fbsd@codelabs.ru Cc: Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2009 11:51:47 -0000 Hans Petter, good day. HPS wrote: > Can you change your patch, so that usbhidctl uses libusb to get the > HID descriptor, instead of sysctl? I can, but how to relate the device name under devfs to the descriptor to be retrieved? I can enumerate all HID descriptors via libusb, but I can't currently say which device uses them. And I don't want to torture users with the crawl over the list of all vendor/device pairs for the discovered HID descriptors and ask to choose one -- that's not productive. Why do you dislike the sysctl approach? It is simple and reliable. -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # From owner-freebsd-usb@FreeBSD.ORG Tue Jul 28 12:00:15 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF43C106568C for ; Tue, 28 Jul 2009 12:00:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BB4138FC2B for ; Tue, 28 Jul 2009 12:00:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6SC0FeZ008969 for ; Tue, 28 Jul 2009 12:00:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6SC0FsH008968; Tue, 28 Jul 2009 12:00:15 GMT (envelope-from gnats) Date: Tue, 28 Jul 2009 12:00:15 GMT Message-Id: <200907281200.n6SC0FsH008968@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Eygene Ryabinkin Cc: Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2009 12:00:17 -0000 The following reply was made to PR usb/137189; it has been noted by GNATS. From: Eygene Ryabinkin To: bug-followup@FreeBSD.org, freebsd-usb@FreeBSD.org Cc: hselasky@c2i.net Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors Date: Tue, 28 Jul 2009 15:51:43 +0400 Hans Petter, good day. HPS wrote: > Can you change your patch, so that usbhidctl uses libusb to get the > HID descriptor, instead of sysctl? I can, but how to relate the device name under devfs to the descriptor to be retrieved? I can enumerate all HID descriptors via libusb, but I can't currently say which device uses them. And I don't want to torture users with the crawl over the list of all vendor/device pairs for the discovered HID descriptors and ask to choose one -- that's not productive. Why do you dislike the sysctl approach? It is simple and reliable. -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # From owner-freebsd-usb@FreeBSD.ORG Tue Jul 28 12:13:34 2009 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 C3D341065670; Tue, 28 Jul 2009 12:13:34 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 2D9708FC16; Tue, 28 Jul 2009 12:13:33 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=52VOGAJ3MIIA:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=jxbd0BV5kS9fsDMDDDQA:9 a=4-JJz88T7MbVBei2hCWl4VX1qJAA:4 a=2sKOWodI12Q33Vc8:21 a=7AhYMOYhiiWgki1J:21 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1286386361; Tue, 28 Jul 2009 14:13:32 +0200 From: Hans Petter Selasky To: rea-fbsd@codelabs.ru Date: Tue, 28 Jul 2009 14:13:25 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <20090727194459.393CFB8090@phoenix.codelabs.ru> <8RwwU1KLz1ezvFiU9HsY6uoNfkU@nflB3XSqYRRHWdyVHMOFGnCK5Pk> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907281413.26204.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org, bug-followup@freebsd.org Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors 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: Tue, 28 Jul 2009 12:13:35 -0000 On Tuesday 28 July 2009 13:51:43 Eygene Ryabinkin wrote: > Hans Petter, good day. > > HPS wrote: > > Can you change your patch, so that usbhidctl uses libusb to get the > > HID descriptor, instead of sysctl? > > I can, but how to relate the device name under devfs to the descriptor > to be retrieved? By unit number and device address, like usbconfig. > I can enumerate all HID descriptors via libusb, but I > can't currently say which device uses them. Try: usbconfig show_ifdrv > And I don't want to torture > users with the crawl over the list of all vendor/device pairs for the > discovered HID descriptors and ask to choose one -- that's not > productive. > > Why do you dislike the sysctl approach? It is simple and reliable. It's duplicating access to data. There is not that much wrong about it, except it will not work if the device is of another kind. I.E. you would have to patch the HID sysctl node into every driver accessing HID descriptors? --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Jul 28 12:20:03 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CF9D106564A for ; Tue, 28 Jul 2009 12:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EDFA38FC1B for ; Tue, 28 Jul 2009 12:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6SCK2Cm024346 for ; Tue, 28 Jul 2009 12:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6SCK2M4024345; Tue, 28 Jul 2009 12:20:02 GMT (envelope-from gnats) Date: Tue, 28 Jul 2009 12:20:02 GMT Message-Id: <200907281220.n6SCK2M4024345@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2009 12:20:03 -0000 The following reply was made to PR usb/137189; it has been noted by GNATS. From: Hans Petter Selasky To: rea-fbsd@codelabs.ru Cc: bug-followup@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors Date: Tue, 28 Jul 2009 14:13:25 +0200 On Tuesday 28 July 2009 13:51:43 Eygene Ryabinkin wrote: > Hans Petter, good day. > > HPS wrote: > > Can you change your patch, so that usbhidctl uses libusb to get the > > HID descriptor, instead of sysctl? > > I can, but how to relate the device name under devfs to the descriptor > to be retrieved? By unit number and device address, like usbconfig. > I can enumerate all HID descriptors via libusb, but I > can't currently say which device uses them. Try: usbconfig show_ifdrv > And I don't want to torture > users with the crawl over the list of all vendor/device pairs for the > discovered HID descriptors and ask to choose one -- that's not > productive. > > Why do you dislike the sysctl approach? It is simple and reliable. It's duplicating access to data. There is not that much wrong about it, except it will not work if the device is of another kind. I.E. you would have to patch the HID sysctl node into every driver accessing HID descriptors? --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Jul 28 15:40:31 2009 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 5481C1065670; Tue, 28 Jul 2009 15:40:31 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 048EB8FC13; Tue, 28 Jul 2009 15:40:30 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=NUvF/cxoQlL+bWQG1KuyPvIfZz3jS6ZVWCPRcehPmBEKBAGvusvmQTHl6tnojhMrPhMCI8Hx/d3aQFX7vanCdNIziQKZTn68TCyVXPOvlrrKV1YmuNvAg3Ks2wwwIIRqo97D2PTlIl+qaLAp1WCVB+G/z0fc+Uc62817NFqt99E=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1MVomz-0001lN-WB; Tue, 28 Jul 2009 19:40:30 +0400 Date: Tue, 28 Jul 2009 19:40:27 +0400 From: Eygene Ryabinkin To: bug-followup@FreeBSD.org, freebsd-usb@FreeBSD.org Message-ID: References: <20090727194459.393CFB8090@phoenix.codelabs.ru> <200907271950.n6RJo3jj021164@freefall.freebsd.org> <8RwwU1KLz1ezvFiU9HsY6uoNfkU@nflB3XSqYRRHWdyVHMOFGnCK5Pk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: rea-fbsd@codelabs.ru Cc: Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2009 15:40:31 -0000 HPS wrote: > > I can, but how to relate the device name under devfs to the descriptor > > to be retrieved? > > By unit number and device address, like usbconfig. Yes, but these numbers are the ugen ones; on my system, for example, ums0 maps to ugen5.3.0. >> I can enumerate all HID descriptors via libusb, but I > > can't currently say which device uses them. > > Try: > > usbconfig show_ifdrv Yes, that's better. But can I rely that the first item in the output of the libusb20_dev_get_iface_desc() will be the device name? And still, to get the report descriptor from one device, I should walk the entire USB tree until I'll find the device I am interested in. May be there are some other ways? I understand that enumeration is the principle of the USB bus, but may be there are another ways to directly grab 'struct libusb20_device *' or alike for the devfs node I am interested in? > > Why do you dislike the sysctl approach? It is simple and reliable. > > It's duplicating access to data. There is not that much wrong about > it, except it will not work if the device is of another kind. I.E. you > would have to patch the HID sysctl node into every driver accessing > HID descriptors? Just now -- yes, I'll need it. But probably I can move this functionality into the USB bus level -- it will automatically create this sysctl node for all HID children and will dispose it on the detach. usb_probe_and_attach() is a candidate for such functionality. Will it be bad? -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # From owner-freebsd-usb@FreeBSD.ORG Tue Jul 28 15:50:04 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33797106566C for ; Tue, 28 Jul 2009 15:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0812A8FC08 for ; Tue, 28 Jul 2009 15:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6SFo3Hf084606 for ; Tue, 28 Jul 2009 15:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6SFo3va084603; Tue, 28 Jul 2009 15:50:03 GMT (envelope-from gnats) Date: Tue, 28 Jul 2009 15:50:03 GMT Message-Id: <200907281550.n6SFo3va084603@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Eygene Ryabinkin Cc: Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2009 15:50:04 -0000 The following reply was made to PR usb/137189; it has been noted by GNATS. From: Eygene Ryabinkin To: bug-followup@FreeBSD.org, freebsd-usb@FreeBSD.org Cc: hselasky@c2i.net Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors Date: Tue, 28 Jul 2009 19:40:27 +0400 HPS wrote: > > I can, but how to relate the device name under devfs to the descriptor > > to be retrieved? > > By unit number and device address, like usbconfig. Yes, but these numbers are the ugen ones; on my system, for example, ums0 maps to ugen5.3.0. >> I can enumerate all HID descriptors via libusb, but I > > can't currently say which device uses them. > > Try: > > usbconfig show_ifdrv Yes, that's better. But can I rely that the first item in the output of the libusb20_dev_get_iface_desc() will be the device name? And still, to get the report descriptor from one device, I should walk the entire USB tree until I'll find the device I am interested in. May be there are some other ways? I understand that enumeration is the principle of the USB bus, but may be there are another ways to directly grab 'struct libusb20_device *' or alike for the devfs node I am interested in? > > Why do you dislike the sysctl approach? It is simple and reliable. > > It's duplicating access to data. There is not that much wrong about > it, except it will not work if the device is of another kind. I.E. you > would have to patch the HID sysctl node into every driver accessing > HID descriptors? Just now -- yes, I'll need it. But probably I can move this functionality into the USB bus level -- it will automatically create this sysctl node for all HID children and will dispose it on the detach. usb_probe_and_attach() is a candidate for such functionality. Will it be bad? -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # From owner-freebsd-usb@FreeBSD.ORG Tue Jul 28 19:31:11 2009 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 294971065670 for ; Tue, 28 Jul 2009 19:31:11 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.tele2.se [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id 88EE18FC0C for ; Tue, 28 Jul 2009 19:31:10 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=qKSVfGZNeHoA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=6I5d2MoRAAAA:8 a=sJa5Tc9ObukdPiPRTdYA:9 a=sZL9c67bWX39_oaGr5wA:7 a=T5DDX5kk5CRCebSZII9cXSBHr1YA:4 a=SV7veod9ZcQA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 545163325; Tue, 28 Jul 2009 21:31:08 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Tue, 28 Jul 2009 21:31:00 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <200907260041.n6Q0fEO6058396@freefall.freebsd.org> In-Reply-To: <200907260041.n6Q0fEO6058396@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907282131.02185.hselasky@c2i.net> Cc: freebsd-bugs@freebsd.org Subject: Re: usb/137138: [umass] [patch] QUIRK: ASUS PDA Flash disk emulation 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: Tue, 28 Jul 2009 19:31:11 -0000 On Sunday 26 July 2009 02:41:14 linimon@freebsd.org wrote: > Old Synopsis: QUIRK: ASUS PDA Flash disk emulation > New Synopsis: [umass] [patch] QUIRK: ASUS PDA Flash disk emulation > > Responsible-Changed-From-To: freebsd-bugs->freebsd-usb > Responsible-Changed-By: linimon > Responsible-Changed-When: Sun Jul 26 00:40:32 UTC 2009 > Responsible-Changed-Why: > Over to maintainer(s). > > http://www.freebsd.org/cgi/query-pr.cgi?pr=137138 Can you verify the following patch is still working with your device: http://perforce.freebsd.org/chv.cgi?CH=166691 --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Jul 28 20:44:18 2009 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 24AD2106564A for ; Tue, 28 Jul 2009 20:44:18 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe10.tele2.se [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id ADA8A8FC0A for ; Tue, 28 Jul 2009 20:44:17 +0000 (UTC) (envelope-from hselasky@freebsd.org) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=WD37IA6_y7UA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=ndaoGXS1AAAA:8 a=tr5_C1YX0iMZtJC9ysYA:9 a=m4MkgGzxfiAEyW0yxO2cNTXmp8AA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1116415033; Tue, 28 Jul 2009 21:44:13 +0200 Received-SPF: softfail receiver=mailfe10.swip.net; client-ip=188.126.201.140; envelope-from=hselasky@freebsd.org From: Hans Petter Selasky To: freebsd-usb@freebsd.org, freebsd-current@freebsd.org Date: Tue, 28 Jul 2009 21:44:05 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907282144.07077.hselasky@freebsd.org> Cc: Subject: 8-current USB patches available for testing (set #020) 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: Tue, 28 Jul 2009 20:44:18 -0000 Hi, Diff between USB P4 and 8-current is available from below. Please test and report back if there are any issues. http://www.selasky.org/hans_petter/usb4bsd/for_review/ MD5 (commit_log_020.txt) = ca1eeee0225b124a85783b6b585f38fc MD5 (usb_stack_mod_020.diff.gz) = bfdf1ca369c4e02dbf5716d408ed74e0 cd /usr/ zcat usb_stack_mod_020.diff.gz | patch --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Jul 28 20:50:56 2009 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 05BE6106566B; Tue, 28 Jul 2009 20:50:56 +0000 (UTC) (envelope-from h.schmalzbauer@omnilan.de) Received: from host.omnilan.net (host.omnilan.net [62.245.232.135]) by mx1.freebsd.org (Postfix) with ESMTP id 80BFF8FC16; Tue, 28 Jul 2009 20:50:55 +0000 (UTC) (envelope-from h.schmalzbauer@omnilan.de) Received: from titan.flintsbach.schmalzbauer.de (titan.flintsbach.schmalzbauer.de [172.21.1.150]) (authenticated bits=0) by host.omnilan.net (8.13.8/8.13.8) with ESMTP id n6SKc7p0057701 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 28 Jul 2009 22:38:07 +0200 (CEST) (envelope-from h.schmalzbauer@omnilan.de) Message-ID: <4A6F61AF.2020106@omnilan.de> Date: Tue, 28 Jul 2009 22:38:07 +0200 From: Harald Schmalzbauer Organization: OmniLAN User-Agent: Thunderbird 2.0.0.22 (X11/20090717) MIME-Version: 1.0 To: Hans Petter Selasky References: <200907282144.07077.hselasky@freebsd.org> In-Reply-To: <200907282144.07077.hselasky@freebsd.org> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig58577ADD61352DFAF69A5B4D" Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: 8-current USB patches available for testing (set #020) 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: Tue, 28 Jul 2009 20:50:56 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig58577ADD61352DFAF69A5B4D Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hans Petter Selasky schrieb am 28.07.2009 21:44 (localtime): =2E.. > Diff between USB P4 and 8-current is available from below. Please test = and=20 > report back if there are any issues. Compiled fine, but no change to my floppy issue. Thanks for your work, -Harry --------------enig58577ADD61352DFAF69A5B4D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkpvYa8ACgkQLDqVQ9VXb8gnIwCfXYqOYJcgcn/UZfb061UZTuVe HiIAn1Kajdo4QgfvVW0gjvo+wilxr0H5 =tZbS -----END PGP SIGNATURE----- --------------enig58577ADD61352DFAF69A5B4D-- From owner-freebsd-usb@FreeBSD.ORG Tue Jul 28 22:00:11 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9705B1065676 for ; Tue, 28 Jul 2009 22:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 71F268FC1C for ; Tue, 28 Jul 2009 22:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6SM0BiD067818 for ; Tue, 28 Jul 2009 22:00:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6SM0B18067817; Tue, 28 Jul 2009 22:00:11 GMT (envelope-from gnats) Resent-Date: Tue, 28 Jul 2009 22:00:11 GMT Resent-Message-Id: <200907282200.n6SM0B18067817@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Ronald Klop" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E1031065674 for ; Tue, 28 Jul 2009 21:52:01 +0000 (UTC) (envelope-from ronald@echteman.nl) Received: from smtp-out3.tiscali.nl (smtp-out3.tiscali.nl [195.241.79.178]) by mx1.freebsd.org (Postfix) with ESMTP id F0CC48FC08 for ; Tue, 28 Jul 2009 21:52:00 +0000 (UTC) (envelope-from ronald@echteman.nl) Received: from [212.123.145.58] (helo=sjakie.klop.ws) by smtp-out3.tiscali.nl with esmtp (Exim) (envelope-from ) id 1MVuPV-0004JG-Cz; Tue, 28 Jul 2009 23:40:37 +0200 Received: from sjakie.klop.ws (localhost [127.0.0.1]) by sjakie.klop.ws (Postfix) with ESMTP id 34A611098E; Tue, 28 Jul 2009 23:40:30 +0200 (CEST) Message-Id: <1248817230.68597@sjakie.klop.ws> Date: Tue, 28 Jul 2009 23:40:30 +0200 From: "Ronald Klop" To: "FreeBSD gnats submit" X-Send-Pr-Version: gtk-send-pr 0.4.9 Cc: ronald@echteman.nl Subject: usb/137226: [patch] quirk for Philips extern USB disk 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: Tue, 28 Jul 2009 22:00:11 -0000 >Number: 137226 >Category: usb >Synopsis: [patch] quirk for Philips extern USB disk >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jul 28 22:00:10 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Ronald Klop >Release: FreeBSD 7.2-STABLE amd64 >Organization: >Environment: System: FreeBSD 7.2-STABLE #2: Sat Jul 11 13:18:09 CEST 2009 root@sjakie.klop.ws:/usr/obj/usr/src/sys/GENERIC >Description: My disk doesn't work with ZFS, because I get 'operation not supported'. See below. A person on the mailinglist suggested me to add a quirk and since than my usb disk is happily running ZFS. Jul 8 03:01:39 sjakie kernel: (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0 Jul 8 03:01:39 sjakie kernel: (da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error Jul 8 03:01:39 sjakie kernel: (da0:umass-sim0:0:0:0): SCSI Status: Check Condition Jul 8 03:01:39 sjakie kernel: (da0:umass-sim0:0:0:0): ILLEGAL REQUEST asc:20,0 Jul 8 03:01:39 sjakie kernel: (da0:umass-sim0:0:0:0): Invalid command operation code Jul 8 03:01:39 sjakie kernel: (da0:umass-sim0:0:0:0): Unretryable error Jul 8 03:01:39 sjakie root: ZFS: vdev I/O failure, zpool=extern path=/dev/da0 offset=11391598592 size=65536 error=5 Jul 8 03:01:39 sjakie root: ZFS: vdev I/O failure, zpool=extern path=/dev/da0 offset=70877380608 size=65536 error=5 Jul 8 03:02:10 sjakie kernel: (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0 Jul 8 03:02:10 sjakie kernel: (da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error Jul 8 03:02:10 sjakie kernel: (da0:umass-sim0:0:0:0): SCSI Status: Check Condition Jul 8 03:02:10 sjakie kernel: (da0:umass-sim0:0:0:0): ILLEGAL REQUEST asc:20,0 Jul 8 03:02:10 sjakie kernel: (da0:umass-sim0:0:0:0): Invalid command operation code Jul 8 03:02:10 sjakie kernel: (da0:umass-sim0:0:0:0): Unretryable error Jul 8 03:02:10 sjakie kernel: (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0 Jul 8 03:02:10 sjakie kernel: (da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error Jul 8 03:02:10 sjakie kernel: (da0:umass-sim0:0:0:0): SCSI Status: Check Condition Jul 8 03:02:10 sjakie kernel: (da0:umass-sim0:0:0:0): ILLEGAL REQUEST asc:20,0 Jul 8 03:02:10 sjakie kernel: (da0:umass-sim0:0:0:0): Invalid command operation code Jul 8 03:02:10 sjakie kernel: (da0:umass-sim0:0:0:0): Unretryable error >How-To-Repeat: >Fix: --- philips-usb-umass.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # patch-sys-dev-usb-umass.c # patch-sys-dev-usb-usbdevs # echo x - patch-sys-dev-usb-umass.c sed 's/^X//' >patch-sys-dev-usb-umass.c << 'dd1f6f9840f8034573a5988aee8d2593' X--- /usr/src/sys/dev/usb/umass.c.orig 2009-07-10 08:55:30.000000000 +0200 X+++ /usr/src/sys/dev/usb/umass.c 2009-07-11 10:59:36.929295627 +0200 X@@ -659,6 +659,10 @@ X UMASS_PROTO_UFI, X NO_QUIRKS X }, X+ { USB_VENDOR_PHILIPS, USB_PRODUCT_PHILIPS_SPE3030CC, RID_WILDCARD, X+ UMASS_PROTO_SCSI | UMASS_PROTO_BBB, X+ NO_SYNCHRONIZE_CACHE X+ }, X { USB_VENDOR_PLEXTOR, USB_PRODUCT_PLEXTOR_40_12_40U, RID_WILDCARD, X UMASS_PROTO_SCSI | UMASS_PROTO_BBB, X NO_TEST_UNIT_READY dd1f6f9840f8034573a5988aee8d2593 echo x - patch-sys-dev-usb-usbdevs sed 's/^X//' >patch-sys-dev-usb-usbdevs << 'f7a7d33f51c9b8ba3ec9f71867b7028f' X--- /usr/src/sys/dev/usb/usbdevs.orig 2009-07-10 08:55:30.000000000 +0200 X+++ /usr/src/sys/dev/usb/usbdevs 2009-07-11 12:29:16.171197768 +0200 X@@ -1958,6 +1957,7 @@ X product PHILIPS PCA646VC 0x0303 PCA646VC PC Camera X product PHILIPS PCVC680K 0x0308 PCVC680K Vesta Pro PC Camera X product PHILIPS DSS150 0x0471 DSS 150 Digital Speaker System X+product PHILIPS SPE3030CC 0x083a USB 2.0 External Disk X product PHILIPS SNU5600 0x1236 SNU5600 X product PHILIPS UM10016 0x1552 ISP 1581 Hi-Speed USB MPEG2 Encoder Reference Kit X product PHILIPS DIVAUSB 0x1801 DIVA USB mp3 player f7a7d33f51c9b8ba3ec9f71867b7028f exit --- philips-usb-umass.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Wed Jul 29 07:25:11 2009 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 E9FB1106566B; Wed, 29 Jul 2009 07:25:11 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id 5014A8FC14; Wed, 29 Jul 2009 07:25:10 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=4BkXVT9rUNUA:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=6I5d2MoRAAAA:8 a=lzAt6lczPcjBF2UoQ7QA:9 a=4N2QztmsJVtsy4lR6f1EIsrWVeIA:4 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1283542144; Wed, 29 Jul 2009 09:25:09 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Wed, 29 Jul 2009 09:25:02 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <1248817230.68597@sjakie.klop.ws> In-Reply-To: <1248817230.68597@sjakie.klop.ws> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907290925.03682.hselasky@c2i.net> Cc: Ronald Klop , FreeBSD gnats submit Subject: Re: usb/137226: [patch] quirk for Philips extern USB disk 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, 29 Jul 2009 07:25:12 -0000 On Tuesday 28 July 2009 23:40:30 Ronald Klop wrote: > usb/137226 Patched in 8-current. http://perforce.freebsd.org/chv.cgi?CH=166718 --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Jul 29 07:30:13 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D9EE106566C for ; Wed, 29 Jul 2009 07:30:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D591D8FC08 for ; Wed, 29 Jul 2009 07:30:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6T7UCUu030489 for ; Wed, 29 Jul 2009 07:30:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6T7UC4V030488; Wed, 29 Jul 2009 07:30:12 GMT (envelope-from gnats) Date: Wed, 29 Jul 2009 07:30:12 GMT Message-Id: <200907290730.n6T7UC4V030488@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/137226: [patch] quirk for Philips extern USB disk X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jul 2009 07:30:13 -0000 The following reply was made to PR usb/137226; it has been noted by GNATS. From: Hans Petter Selasky To: freebsd-usb@freebsd.org Cc: "Ronald Klop" , "FreeBSD gnats submit" Subject: Re: usb/137226: [patch] quirk for Philips extern USB disk Date: Wed, 29 Jul 2009 09:25:02 +0200 On Tuesday 28 July 2009 23:40:30 Ronald Klop wrote: > usb/137226 Patched in 8-current. http://perforce.freebsd.org/chv.cgi?CH=166718 --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Jul 29 08:23:01 2009 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 B7299106564A; Wed, 29 Jul 2009 08:23:01 +0000 (UTC) (envelope-from wtf.jlaine@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 0CE988FC36; Wed, 29 Jul 2009 08:23:00 +0000 (UTC) (envelope-from wtf.jlaine@gmail.com) Received: by fg-out-1718.google.com with SMTP id 13so191066fge.12 for ; Wed, 29 Jul 2009 01:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:cc :subject:message-id:mail-followup-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent :x-operating-system; bh=8mGEGxU5Aw0TgtJ8q44jdhEeO//GQgjUVMGhe4btTng=; b=Rq4j7mFQRCkMyhrn0TD23HbWm+PG6gZx13UarlyGAPjbelf9p3FwUFpjbNaJsQqnBl kxUoJ136K7jArXtre8BTFMbGoG/F9DWT5akVdtdK8tEUoF5RHHM5kPBzBYkt0XaZCUfC Cc9kEhI5pYd2zM+8JrwbmxdlxRg4ma8Imer0o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:x-operating-system; b=nIy4IGGB2fGkW0h+lcJh3MNKABV19OmEKz2Gw6zyWAdsD1hqv7NJmXU2XtdcYEkN+4 CKe2IwFyXjdvK/Cko5hEvWiEjVLD4WKZnW+upQKiQ/hIeC3WWYmeDA1tTNgin6gtXCuA 4aB9AZq70cSRxtd0ANtbMmcm3j+onM0RMazvQ= Received: by 10.86.59.2 with SMTP id h2mr493190fga.60.1248854099622; Wed, 29 Jul 2009 00:54:59 -0700 (PDT) Received: from aperture_lab ([77.66.145.99]) by mx.google.com with ESMTPS id l12sm2264060fgb.13.2009.07.29.00.54.57 (version=SSLv3 cipher=RC4-MD5); Wed, 29 Jul 2009 00:54:58 -0700 (PDT) Received: by aperture_lab (sSMTP sendmail emulation); Wed, 29 Jul 2009 11:54:56 +0400 Date: Wed, 29 Jul 2009 11:54:56 +0400 From: Jeff Laine To: Hans Petter Selasky Message-ID: <20090729075456.GA8133@free.bsd.loc> Mail-Followup-To: Jeff Laine , Hans Petter Selasky , freebsd-usb@freebsd.org, freebsd-current@freebsd.org References: <200907282144.07077.hselasky@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200907282144.07077.hselasky@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 8.0-BETA2 i386 Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: 8-current USB patches available for testing (set #020) 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, 29 Jul 2009 08:23:03 -0000 On Tue,07/28/09 [21:44:05], Hans Petter Selasky wrote: > Hi, > > Diff between USB P4 and 8-current is available from below. Please test and > report back if there are any issues. > > http://www.selasky.org/hans_petter/usb4bsd/for_review/ > > MD5 (commit_log_020.txt) = ca1eeee0225b124a85783b6b585f38fc > MD5 (usb_stack_mod_020.diff.gz) = bfdf1ca369c4e02dbf5716d408ed74e0 > > cd /usr/ > zcat usb_stack_mod_020.diff.gz | patch > Hello Hans, I'd like to try this out. Am I supposed to rebuild+reinstall the kernel in order to use this patch? TIA -- Best regards, Jeff | "Nobody wants to say how this works. | | Maybe nobody knows ..." | | Xorg.conf(5) | From owner-freebsd-usb@FreeBSD.ORG Wed Jul 29 09:31:14 2009 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 252A2106566C; Wed, 29 Jul 2009 09:31:14 +0000 (UTC) (envelope-from hlh@restart.be) Received: from tignes.restart.be (tignes.restart.be [IPv6:2001:41d0:2:2d29:0:1::]) by mx1.freebsd.org (Postfix) with ESMTP id A6DE08FC1E; Wed, 29 Jul 2009 09:31:13 +0000 (UTC) (envelope-from hlh@restart.be) Received: from restart.be (avoriaz.tunnel.bel [IPv6:2001:41d0:2:2d29:1:ffff::]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "avoriaz.restart.be", Issuer "CA master" (verified OK)) by tignes.restart.be (Postfix) with ESMTPS id A93DD6FCE; Wed, 29 Jul 2009 11:31:12 +0200 (CEST) Received: from morzine.restart.bel (morzine.restart.be [IPv6:2001:41d0:2:2d29:1:2::]) (authenticated bits=0) by restart.be (8.14.3/8.14.3) with ESMTP id n6T9V8To085046; Wed, 29 Jul 2009 11:31:09 +0200 (CEST) (envelope-from hlh@restart.be) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=restart.be; s=avoriaz; t=1248859872; bh=Lz6BC50s0decGIwYbBH6LLu8harNQUMWnT9eR/T8t8o=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=sE4YYO9lGeCWCK25E4BSgkdSeOQP/RqQ2QgDc4aTDGZoWIwSeloCFeCxfgGcD6KRY yDez5mro/GHLeTY7IfZOw== DomainKey-Signature: a=rsa-sha1; s=avoriaz; d=restart.be; c=nofws; q=dns; h=message-id:date:from:organization:user-agent:mime-version:to:cc: subject:references:in-reply-to:content-type: content-transfer-encoding:x-scanned-by; b=xgZvGQUQwGjGjB4MAhhMyWXxIikKpvUmSvJmlhmovBEUm/A44qX9QfK2vtzSP4izt 70uuSY63GX5QDligob52w== Message-ID: <4A7016DC.9090703@restart.be> Date: Wed, 29 Jul 2009 11:31:08 +0200 From: Henri Hennebert Organization: RestartSoft User-Agent: Thunderbird 2.0.0.22 (X11/20090725) MIME-Version: 1.0 To: Hans Petter Selasky References: <200907282144.07077.hselasky@freebsd.org> In-Reply-To: <200907282144.07077.hselasky@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on IPv6:2001:41d0:2:2d29:1:1:: Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: [NO REGRESSION] 8-current USB patches available for testing (set #020) 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, 29 Jul 2009 09:31:14 -0000 Hans Petter Selasky wrote: > Hi, > > Diff between USB P4 and 8-current is available from below. Please test and > report back if there are any issues. All is ok: No regression for me -- umass (kingston USB stick, Sony Cyber-shot DSC-P72, Fujitsu Memorybird 1.05 and SAMSUNG MP0402H UC10) Henri > > http://www.selasky.org/hans_petter/usb4bsd/for_review/ > > MD5 (commit_log_020.txt) = ca1eeee0225b124a85783b6b585f38fc > MD5 (usb_stack_mod_020.diff.gz) = bfdf1ca369c4e02dbf5716d408ed74e0 > > cd /usr/ > zcat usb_stack_mod_020.diff.gz | patch > > --HPS > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Wed Jul 29 09:38:41 2009 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 C0365106567D for ; Wed, 29 Jul 2009 09:38:41 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id 528268FC0C for ; Wed, 29 Jul 2009 09:38:40 +0000 (UTC) (envelope-from hselasky@freebsd.org) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Bhfngsuvjo8A:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=ndaoGXS1AAAA:8 a=ekqQmrlk_uHAvis7HZgA:9 a=RI9euTW7SNLc41H6dM0clPTRFggA:4 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1280507965; Wed, 29 Jul 2009 10:38:38 +0200 Received-SPF: softfail receiver=mailfe07.swip.net; client-ip=194.248.135.20; envelope-from=hselasky@freebsd.org From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Wed, 29 Jul 2009 10:38:32 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <200907282144.07077.hselasky@freebsd.org> <20090729075456.GA8133@free.bsd.loc> In-Reply-To: <20090729075456.GA8133@free.bsd.loc> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907291038.33712.hselasky@freebsd.org> Cc: Jeff Laine , freebsd-current@freebsd.org Subject: Re: 8-current USB patches available for testing (set #020) 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, 29 Jul 2009 09:38:42 -0000 On Wednesday 29 July 2009 09:54:56 Jeff Laine wrote: > On Tue,07/28/09 [21:44:05], Hans Petter Selasky wrote: > > Hi, > > > > Diff between USB P4 and 8-current is available from below. Please test > > and report back if there are any issues. > > > > http://www.selasky.org/hans_petter/usb4bsd/for_review/ > > > > MD5 (commit_log_020.txt) = ca1eeee0225b124a85783b6b585f38fc > > MD5 (usb_stack_mod_020.diff.gz) = bfdf1ca369c4e02dbf5716d408ed74e0 > > > > cd /usr/ > > zcat usb_stack_mod_020.diff.gz | patch > > Hello Hans, > > I'd like to try this out. Am I supposed to rebuild+reinstall the kernel in > order to use this patch? You should rebuild kernel + world. There are changes in kernelspace and userland (mostly LibUSB v1.0). --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Jul 29 15:55:42 2009 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 E4EC31065672; Wed, 29 Jul 2009 15:55:42 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out1.uni-muenster.de (ZIVM-OUT1.UNI-MUENSTER.DE [128.176.192.8]) by mx1.freebsd.org (Postfix) with ESMTP id 45AF68FC0C; Wed, 29 Jul 2009 15:55:41 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.43,289,1246831200"; d="scan'208";a="278671381" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay1.uni-muenster.de with ESMTP; 29 Jul 2009 17:55:33 +0200 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 774421B0765; Wed, 29 Jul 2009 17:55:33 +0200 (CEST) Date: Wed, 29 Jul 2009 17:55:33 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: , Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: [NO REGRESSION] 8-current USB patches available for testing (set #020) 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, 29 Jul 2009 15:55:43 -0000 no problems here either. works great and the ums-rate patch is really noticeable. just a little request: while testing the ums-rate patch hans and i noticed that certain mice go crazy when the rate gets lowered beneath a certain value. would be great to have this info in um(4) or moused(8). cheers. alex From owner-freebsd-usb@FreeBSD.ORG Wed Jul 29 20:25:08 2009 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 075C51065675 for ; Wed, 29 Jul 2009 20:25:08 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out2.uni-muenster.de (ZIVM-OUT2.UNI-MUENSTER.DE [128.176.192.9]) by mx1.freebsd.org (Postfix) with ESMTP id 930D38FC15 for ; Wed, 29 Jul 2009 20:25:07 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.43,290,1246831200"; d="scan'208";a="220011836" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay2.uni-muenster.de with ESMTP; 29 Jul 2009 22:25:05 +0200 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id E40561B0751; Wed, 29 Jul 2009 22:25:05 +0200 (CEST) Date: Wed, 29 Jul 2009 22:25:05 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: problem writing to umass 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: Wed, 29 Jul 2009 20:25:08 -0000 i have a problem with the following device: ugen7.2: at usbus7 umass0: on usbus7 umass0: SCSI over Bulk-Only; quirks = 0x4400 umass0:7:0:-1: Attached to scbus7 da0 at umass-sim0 bus 0 target 0 lun 0 da0: < > Removable Direct Access SCSI-2 device da0: 40.000MB/s transfers da0: 3864MB (7913472 512 byte sectors: 255H 63S/T 492C) i haven't used it for quite a while, but it used to work just fine (yes with usb2). but since then i've updated my kernel a couple of times and now i'm getting these errors. i can mount the device just fine, but if i try to copy files onto it i get the following error messages: Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54083584, length=65536)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54149120, length=65536)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54214656, length=65536)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54280192, length=32768)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54312960, length=16384)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54329344, length=65536)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54394880, length=65536)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54460416, length=65536)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54525952, length=65536)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54591488, length=65536)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54657024, length=16384)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=512, length=512)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=24576, length=4096)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=28672, length=4096)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=1024000, length=4096)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=1028096, length=4096)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=38502400, length=16384)]error = 5 Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=39370752, length=16384)]error = 5 Jul 28 11:22:07 otaku kernel: fsync: giving up on dirty Jul 28 11:22:07 otaku kernel: 0xcc0aa6b8: tag msdosfs, type VREG Jul 28 11:22:07 otaku kernel: usecount 1, writecount 0, refcount 55 mountedhere 0 Jul 28 11:22:07 otaku kernel: flags () Jul 28 11:22:07 otaku kernel: v_object 0xc8a81770 ref 0 pages 212 Jul 28 11:22:07 otaku kernel: lock type msdosfs: EXCL by thread 0xcc60a240 (pid 19448) Jul 28 11:22:07 otaku kernel: #0 0xc05b5ee0 at __lockmgr_args+0xb90 Jul 28 11:22:07 otaku kernel: #1 0xc0647898 at vop_stdlock+0x68 Jul 28 11:22:07 otaku kernel: #2 0xc0781fb5 at VOP_LOCK1_APV+0xb5 Jul 28 11:22:07 otaku kernel: #3 0xc0664008 at _vn_lock+0x78 Jul 28 11:22:07 otaku kernel: #4 0xc0658adb at vget+0xbb Jul 28 11:22:07 otaku kernel: #5 0xc055d4ca at msdosfs_sync+0x17a Jul 28 11:22:07 otaku kernel: #6 0xc06520be at dounmount+0x44e Jul 28 11:22:07 otaku kernel: #7 0xc065262f at unmount+0x2bf Jul 28 11:22:07 otaku kernel: #8 0xc076eb26 at syscall+0x2a6 Jul 28 11:22:07 otaku kernel: #9 0xc0752ad0 at Xint0x80_syscall+0x20 Jul 28 11:22:07 otaku kernel: startcluster 2230, dircluster 2229, diroffset 96, on dev da0 Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=53805056, length=65536)]error = 5 Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=53870592, length=65536)]error = 5 Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=53936128, length=65536)]error = 5 Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54001664, length=65536)]error = 5 Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54067200, length=65536)]error = 5 Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54132736, length=65536)]error = 5 Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54198272, length=65536)]error = 5 Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54263808, length=65536)]error = 5 Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54329344, length=65536)]error = 5 Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54394880, length=65536)]error = 5 Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54460416, length=65536)]error = 5 Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54525952, length=65536)]error = 5 might the device's ram be broken? this is the result of `dd if=/dev/da0 of=/dev/null`: dd: /dev/da0: Input/output error 1067+0 records in 1067+0 records out 546304 bytes transferred in 235.522107 secs (2320 bytes/sec) i attached the device to a windows xp box and ran scandisk. that didn't reveal any problems however. cheers. alex oh...and i'm running r195923. From owner-freebsd-usb@FreeBSD.ORG Wed Jul 29 20:36:12 2009 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 CCD23106577F for ; Wed, 29 Jul 2009 20:36:12 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.tele2.se [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id 38E118FC08 for ; Wed, 29 Jul 2009 20:36:11 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=3ednrfMJ881z_vdJml4A:9 a=wNYhy4BIQCn0BD3ZHs0A:7 a=vDnM-t-9y1HfCn7nmlbPv2Xxsj0A:4 a=jgp5poovSdsiB3ua:21 a=fQ7aRKfKysPQJpfj:21 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 545861309; Wed, 29 Jul 2009 22:36:10 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Wed, 29 Jul 2009 22:36:03 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907292236.04773.hselasky@c2i.net> Cc: Alexander Best Subject: Re: problem writing to umass 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: Wed, 29 Jul 2009 20:36:13 -0000 On Wednesday 29 July 2009 22:25:05 Alexander Best wrote: > i have a problem with the following device: > > ugen7.2: at usbus7 > umass0: > on usbus7 > umass0: SCSI over Bulk-Only; quirks = 0x4400 > umass0:7:0:-1: Attached to scbus7 > da0 at umass-sim0 bus 0 target 0 lun 0 > da0: < > Removable Direct Access SCSI-2 device > da0: 40.000MB/s transfers > da0: 3864MB (7913472 512 byte sectors: 255H 63S/T 492C) > > i haven't used it for quite a while, but it used to work just fine (yes > with usb2). but since then i've updated my kernel a couple of times and now > i'm getting these errors. i can mount the device just fine, but if i try to > copy files onto it i get the following error messages: > > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54083584, > length=65536)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54149120, > length=65536)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54214656, > length=65536)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54280192, > length=32768)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54312960, > length=16384)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54329344, > length=65536)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54394880, > length=65536)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54460416, > length=65536)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54525952, > length=65536)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54591488, > length=65536)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=54657024, > length=16384)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=512, > length=512)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=24576, > length=4096)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=28672, > length=4096)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=1024000, > length=4096)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=1028096, > length=4096)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=38502400, > length=16384)]error = 5 > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=39370752, > length=16384)]error = 5 > Jul 28 11:22:07 otaku kernel: fsync: giving up on dirty > Jul 28 11:22:07 otaku kernel: 0xcc0aa6b8: tag msdosfs, type VREG > Jul 28 11:22:07 otaku kernel: usecount 1, writecount 0, refcount 55 > mountedhere 0 > Jul 28 11:22:07 otaku kernel: flags () > Jul 28 11:22:07 otaku kernel: v_object 0xc8a81770 ref 0 pages 212 > Jul 28 11:22:07 otaku kernel: lock type msdosfs: EXCL by thread 0xcc60a240 > (pid 19448) > Jul 28 11:22:07 otaku kernel: #0 0xc05b5ee0 at __lockmgr_args+0xb90 > Jul 28 11:22:07 otaku kernel: #1 0xc0647898 at vop_stdlock+0x68 > Jul 28 11:22:07 otaku kernel: #2 0xc0781fb5 at VOP_LOCK1_APV+0xb5 > Jul 28 11:22:07 otaku kernel: #3 0xc0664008 at _vn_lock+0x78 > Jul 28 11:22:07 otaku kernel: #4 0xc0658adb at vget+0xbb > Jul 28 11:22:07 otaku kernel: #5 0xc055d4ca at msdosfs_sync+0x17a > Jul 28 11:22:07 otaku kernel: #6 0xc06520be at dounmount+0x44e > Jul 28 11:22:07 otaku kernel: #7 0xc065262f at unmount+0x2bf > Jul 28 11:22:07 otaku kernel: #8 0xc076eb26 at syscall+0x2a6 > Jul 28 11:22:07 otaku kernel: #9 0xc0752ad0 at Xint0x80_syscall+0x20 > Jul 28 11:22:07 otaku kernel: startcluster 2230, dircluster 2229, diroffset > 96, on dev da0 > Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=53805056, > length=65536)]error = 5 > Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=53870592, > length=65536)]error = 5 > Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=53936128, > length=65536)]error = 5 > Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54001664, > length=65536)]error = 5 > Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54067200, > length=65536)]error = 5 > Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54132736, > length=65536)]error = 5 > Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54198272, > length=65536)]error = 5 > Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54263808, > length=65536)]error = 5 > Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54329344, > length=65536)]error = 5 > Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54394880, > length=65536)]error = 5 > Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54460416, > length=65536)]error = 5 > Jul 28 11:22:40 otaku kernel: g_vfs_done():da0[WRITE(offset=54525952, > length=65536)]error = 5 > > might the device's ram be broken? this is the result of `dd if=/dev/da0 > of=/dev/null`: > > dd: /dev/da0: Input/output error > 1067+0 records in > 1067+0 records out > 546304 bytes transferred in 235.522107 secs (2320 bytes/sec) ^^ terribly slow disk ? > > i attached the device to a windows xp box and ran scandisk. that didn't > reveal any problems however. > Hi, Try enabling umass debugging: sysctl hw.usb.umass.debug=-1 Not sure if this might be a CAM layer regression. --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Jul 29 21:05:43 2009 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 05090106564A for ; Wed, 29 Jul 2009 21:05:43 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out1.uni-muenster.de (ZIVM-OUT1.UNI-MUENSTER.DE [128.176.192.8]) by mx1.freebsd.org (Postfix) with ESMTP id B842A8FC0A for ; Wed, 29 Jul 2009 21:05:41 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.43,290,1246831200"; d="scan'208";a="278690820" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER05.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay1.uni-muenster.de with ESMTP; 29 Jul 2009 23:05:40 +0200 Received: by ZIVMAILUSER05.UNI-MUENSTER.DE (Postfix, from userid 149459) id E6EEB1B07E4; Wed, 29 Jul 2009 23:05:39 +0200 (CEST) Date: Wed, 29 Jul 2009 23:05:39 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Hans Petter Selasky , Message-ID: In-Reply-To: <200907292236.04773.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: problem writing to umass 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: Wed, 29 Jul 2009 21:05:43 -0000 Hans Petter Selasky schrieb am 2009-07-29: > On Wednesday 29 July 2009 22:25:05 Alexander Best wrote: > > i have a problem with the following device: > > ugen7.2: at usbus7 > > umass0: > addr 2> > > on usbus7 > > umass0: SCSI over Bulk-Only; quirks = 0x4400 > > umass0:7:0:-1: Attached to scbus7 > > da0 at umass-sim0 bus 0 target 0 lun 0 > > da0: < > Removable Direct Access SCSI-2 device > > da0: 40.000MB/s transfers > > da0: 3864MB (7913472 512 byte sectors: 255H 63S/T 492C) > > i haven't used it for quite a while, but it used to work just fine > > (yes > > with usb2). but since then i've updated my kernel a couple of times > > and now > > i'm getting these errors. i can mount the device just fine, but if > > i try to > > copy files onto it i get the following error messages: > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54083584, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54149120, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54214656, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54280192, > > length=32768)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54312960, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54329344, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54394880, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54460416, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54525952, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54591488, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54657024, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=512, > > length=512)]error = 5 > > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=24576, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=28672, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=1024000, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=1028096, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=38502400, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=39370752, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: fsync: giving up on dirty > > Jul 28 11:22:07 otaku kernel: 0xcc0aa6b8: tag msdosfs, type VREG > > Jul 28 11:22:07 otaku kernel: usecount 1, writecount 0, refcount 55 > > mountedhere 0 > > Jul 28 11:22:07 otaku kernel: flags () > > Jul 28 11:22:07 otaku kernel: v_object 0xc8a81770 ref 0 pages 212 > > Jul 28 11:22:07 otaku kernel: lock type msdosfs: EXCL by thread > > 0xcc60a240 > > (pid 19448) > > Jul 28 11:22:07 otaku kernel: #0 0xc05b5ee0 at __lockmgr_args+0xb90 > > Jul 28 11:22:07 otaku kernel: #1 0xc0647898 at vop_stdlock+0x68 > > Jul 28 11:22:07 otaku kernel: #2 0xc0781fb5 at VOP_LOCK1_APV+0xb5 > > Jul 28 11:22:07 otaku kernel: #3 0xc0664008 at _vn_lock+0x78 > > Jul 28 11:22:07 otaku kernel: #4 0xc0658adb at vget+0xbb > > Jul 28 11:22:07 otaku kernel: #5 0xc055d4ca at msdosfs_sync+0x17a > > Jul 28 11:22:07 otaku kernel: #6 0xc06520be at dounmount+0x44e > > Jul 28 11:22:07 otaku kernel: #7 0xc065262f at unmount+0x2bf > > Jul 28 11:22:07 otaku kernel: #8 0xc076eb26 at syscall+0x2a6 > > Jul 28 11:22:07 otaku kernel: #9 0xc0752ad0 at > > Xint0x80_syscall+0x20 > > Jul 28 11:22:07 otaku kernel: startcluster 2230, dircluster 2229, > > diroffset > > 96, on dev da0 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=53805056, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=53870592, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=53936128, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54001664, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54067200, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54132736, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54198272, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54263808, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54329344, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54394880, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54460416, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54525952, > > length=65536)]error = 5 > > might the device's ram be broken? this is the result of `dd > > if=/dev/da0 > > of=/dev/null`: > > dd: /dev/da0: Input/output error > > 1067+0 records in > > 1067+0 records out > > 546304 bytes transferred in 235.522107 secs (2320 bytes/sec) > ^^ terribly slow > disk ? no actually. it's a high speed usb2 device: ugen7.2: at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x0492 idProduct = 0x0140 bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 <000000F1F1000> bNumConfigurations = 0x0001 > > i attached the device to a windows xp box and ran scandisk. that > > didn't > > reveal any problems however. > Hi, > Try enabling umass debugging: > sysctl hw.usb.umass.debug=-1 > Not sure if this might be a CAM layer regression. > --HPS ok. i set hw.usb.umass.debug = 1. i unplugged the device, plugged it in again, mounted it and copied some files onto it (which failed). unmounting the device doesn't work: umount: unmount of /mnt/umass failed: Resource temporarily unavailable i didn't try umount with the -f switch since that locks up the whole machine. so here's the output: Jul 29 22:42:19 otaku kernel: ugen7.2: at usbus7 (disconnected) Jul 29 22:42:19 otaku kernel: umass0: at uhub7, port 2, addr 2 (disconnected) Jul 29 22:42:19 otaku kernel: (da0:umass-sim0:0:0:0): lost device Jul 29 22:42:19 otaku kernel: (da0:umass-sim0:0:0:0): removing device entry Jul 29 22:42:33 otaku sudo: arundel : TTY=pts/5 ; PWD=/usr/home/arundel ; USER=root ; COMMAND=/sbin/sysctl hw.usb.umass.debug=1 Jul 29 22:42:52 otaku kernel: ugen7.2: at usbus7 Jul 29 22:42:52 otaku kernel: umass0: on usbus7 Jul 29 22:42:52 otaku kernel: umass0: SCSI over Bulk-Only; quirks = 0x4400 Jul 29 22:42:52 otaku root: Unknown USB device: vendor 0x0492 product 0x0140 bus uhub7 Jul 29 22:42:54 otaku kernel: umass0:7:0:-1: Attached to scbus7 Jul 29 22:42:54 otaku hald[1146]: 22:42:54.448 [W] hf-block.c:49: unable to stat /dev/probe0: No such file or directory Jul 29 22:42:54 otaku kernel: xptioctl: pass driver is not in the kernel Jul 29 22:42:54 otaku kernel: xptioctl: put "device pass" in your kernel config file Jul 29 22:42:55 otaku kernel: da0 at umass-sim0 bus 0 target 0 lun 0 Jul 29 22:42:55 otaku kernel: da0: < > Removable Direct Access SCSI-2 device Jul 29 22:42:55 otaku kernel: da0: 40.000MB/s transfers Jul 29 22:42:55 otaku kernel: da0: 3864MB (7913472 512 byte sectors: 255H 63S/T 492C) Jul 29 22:43:21 otaku sudo: arundel : TTY=pts/5 ; PWD=/usr/home/arundel ; USER=root ; COMMAND=/sbin/mount -t msdosfs /dev/da0 /mnt/umass/ Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=150716416, length=65536)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=150781952, length=65536)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=150847488, length=65536)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=150913024, length=65536)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=150978560, length=65536)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=151044096, length=65536)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=151109632, length=65536)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=151175168, length=65536)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=151240704, length=65536)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=151306240, length=65536)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=151371776, length=65536)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=151437312, length=65536)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=512, length=512)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=49152, length=4096)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=1048576, length=4096)]error = 5 Jul 29 22:47:26 otaku kernel: g_vfs_done():da0[WRITE(offset=150650880, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=151568384, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=151633920, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=151699456, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=151764992, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=151830528, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=151896064, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=151961600, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=152027136, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=152092672, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=152158208, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=152223744, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=152289280, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=152354816, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=152420352, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=152485888, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=152551424, length=65536)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=26853376, length=16384)]error = 5 Jul 29 22:47:54 otaku kernel: g_vfs_done():da0[WRITE(offset=151502848, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=152682496, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=152748032, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=152813568, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=152879104, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=152944640, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=153010176, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=153075712, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=153141248, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=153206784, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=153272320, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=153337856, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=153403392, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=153468928, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=153534464, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=153600000, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=153665536, length=65536)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=512, length=512)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=49152, length=4096)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=53248, length=4096)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=1048576, length=4096)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=1052672, length=4096)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=26853376, length=16384)]error = 5 Jul 29 22:48:22 otaku kernel: g_vfs_done():da0[WRITE(offset=152616960, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=153796608, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=153862144, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=153927680, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=153993216, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=154058752, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=154124288, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=154189824, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=154255360, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=154320896, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=154386432, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=154451968, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=154517504, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=154583040, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=154648576, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=154714112, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=154779648, length=65536)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=26853376, length=16384)]error = 5 Jul 29 22:48:49 otaku kernel: g_vfs_done():da0[WRITE(offset=153731072, length=65536)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=512, length=512)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=24576, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=28672, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=32768, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=36864, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=40960, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=45056, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=49152, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=53248, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=1024000, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=1028096, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=1032192, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=1036288, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=1040384, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=1044480, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=1048576, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=1052672, length=4096)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=26853376, length=16384)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=143360000, length=16384)]error = 5 Jul 29 22:49:17 otaku kernel: g_vfs_done():da0[WRITE(offset=154845184, length=65536)]error = 5 Jul 29 22:49:45 otaku kernel: g_vfs_done():da0[WRITE(offset=26853376, length=16384)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=24576, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=28672, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=32768, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=36864, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=40960, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=45056, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=49152, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=53248, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=1024000, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=1028096, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=1032192, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=1036288, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=1040384, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=1044480, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=1048576, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=1052672, length=4096)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=26853376, length=16384)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=143360000, length=16384)]error = 5 Jul 29 22:50:15 otaku kernel: g_vfs_done():da0[WRITE(offset=512, length=512)]error = 5 Jul 29 22:50:25 otaku sudo: arundel : TTY=pts/6 ; PWD=/usr/home/arundel ; USER=root ; COMMAND=/sbin/umount /mnt/umass/ Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=24576, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=28672, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=32768, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=36864, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=40960, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=45056, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=49152, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=53248, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=1024000, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=1028096, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=1032192, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=1036288, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=1040384, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=1044480, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=1048576, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=1052672, length=4096)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=26853376, length=16384)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=143360000, length=16384)]error = 5 Jul 29 22:50:53 otaku kernel: g_vfs_done():da0[WRITE(offset=512, length=512)]error = 5 Jul 29 22:50:53 otaku kernel: fsync: giving up on dirty Jul 29 22:50:53 otaku kernel: 0xc9f42ac0: tag devfs, type VCHR Jul 29 22:50:53 otaku kernel: usecount 1, writecount 0, refcount 23 mountedhere 0xc9019900 Jul 29 22:50:53 otaku kernel: flags () Jul 29 22:50:53 otaku kernel: v_object 0xcb726e58 ref 0 pages 288 Jul 29 22:50:53 otaku kernel: lock type devfs: EXCL by thread 0xc936db40 (pid 4752) Jul 29 22:50:53 otaku kernel: #0 0xc05b6b80 at __lockmgr_args+0xb90 Jul 29 22:50:53 otaku kernel: #1 0xc06486c8 at vop_stdlock+0x68 Jul 29 22:50:53 otaku kernel: #2 0xc0783475 at VOP_LOCK1_APV+0xb5 Jul 29 22:50:53 otaku kernel: #3 0xc0664e38 at _vn_lock+0x78 Jul 29 22:50:53 otaku kernel: #4 0xc055e13c at msdosfs_sync+0x29c Jul 29 22:50:53 otaku kernel: #5 0xc0652eee at dounmount+0x44e Jul 29 22:50:53 otaku kernel: #6 0xc065345f at unmount+0x2bf Jul 29 22:50:53 otaku kernel: #7 0xc076ffe6 at syscall+0x2a6 Jul 29 22:50:53 otaku kernel: #8 0xc0753f00 at Xint0x80_syscall+0x20 Jul 29 22:50:53 otaku kernel: dev da0 what i'm trying now is to complely wipe the ram using `dd of=/dev/zero of=/dev/da0`, format it and see if that solves the issue. alex From owner-freebsd-usb@FreeBSD.ORG Wed Jul 29 21:19:55 2009 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 A9C92106566C for ; Wed, 29 Jul 2009 21:19:55 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out2.uni-muenster.de (ZIVM-OUT2.UNI-MUENSTER.DE [128.176.192.9]) by mx1.freebsd.org (Postfix) with ESMTP id D7C158FC25 for ; Wed, 29 Jul 2009 21:19:54 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.43,290,1246831200"; d="scan'208";a="220014123" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay2.uni-muenster.de with ESMTP; 29 Jul 2009 23:19:53 +0200 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id B05E01B0751; Wed, 29 Jul 2009 23:19:53 +0200 (CEST) Date: Wed, 29 Jul 2009 23:19:53 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Hans Petter Selasky , Message-ID: In-Reply-To: <200907292236.04773.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: problem writing to umass 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: Wed, 29 Jul 2009 21:19:55 -0000 seems i need to reboot. since i wasn't able to unmount the device i unplugged it and tried plugging it in again. but it doesn't get recognised at all. no attach message or anything like that even after attaching it to a different usb port. i'm sure at the end the only option is to trigger the reset button. doing `reboot` hangs after the message "all disks synched". although the message is being displayed the synched disks don't get marked as clean, because after a reboot all my harddrives are being being fsck'ed because they weren't dismounted properly. oh...and btw: if i try `umount /mnt/umass` after detaching the device umount prints this: Jul 29 23:08:42 otaku kernel: g_vfs_done():da0[WRITE(offset=16384, length=4096)]error = 6 then it hangs forever. killing the umount process isn't possible. alex Hans Petter Selasky schrieb am 2009-07-29: > On Wednesday 29 July 2009 22:25:05 Alexander Best wrote: > > i have a problem with the following device: > > ugen7.2: at usbus7 > > umass0: > addr 2> > > on usbus7 > > umass0: SCSI over Bulk-Only; quirks = 0x4400 > > umass0:7:0:-1: Attached to scbus7 > > da0 at umass-sim0 bus 0 target 0 lun 0 > > da0: < > Removable Direct Access SCSI-2 device > > da0: 40.000MB/s transfers > > da0: 3864MB (7913472 512 byte sectors: 255H 63S/T 492C) > > i haven't used it for quite a while, but it used to work just fine > > (yes > > with usb2). but since then i've updated my kernel a couple of times > > and now > > i'm getting these errors. i can mount the device just fine, but if > > i try to > > copy files onto it i get the following error messages: > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54083584, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54149120, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54214656, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54280192, > > length=32768)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54312960, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54329344, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54394880, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54460416, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54525952, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54591488, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54657024, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=512, > > length=512)]error = 5 > > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=24576, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=28672, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=1024000, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=1028096, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=38502400, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=39370752, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: fsync: giving up on dirty > > Jul 28 11:22:07 otaku kernel: 0xcc0aa6b8: tag msdosfs, type VREG > > Jul 28 11:22:07 otaku kernel: usecount 1, writecount 0, refcount 55 > > mountedhere 0 > > Jul 28 11:22:07 otaku kernel: flags () > > Jul 28 11:22:07 otaku kernel: v_object 0xc8a81770 ref 0 pages 212 > > Jul 28 11:22:07 otaku kernel: lock type msdosfs: EXCL by thread > > 0xcc60a240 > > (pid 19448) > > Jul 28 11:22:07 otaku kernel: #0 0xc05b5ee0 at __lockmgr_args+0xb90 > > Jul 28 11:22:07 otaku kernel: #1 0xc0647898 at vop_stdlock+0x68 > > Jul 28 11:22:07 otaku kernel: #2 0xc0781fb5 at VOP_LOCK1_APV+0xb5 > > Jul 28 11:22:07 otaku kernel: #3 0xc0664008 at _vn_lock+0x78 > > Jul 28 11:22:07 otaku kernel: #4 0xc0658adb at vget+0xbb > > Jul 28 11:22:07 otaku kernel: #5 0xc055d4ca at msdosfs_sync+0x17a > > Jul 28 11:22:07 otaku kernel: #6 0xc06520be at dounmount+0x44e > > Jul 28 11:22:07 otaku kernel: #7 0xc065262f at unmount+0x2bf > > Jul 28 11:22:07 otaku kernel: #8 0xc076eb26 at syscall+0x2a6 > > Jul 28 11:22:07 otaku kernel: #9 0xc0752ad0 at > > Xint0x80_syscall+0x20 > > Jul 28 11:22:07 otaku kernel: startcluster 2230, dircluster 2229, > > diroffset > > 96, on dev da0 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=53805056, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=53870592, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=53936128, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54001664, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54067200, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54132736, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54198272, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54263808, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54329344, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54394880, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54460416, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54525952, > > length=65536)]error = 5 > > might the device's ram be broken? this is the result of `dd > > if=/dev/da0 > > of=/dev/null`: > > dd: /dev/da0: Input/output error > > 1067+0 records in > > 1067+0 records out > > 546304 bytes transferred in 235.522107 secs (2320 bytes/sec) > ^^ terribly slow > disk ? > > i attached the device to a windows xp box and ran scandisk. that > > didn't > > reveal any problems however. > Hi, > Try enabling umass debugging: > sysctl hw.usb.umass.debug=-1 > Not sure if this might be a CAM layer regression. > --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Jul 29 21:45:12 2009 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 CD7991065670 for ; Wed, 29 Jul 2009 21:45:12 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out2.uni-muenster.de (ZIVM-OUT2.UNI-MUENSTER.DE [128.176.192.9]) by mx1.freebsd.org (Postfix) with ESMTP id 024988FC13 for ; Wed, 29 Jul 2009 21:45:11 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.43,290,1246831200"; d="scan'208";a="220015435" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay2.uni-muenster.de with ESMTP; 29 Jul 2009 23:45:10 +0200 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id DD2B31B0751; Wed, 29 Jul 2009 23:45:10 +0200 (CEST) Date: Wed, 29 Jul 2009 23:45:10 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Hans Petter Selasky , Message-ID: In-Reply-To: <200907292236.04773.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: problem writing to umass 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: Wed, 29 Jul 2009 21:45:13 -0000 damn. just say that i overlooked the minus. so instead of setting "sysctl hw.usb.umass.debug=-1" i did in fact do "sysctl hw.usb.umass.debug=1". sorry for that. i'll send you a new output after i'm done blanking and reformatting the umass device. alex Hans Petter Selasky schrieb am 2009-07-29: > On Wednesday 29 July 2009 22:25:05 Alexander Best wrote: > > i have a problem with the following device: > > ugen7.2: at usbus7 > > umass0: > addr 2> > > on usbus7 > > umass0: SCSI over Bulk-Only; quirks = 0x4400 > > umass0:7:0:-1: Attached to scbus7 > > da0 at umass-sim0 bus 0 target 0 lun 0 > > da0: < > Removable Direct Access SCSI-2 device > > da0: 40.000MB/s transfers > > da0: 3864MB (7913472 512 byte sectors: 255H 63S/T 492C) > > i haven't used it for quite a while, but it used to work just fine > > (yes > > with usb2). but since then i've updated my kernel a couple of times > > and now > > i'm getting these errors. i can mount the device just fine, but if > > i try to > > copy files onto it i get the following error messages: > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54083584, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54149120, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54214656, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54280192, > > length=32768)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54312960, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54329344, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54394880, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54460416, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54525952, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54591488, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54657024, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=512, > > length=512)]error = 5 > > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=24576, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=28672, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=1024000, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=1028096, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=38502400, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=39370752, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: fsync: giving up on dirty > > Jul 28 11:22:07 otaku kernel: 0xcc0aa6b8: tag msdosfs, type VREG > > Jul 28 11:22:07 otaku kernel: usecount 1, writecount 0, refcount 55 > > mountedhere 0 > > Jul 28 11:22:07 otaku kernel: flags () > > Jul 28 11:22:07 otaku kernel: v_object 0xc8a81770 ref 0 pages 212 > > Jul 28 11:22:07 otaku kernel: lock type msdosfs: EXCL by thread > > 0xcc60a240 > > (pid 19448) > > Jul 28 11:22:07 otaku kernel: #0 0xc05b5ee0 at __lockmgr_args+0xb90 > > Jul 28 11:22:07 otaku kernel: #1 0xc0647898 at vop_stdlock+0x68 > > Jul 28 11:22:07 otaku kernel: #2 0xc0781fb5 at VOP_LOCK1_APV+0xb5 > > Jul 28 11:22:07 otaku kernel: #3 0xc0664008 at _vn_lock+0x78 > > Jul 28 11:22:07 otaku kernel: #4 0xc0658adb at vget+0xbb > > Jul 28 11:22:07 otaku kernel: #5 0xc055d4ca at msdosfs_sync+0x17a > > Jul 28 11:22:07 otaku kernel: #6 0xc06520be at dounmount+0x44e > > Jul 28 11:22:07 otaku kernel: #7 0xc065262f at unmount+0x2bf > > Jul 28 11:22:07 otaku kernel: #8 0xc076eb26 at syscall+0x2a6 > > Jul 28 11:22:07 otaku kernel: #9 0xc0752ad0 at > > Xint0x80_syscall+0x20 > > Jul 28 11:22:07 otaku kernel: startcluster 2230, dircluster 2229, > > diroffset > > 96, on dev da0 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=53805056, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=53870592, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=53936128, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54001664, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54067200, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54132736, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54198272, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54263808, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54329344, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54394880, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54460416, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54525952, > > length=65536)]error = 5 > > might the device's ram be broken? this is the result of `dd > > if=/dev/da0 > > of=/dev/null`: > > dd: /dev/da0: Input/output error > > 1067+0 records in > > 1067+0 records out > > 546304 bytes transferred in 235.522107 secs (2320 bytes/sec) > ^^ terribly slow > disk ? > > i attached the device to a windows xp box and ran scandisk. that > > didn't > > reveal any problems however. > Hi, > Try enabling umass debugging: > sysctl hw.usb.umass.debug=-1 > Not sure if this might be a CAM layer regression. > --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Jul 29 23:28:36 2009 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 6CDDE10656B1 for ; Wed, 29 Jul 2009 23:28:36 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out3.uni-muenster.de (ZIVM-OUT3.UNI-MUENSTER.DE [128.176.192.18]) by mx1.freebsd.org (Postfix) with ESMTP id 94D548FC1F for ; Wed, 29 Jul 2009 23:28:35 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.43,290,1246831200"; d="scan'208";a="9729870" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay3.uni-muenster.de with ESMTP; 30 Jul 2009 01:28:33 +0200 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id E43991B008C; Thu, 30 Jul 2009 01:28:33 +0200 (CEST) Date: Thu, 30 Jul 2009 01:28:33 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Hans Petter Selasky , Message-ID: In-Reply-To: <200907292236.04773.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: problem writing to umass 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: Wed, 29 Jul 2009 23:28:36 -0000 here are some input/output benchmark measurements i did. don't know why the device returned the slow result you noticed. but the following values seem quite reasonable. maybe the previous results turned out so bad, because in the background the writes which `cp` requested were still being processed although `cp` was no longer active. so `dd` had no exclusive access to /dev/da0 and probably a much lower priority than the writes `cp` requested. write speed: ------------ [arundel@otaku /usr/home/arundel]$ dd if=/dev/zero of=/dev/da0 count=2048 2048+0 records in 2048+0 records out 1048576 bytes transferred in 5.899281 secs (177746 bytes/sec) [arundel@otaku /usr/home/arundel]$ dd if=/dev/zero of=/dev/da0 bs=1m count=50 50+0 records in 50+0 records out 52428800 bytes transferred in 6.714179 secs (7808669 bytes/sec) [arundel@otaku /usr/home/arundel]$ dd if=/dev/zero of=/dev/da0 bs=2m count=25 25+0 records in 25+0 records out 52428800 bytes transferred in 6.418867 secs (8167921 bytes/sec) [arundel@otaku /usr/home/arundel]$ dd if=/dev/zero of=/dev/da0 bs=5m count=10 10+0 records in 10+0 records out 52428800 bytes transferred in 6.448783 secs (8130030 bytes/sec) [arundel@otaku /usr/home/arundel]$ dd if=/dev/zero of=/dev/da0 bs=10m count=5 5+0 records in 5+0 records out 52428800 bytes transferred in 6.462789 secs (8112411 bytes/sec) read speed: ----------- [arundel@otaku /usr/home/arundel]$ dd if=/dev/da0 of=/dev/null count=2048 2048+0 records in 2048+0 records out 1048576 bytes transferred in 1.461135 secs (717645 bytes/sec) [arundel@otaku /usr/home/arundel]$ dd if=/dev/da0 of=/dev/null bs=10m count=5 5+0 records in 5+0 records out 52428800 bytes transferred in 9.399185 secs (5578016 bytes/sec) [arundel@otaku /usr/home/arundel]$ dd if=/dev/da0 of=/dev/null bs=5m count=10 10+0 records in 10+0 records out 52428800 bytes transferred in 9.394816 secs (5580610 bytes/sec) [arundel@otaku /usr/home/arundel]$ dd if=/dev/da0 of=/dev/null bs=2m count=25 25+0 records in 25+0 records out 52428800 bytes transferred in 9.498048 secs (5519955 bytes/sec) [arundel@otaku /usr/home/arundel]$ dd if=/dev/da0 of=/dev/null bs=1m count=50 50+0 records in 50+0 records out 52428800 bytes transferred in 9.434601 secs (5557077 bytes/sec) so. i've blanked the device using dd without any errors. i formated it then tried the following with hw.usb.umass.debug=-1: 1. mount 2. copy files 3. umount (which hung) i've mailed you the ouput in a separate mail. two more things i noticed: 1. while copying files to the device i noticed that harddrive access which was being performed by fsck completely stopped until i detached the usb device. 2. in addition to not being able to attach a usb device again, `sysctl` got stuck after the following output: kern.ostype: FreeBSD kern.osrelease: 8.0-BETA2 kern.osrevision: 199506 kern.version: FreeBSD 8.0-BETA2 #0 r195923M: Tue Jul 28 22:20:15 CEST 2009 root@otaku:/usr/obj/usr/src/sys/ARUNDEL kern.maxvnodes: 100000 kern.maxproc: 6164 kern.maxfiles: 12328 kern.argmax: 262144 kern.securelevel: -1 kern.hostname: otaku kern.hostid: 1391670824 kern.clockrate: { hz = 1000, tick = 1000, profhz = 2000, stathz = 133 } kern.posix1version: 200112 kern.ngroups: 1023 kern.job_control: 1 kern.saved_ids: 0 kern.boottime: { sec = 1248902591, usec = 78085 } Wed Jul 29 23:23:11 2009 kern.domainname: kern.osreldate: 800106 kern.bootfile: /boot/kernel/kernel kern.maxfilesperproc: 11095 kern.maxprocperuid: 5547 kern.ipc.maxsockbuf: 262144 kern.ipc.sockbuf_waste_factor: 8 kern.ipc.somaxconn: 128 kern.ipc.max_linkhdr: 40 kern.ipc.max_protohdr: 40 kern.ipc.max_hdr: 80 kern.ipc.max_datalen: 120 kern.ipc.nmbjumbo16: 3200 kern.ipc.nmbjumbo9: 6400 kern.ipc.nmbjumbop: 12800 kern.ipc.nmbclusters: 25600 kern.ipc.piperesizeallowed: 1 kern.ipc.piperesizefail: 0 kern.ipc.pipeallocfail: 0 kern.ipc.pipefragretry: 0 kern.ipc.pipekva: 163840 kern.ipc.maxpipekva: 16777216 kern.ipc.msgseg: 2048 kern.ipc.msgssz: 8 kern.ipc.msgtql: 40 kern.ipc.msgmnb: 2048 kern.ipc.msgmni: 40 kern.ipc.msgmax: 16384 kern.ipc.semaem: 16384 kern.ipc.semvmx: 32767 kern.ipc.semusz: 136 kern.ipc.semume: 10 kern.ipc.semopm: 100 kern.ipc.semmsl: 60 kern.ipc.semmnu: 30 kern.ipc.semmns: 60 kern.ipc.semmni: 10 kern.ipc.semmap: 30 kern.ipc.shm_allow_removed: 1 kern.ipc.shm_use_phys: 0 kern.ipc.shmall: 32768 kern.ipc.shmseg: 512 kern.ipc.shmmni: 192 kern.ipc.shmmin: 1 kern.ipc.shmmax: 67108864 kern.ipc.maxsockets: 25600 kern.ipc.numopensockets: 98 kern.ipc.nsfbufsused: 0 kern.ipc.nsfbufspeak: 6 kern.ipc.nsfbufs: 6656 kern.dummy: 0 kern.ps_strings: 3217031152 kern.usrstack: 3217031168 kern.logsigexit: 1 kern.iov_max: 1024 kern.hostuuid: 00000000-0000-0000-0000-001a4d4bb4eb kern.cam.cam_srch_hi: 0 kern.cam.scsi_delay: 2000 kern.cam.cd.retry_count: 4 kern.cam.cd.changer.max_busy_seconds: 15 kern.cam.cd.changer.min_busy_seconds: 5 kern.cam.cd.0.minimum_cmd_size: 10 kern.cam.ada.ada_send_ordered: 1 kern.cam.ada.default_timeout: 30 kern.cam.ada.retry_count: 4 kern.cam.da.da_send_ordered: 1 kern.cam.da.default_timeout: 60 kern.cam.da.retry_count: 4 kern.cam.da.0.minimum_cmd_size: 10 i guess the next line would have been usb related. cheers. alex Hans Petter Selasky schrieb am 2009-07-29: > On Wednesday 29 July 2009 22:25:05 Alexander Best wrote: > > i have a problem with the following device: > > ugen7.2: at usbus7 > > umass0: > addr 2> > > on usbus7 > > umass0: SCSI over Bulk-Only; quirks = 0x4400 > > umass0:7:0:-1: Attached to scbus7 > > da0 at umass-sim0 bus 0 target 0 lun 0 > > da0: < > Removable Direct Access SCSI-2 device > > da0: 40.000MB/s transfers > > da0: 3864MB (7913472 512 byte sectors: 255H 63S/T 492C) > > i haven't used it for quite a while, but it used to work just fine > > (yes > > with usb2). but since then i've updated my kernel a couple of times > > and now > > i'm getting these errors. i can mount the device just fine, but if > > i try to > > copy files onto it i get the following error messages: > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54083584, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54149120, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54214656, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54280192, > > length=32768)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54312960, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54329344, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54394880, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54460416, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54525952, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54591488, > > length=65536)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54657024, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=512, > > length=512)]error = 5 > > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=24576, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: g_vfs_done():da0[WRITE(offset=28672, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=1024000, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=1028096, > > length=4096)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=38502400, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: > > g_vfs_done():da0[WRITE(offset=39370752, > > length=16384)]error = 5 > > Jul 28 11:22:07 otaku kernel: fsync: giving up on dirty > > Jul 28 11:22:07 otaku kernel: 0xcc0aa6b8: tag msdosfs, type VREG > > Jul 28 11:22:07 otaku kernel: usecount 1, writecount 0, refcount 55 > > mountedhere 0 > > Jul 28 11:22:07 otaku kernel: flags () > > Jul 28 11:22:07 otaku kernel: v_object 0xc8a81770 ref 0 pages 212 > > Jul 28 11:22:07 otaku kernel: lock type msdosfs: EXCL by thread > > 0xcc60a240 > > (pid 19448) > > Jul 28 11:22:07 otaku kernel: #0 0xc05b5ee0 at __lockmgr_args+0xb90 > > Jul 28 11:22:07 otaku kernel: #1 0xc0647898 at vop_stdlock+0x68 > > Jul 28 11:22:07 otaku kernel: #2 0xc0781fb5 at VOP_LOCK1_APV+0xb5 > > Jul 28 11:22:07 otaku kernel: #3 0xc0664008 at _vn_lock+0x78 > > Jul 28 11:22:07 otaku kernel: #4 0xc0658adb at vget+0xbb > > Jul 28 11:22:07 otaku kernel: #5 0xc055d4ca at msdosfs_sync+0x17a > > Jul 28 11:22:07 otaku kernel: #6 0xc06520be at dounmount+0x44e > > Jul 28 11:22:07 otaku kernel: #7 0xc065262f at unmount+0x2bf > > Jul 28 11:22:07 otaku kernel: #8 0xc076eb26 at syscall+0x2a6 > > Jul 28 11:22:07 otaku kernel: #9 0xc0752ad0 at > > Xint0x80_syscall+0x20 > > Jul 28 11:22:07 otaku kernel: startcluster 2230, dircluster 2229, > > diroffset > > 96, on dev da0 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=53805056, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=53870592, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=53936128, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54001664, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54067200, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54132736, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54198272, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54263808, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54329344, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54394880, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54460416, > > length=65536)]error = 5 > > Jul 28 11:22:40 otaku kernel: > > g_vfs_done():da0[WRITE(offset=54525952, > > length=65536)]error = 5 > > might the device's ram be broken? this is the result of `dd > > if=/dev/da0 > > of=/dev/null`: > > dd: /dev/da0: Input/output error > > 1067+0 records in > > 1067+0 records out > > 546304 bytes transferred in 235.522107 secs (2320 bytes/sec) > ^^ terribly slow > disk ? > > i attached the device to a windows xp box and ran scandisk. that > > didn't > > reveal any problems however. > Hi, > Try enabling umass debugging: > sysctl hw.usb.umass.debug=-1 > Not sure if this might be a CAM layer regression. > --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Jul 30 00:20:07 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3D311065677 for ; Thu, 30 Jul 2009 00:20:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DC0BC8FC23 for ; Thu, 30 Jul 2009 00:20:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6U0K6VC021556 for ; Thu, 30 Jul 2009 00:20:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6U0K6er021555; Thu, 30 Jul 2009 00:20:06 GMT (envelope-from gnats) Date: Thu, 30 Jul 2009 00:20:06 GMT Message-Id: <200907300020.n6U0K6er021555@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: usb/125264: commit references a PR X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2009 00:20:07 -0000 The following reply was made to PR usb/125264; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/125264: commit references a PR Date: Thu, 30 Jul 2009 00:13:23 +0000 (UTC) Author: alfred Date: Thu Jul 30 00:13:09 2009 New Revision: 195959 URL: http://svn.freebsd.org/changeset/base/195959 Log: USB input - add support for setting the UMS polling rate through -F option passed to moused. - requested by Alexander Best - P4 ID: 166075 PR: usb/125264 Submitted by: hps Approved by: re Modified: head/sys/dev/usb/input/ums.c Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Thu Jul 30 00:12:47 2009 (r195958) +++ head/sys/dev/usb/input/ums.c Thu Jul 30 00:13:09 2009 (r195959) @@ -140,6 +140,8 @@ struct ums_softc { struct usb_xfer *sc_xfer[UMS_N_TRANSFER]; + int sc_pollrate; + uint8_t sc_buttons; uint8_t sc_iid; uint8_t sc_temp[64]; @@ -188,6 +190,7 @@ ums_intr_callback(struct usb_xfer *xfer, struct usb_page_cache *pc; uint8_t *buf = sc->sc_temp; int32_t buttons = 0; + int32_t buttons_found = 0; int32_t dw = 0; int32_t dx = 0; int32_t dy = 0; @@ -263,16 +266,24 @@ ums_intr_callback(struct usb_xfer *xfer, dt -= hid_get_data(buf, len, &info->sc_loc_t); for (i = 0; i < info->sc_buttons; i++) { + uint32_t mask; + mask = 1UL << UMS_BUT(i); + /* check for correct button ID */ if (id != info->sc_iid_btn[i]) continue; - if (hid_get_data(buf, len, &info->sc_loc_btn[i])) { - buttons |= (1 << UMS_BUT(i)); - } + /* check for button pressed */ + if (hid_get_data(buf, len, &info->sc_loc_btn[i])) + buttons |= mask; + /* register button mask */ + buttons_found |= mask; } if (++info != &sc->sc_info[UMS_INFO_MAX]) goto repeat; + /* keep old button value(s) for non-detected buttons */ + buttons |= sc->sc_status.button & ~buttons_found; + if (dx || dy || dz || dt || dw || (buttons != sc->sc_status.button)) { @@ -514,6 +525,8 @@ ums_attach(device_t dev) DPRINTF("error=%s\n", usbd_errstr(err)); goto detach; } + + /* Get HID descriptor */ err = usbd_req_get_hid_desc(uaa->device, NULL, &d_ptr, &d_len, M_TEMP, uaa->info.bIfaceIndex); @@ -531,6 +544,9 @@ ums_attach(device_t dev) * it has two addional buttons and a tilt wheel. */ if (usb_test_quirk(uaa, UQ_MS_BAD_CLASS)) { + + sc->sc_iid = 0; + info = &sc->sc_info[0]; info->sc_flags = (UMS_FLAG_X_AXIS | UMS_FLAG_Y_AXIS | @@ -540,11 +556,17 @@ ums_attach(device_t dev) isize = 5; /* 1st byte of descriptor report contains garbage */ info->sc_loc_x.pos = 16; + info->sc_loc_x.size = 8; info->sc_loc_y.pos = 24; + info->sc_loc_y.size = 8; info->sc_loc_z.pos = 32; + info->sc_loc_z.size = 8; info->sc_loc_btn[0].pos = 8; + info->sc_loc_btn[0].size = 1; info->sc_loc_btn[1].pos = 9; + info->sc_loc_btn[1].size = 1; info->sc_loc_btn[2].pos = 10; + info->sc_loc_btn[2].size = 1; /* Announce device */ device_printf(dev, "3 buttons and [XYZ] " @@ -653,6 +675,23 @@ static void ums_start_read(struct usb_fifo *fifo) { struct ums_softc *sc = usb_fifo_softc(fifo); + int rate; + + /* Check if we should override the default polling interval */ + rate = sc->sc_pollrate; + /* Range check rate */ + if (rate > 1000) + rate = 1000; + /* Check for set rate */ + if ((rate > 0) && (sc->sc_xfer[UMS_INTR_DT] != NULL)) { + DPRINTF("Setting pollrate = %d\n", rate); + /* Stop current transfer, if any */ + usbd_transfer_stop(sc->sc_xfer[UMS_INTR_DT]); + /* Set new interval */ + usbd_xfer_set_interval(sc->sc_xfer[UMS_INTR_DT], 1000 / rate); + /* Only set pollrate once */ + sc->sc_pollrate = 0; + } usbd_transfer_start(sc->sc_xfer[UMS_INTR_DT]); } @@ -791,6 +830,9 @@ ums_ioctl(struct usb_fifo *fifo, u_long sc->sc_mode.level = mode.level; } + /* store polling rate */ + sc->sc_pollrate = mode.rate; + if (sc->sc_mode.level == 0) { if (sc->sc_buttons > MOUSE_MSC_MAXBUTTON) sc->sc_hw.buttons = MOUSE_MSC_MAXBUTTON; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Thu Jul 30 00:20:09 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 117861065673 for ; Thu, 30 Jul 2009 00:20:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F35FA8FC08 for ; Thu, 30 Jul 2009 00:20:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6U0K8bF021588 for ; Thu, 30 Jul 2009 00:20:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6U0K8G3021587; Thu, 30 Jul 2009 00:20:08 GMT (envelope-from gnats) Date: Thu, 30 Jul 2009 00:20:08 GMT Message-Id: <200907300020.n6U0K8G3021587@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: usb/136761: commit references a PR X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2009 00:20:09 -0000 The following reply was made to PR usb/136761; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/136761: commit references a PR Date: Thu, 30 Jul 2009 00:15:27 +0000 (UTC) Author: alfred Date: Thu Jul 30 00:15:17 2009 New Revision: 195962 URL: http://svn.freebsd.org/changeset/base/195962 Log: USB serial: - add new ID for Huawei - P4 ID: 166150 PR: usb/136761 Submitted by: hps Approved by: re Modified: head/share/man/man4/u3g.4 head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/share/man/man4/u3g.4 ============================================================================== --- head/share/man/man4/u3g.4 Thu Jul 30 00:14:56 2009 (r195961) +++ head/share/man/man4/u3g.4 Thu Jul 30 00:15:17 2009 (r195962) @@ -64,7 +64,7 @@ Vodafone Mobile Connect Card 3G .It Qualcomm Inc. CDMA MSM .It -Huawei B190, E220 ('') +Huawei B190, E180v, E220 ('') .It Novatel U740, MC950D, X950D, etc. .It Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Thu Jul 30 00:14:56 2009 (r195961) +++ head/sys/dev/usb/serial/u3g.c Thu Jul 30 00:15:17 2009 (r195962) @@ -186,6 +186,7 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, CDMA_MSM, U3GFL_SCSI_EJECT), /* OEM: Huawei */ U3G_DEV(HUAWEI, MOBILE, U3GFL_HUAWEI_INIT), + U3G_DEV(HUAWEI, E180V, U3GFL_HUAWEI_INIT), U3G_DEV(HUAWEI, E220, U3GFL_HUAWEI_INIT), /* OEM: Novatel */ U3G_DEV(NOVATEL, CDMA_MODEM, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu Jul 30 00:14:56 2009 (r195961) +++ head/sys/dev/usb/usbdevs Thu Jul 30 00:15:17 2009 (r195962) @@ -1115,6 +1115,8 @@ product CYPRESS THERMO 0x0002 thermomet product CYPRESS WISPY1A 0x0bad MetaGeek Wi-Spy product CYPRESS KBDHUB 0x0101 Keyboard/Hub product CYPRESS FMRADIO 0x1002 FM Radio +product CYPRESS IKARILASER 0x121f Ikari Laser SteelSeries ApS + product CYPRESS USBRS232 0x5500 USB-RS232 Interface product CYPRESS SLIM_HUB 0x6560 Slim Hub product CYPRESS XX6830XX 0x6830 PATA Storage Device @@ -1475,6 +1477,7 @@ product HTC SMARTPHONE 0x0a51 SmartPhon /* HUAWEI products */ product HUAWEI MOBILE 0x1001 Huawei Mobile product HUAWEI E220 0x1003 Huawei HSDPA modem +product HUAWEI E180V 0x140c Huawei Mobile E180V /* HUAWEI 3com products */ product HUAWEI3COM WUB320G 0x0009 Aolynk WUB320g _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Thu Jul 30 00:20:11 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93D931065677 for ; Thu, 30 Jul 2009 00:20:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7680C8FC12 for ; Thu, 30 Jul 2009 00:20:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6U0KBSJ021645 for ; Thu, 30 Jul 2009 00:20:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6U0KBQ7021641; Thu, 30 Jul 2009 00:20:11 GMT (envelope-from gnats) Date: Thu, 30 Jul 2009 00:20:11 GMT Message-Id: <200907300020.n6U0KBQ7021641@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: usb/137188: commit references a PR X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2009 00:20:12 -0000 The following reply was made to PR usb/137188; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/137188: commit references a PR Date: Thu, 30 Jul 2009 00:17:20 +0000 (UTC) Author: alfred Date: Thu Jul 30 00:17:08 2009 New Revision: 195967 URL: http://svn.freebsd.org/changeset/base/195967 Log: USB CORE - Improve HID parsing See PR description for more info. Patch is implemented differently than suggested, but having the same result. PR: usb/137188 Submitted by: hps Approved by: re Modified: head/sys/dev/usb/usb_hid.c Modified: head/sys/dev/usb/usb_hid.c ============================================================================== --- head/sys/dev/usb/usb_hid.c Thu Jul 30 00:16:50 2009 (r195966) +++ head/sys/dev/usb/usb_hid.c Thu Jul 30 00:17:08 2009 (r195967) @@ -78,11 +78,19 @@ static uint8_t hid_get_byte(struct hid_d #define MAXUSAGE 64 #define MAXPUSH 4 +#define MAXID 16 + +struct hid_pos_data { + int32_t rid; + uint32_t pos; +}; + struct hid_data { const uint8_t *start; const uint8_t *end; const uint8_t *p; struct hid_item cur[MAXPUSH]; + struct hid_pos_data last_pos[MAXID]; int32_t usages_min[MAXUSAGE]; int32_t usages_max[MAXUSAGE]; int32_t usage_last; /* last seen usage */ @@ -119,6 +127,58 @@ hid_clear_local(struct hid_item *c) c->set_delimiter = 0; } +static void +hid_switch_rid(struct hid_data *s, struct hid_item *c, int32_t next_rID) +{ + uint8_t i; + + /* check for same report ID - optimise */ + + if (c->report_ID == next_rID) + return; + + /* save current position for current rID */ + + if (c->report_ID == 0) { + i = 0; + } else { + for (i = 1; i != MAXID; i++) { + if (s->last_pos[i].rid == c->report_ID) + break; + if (s->last_pos[i].rid == 0) + break; + } + } + if (i != MAXID) { + s->last_pos[i].rid = c->report_ID; + s->last_pos[i].pos = c->loc.pos; + } + + /* store next report ID */ + + c->report_ID = next_rID; + + /* lookup last position for next rID */ + + if (next_rID == 0) { + i = 0; + } else { + for (i = 1; i != MAXID; i++) { + if (s->last_pos[i].rid == next_rID) + break; + if (s->last_pos[i].rid == 0) + break; + } + } + if (i != MAXID) { + s->last_pos[i].rid = next_rID; + c->loc.pos = s->last_pos[i].pos; + } else { + DPRINTF("Out of RID entries, position is set to zero!\n"); + c->loc.pos = 0; + } +} + /*------------------------------------------------------------------------* * hid_start_parse *------------------------------------------------------------------------*/ @@ -373,9 +433,7 @@ hid_get_item(struct hid_data *s, struct s->loc_size = dval & mask; break; case 8: - c->report_ID = dval; - /* new report - reset position */ - c->loc.pos = 0; + hid_switch_rid(s, c, dval); break; case 9: /* mask because value is unsigned */ _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Thu Jul 30 04:28:01 2009 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 C68B61065673; Thu, 30 Jul 2009 04:27:59 +0000 (UTC) (envelope-from jh@sandstorm.net) Received: from sirocco.sandstorm.net (sirocco.sandstorm.net [69.33.111.75]) by mx1.freebsd.org (Postfix) with ESMTP id 757068FC18; Thu, 30 Jul 2009 04:27:59 +0000 (UTC) (envelope-from jh@sandstorm.net) Received: from h19.glup.org (207-172-212-135.c3-0.smr-ubr1.sbo-smr.ma.static.cable.rcn.com [207.172.212.135]) (authenticated bits=0) by sirocco.sandstorm.net (8.13.8/8.13.3) with ESMTP id n6U4Bjqe055155 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 30 Jul 2009 00:11:46 -0400 (EDT) (envelope-from jh@sandstorm.net) Message-ID: <4A711D7C.2060100@sandstorm.net> Date: Thu, 30 Jul 2009 00:11:40 -0400 From: john hood User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Dr Josef Karthauser , freebsd-usb@freebsd.org, freebsd-current@freebsd.org Content-Type: multipart/mixed; boundary="------------050903090106080603080204" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on sirocco.sandstorm.net Cc: Subject: bug fix for aue driver 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, 30 Jul 2009 04:28:02 -0000 This is a multi-part message in MIME format. --------------050903090106080603080204 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I have a D-Link DSB-650 USB ethernet adapter, which uses an ADMtek AN986 USB MAC, a Broadcom BCM5201 PHY device, and the aue driver. Recent versions of FreeBSD (7.1, 7.2, 8 beta 2) all get stuck on "aue0: MII read timed out" errors after you try and bring the interface up. (The system continues to run, but you get long waits performing ioctls on the device, and no actual packets.) I think I've found the problem; the device is getting mis-initialized, and has been ever since the early days of the driver. The old code mis-sets a power-down configuration line on the PHY just as it's resetting it. I think I have a fix; it 1) does the right thing for ADMtek's reference design, 2) matches (better) what the Linux driver does (successfully, for me), 3) matches the actual circuit of the DSB-650, 4) makes sense when you read it. I suspect it will improve the situation for most users of Pegasus-based Ethernet adapters, and probably resolve most of the weird media- and PHY-related issues the driver's had for its entire life. Would people try the attached patch? (If anyone cares much about an obsolete Ethernet adapter-- I used this mostly as an excuse to wade into the USB stack and understand it a little better...) If you get debugging spew, please forward it to me. If it just works (or not), tell me that too. The patch is against 8.0-beta2. It won't apply to the old, pre-USB2 driver in sys/dev/usb/if_aue.c, but the significant change is the reset code in the last hunk of the patch; trying that on whatever version of FreeBSD you're using is worthwhile. Thanks, --jh --------------050903090106080603080204 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="aue.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="aue.diff" --- /sys/dev/usb/net/if_aue.c 2009-06-26 07:45:06.000000000 -0400 +++ if_aue.c 2009-07-21 23:30:12.000000000 -0400 @@ -312,8 +312,10 @@ USETW(req.wLength, 1); err = uether_do_request(&sc->sc_ue, &req, &val, 1000); - if (err) + if (err) { + DPRINTF("%s(%04x): %04x ", __func__, reg, err); return (0); + } return (val); } @@ -331,8 +333,10 @@ USETW(req.wLength, 2); err = uether_do_request(&sc->sc_ue, &req, &val, 1000); - if (err) + if (err) { + DPRINTF("%s(%04x): %04x ", __func__, reg, err); return (0); + } return (le16toh(val)); } @@ -340,6 +344,7 @@ aue_csr_write_1(struct aue_softc *sc, uint16_t reg, uint8_t val) { struct usb_device_request req; + usb_error_t err; req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = AUE_UR_WRITEREG; @@ -348,8 +353,8 @@ USETW(req.wIndex, reg); USETW(req.wLength, 1); - if (uether_do_request(&sc->sc_ue, &req, &val, 1000)) { - /* error ignored */ + if ((err = uether_do_request(&sc->sc_ue, &req, &val, 1000))) { + DPRINTF("%s(%04x,%02x): %04x ", __func__, reg, val, err); } } @@ -357,6 +362,7 @@ aue_csr_write_2(struct aue_softc *sc, uint16_t reg, uint16_t val) { struct usb_device_request req; + usb_error_t err; req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = AUE_UR_WRITEREG; @@ -366,8 +372,8 @@ val = htole16(val); - if (uether_do_request(&sc->sc_ue, &req, &val, 1000)) { - /* error ignored */ + if ((err = uether_do_request(&sc->sc_ue, &req, &val, 1000))) { + DPRINTF("%s(%04x,%04x): %04x ", __func__, reg, val, err); } } @@ -484,7 +490,7 @@ } if (i == AUE_TIMEOUT) - device_printf(sc->sc_ue.ue_dev, "MII read timed out\n"); + device_printf(sc->sc_ue.ue_dev, "MII write timed out\n"); if (!locked) AUE_UNLOCK(sc); @@ -606,8 +612,8 @@ * Note: We force all of the GPIO pins low first, *then* * enable the ones we want. */ - aue_csr_write_1(sc, AUE_GPIO0, AUE_GPIO_OUT0|AUE_GPIO_SEL0); - aue_csr_write_1(sc, AUE_GPIO0, AUE_GPIO_OUT0|AUE_GPIO_SEL0|AUE_GPIO_SEL1); + aue_csr_write_1(sc, AUE_GPIO0, AUE_GPIO_SEL0|AUE_GPIO_SEL1); + aue_csr_write_1(sc, AUE_GPIO0, AUE_GPIO_SEL0|AUE_GPIO_SEL1|AUE_GPIO_OUT0); if (sc->sc_flags & AUE_FLAG_LSYS) { /* Grrr. LinkSys has to be different from everyone else. */ --------------050903090106080603080204-- From owner-freebsd-usb@FreeBSD.ORG Thu Jul 30 05:14:44 2009 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 35EE5106566B for ; Thu, 30 Jul 2009 05:14:44 +0000 (UTC) (envelope-from matheusber@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id D6EE98FC13 for ; Thu, 30 Jul 2009 05:14:43 +0000 (UTC) (envelope-from matheusber@gmail.com) Received: by qw-out-2122.google.com with SMTP id 3so651960qwe.7 for ; Wed, 29 Jul 2009 22:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:received :message-id:in-reply-to:references:date:subject:from:to:user-agent :mime-version:content-type:content-transfer-encoding:x-priority :importance; bh=F/jo++VoEXhDGW2y8sXEQ/LAu2PobokIIqs0JWQUWVM=; b=PcUfdtSM425mOP8bkmWG/u6POpGCMn4mM9odT1o07GlFWU7lDHVWNvLlJEHtSqF2G6 Cbd3SK2RN5x8xmZTe/ynadQ0KULs35Y5G0bKv95mDnBAS4AFqQ4mhfIfcbTUR7dGk0J4 mxM/qg8laMAOyEdPA/pGE732PDu5DsgZpzBXw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:in-reply-to:references:date:subject:from:to :user-agent:mime-version:content-type:content-transfer-encoding :x-priority:importance; b=AOQ0V+W7z3hnNU7y6BQHiqdZ8l66znryK4kIcVVL74LgBpzd+QvGY2UFDQLXpjKw23 razca8yVV7LQsZmP71urCwDpRGZttg0ewF7KOOl0acwZSLSZ/ah0mTyqBm4W1QmtH0a8 py/N+3celCXyIR3vB0F2m+0ASa7hm0ZxPM2M8= Received: by 10.224.54.5 with SMTP id o5mr422573qag.314.1248929070280; Wed, 29 Jul 2009 21:44:30 -0700 (PDT) Received: from cygnus.homeunix.com ([189.71.108.65]) by mx.google.com with ESMTPS id 2sm2282025qwi.23.2009.07.29.21.44.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 29 Jul 2009 21:44:29 -0700 (PDT) Sender: Nenhum_de_Nos Received: by cygnus.homeunix.com (Postfix, from userid 80) id ACC16B80A3; Thu, 30 Jul 2009 01:44:23 -0300 (BRT) Received: from 10.1.1.100 (SquirrelMail authenticated user matheus) by 10.1.1.10 with HTTP; Thu, 30 Jul 2009 01:44:23 -0300 (BRT) Message-ID: <6441f6846fc499093ff2e025632c8630.squirrel@10.1.1.10> In-Reply-To: <4A711D7C.2060100@sandstorm.net> References: <4A711D7C.2060100@sandstorm.net> Date: Thu, 30 Jul 2009 01:44:23 -0300 (BRT) From: "Nenhum_de_Nos" To: freebsd-usb@freebsd.org User-Agent: SquirrelMail/1.4.15 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: bug fix for aue driver 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, 30 Jul 2009 05:14:44 -0000 On Thu, July 30, 2009 01:11, john hood wrote: > I have a D-Link DSB-650 USB ethernet adapter, which uses an ADMtek AN986 > USB MAC, a Broadcom BCM5201 PHY device, and the aue driver. > > Recent versions of FreeBSD (7.1, 7.2, 8 beta 2) all get stuck on "aue0: > MII read timed out" errors after you try and bring the interface up. > (The system continues to run, but you get long waits performing ioctls > on the device, and no actual packets.) > > I think I've found the problem; the device is getting mis-initialized, > and has been ever since the early days of the driver. The old code > mis-sets a power-down configuration line on the PHY just as it's > resetting it. > > I think I have a fix; it 1) does the right thing for ADMtek's reference > design, 2) matches (better) what the Linux driver does (successfully, > for me), 3) matches the actual circuit of the DSB-650, 4) makes sense > when you read it. I suspect it will improve the situation for most > users of Pegasus-based Ethernet adapters, and probably resolve most of > the weird media- and PHY-related issues the driver's had for its entire > life. > > Would people try the attached patch? (If anyone cares much about an > obsolete Ethernet adapter-- I used this mostly as an excuse to wade into > the USB stack and understand it a little better...) If you get > debugging spew, please forward it to me. If it just works (or not), > tell me that too. > > The patch is against 8.0-beta2. It won't apply to the old, pre-USB2 > driver in sys/dev/usb/if_aue.c, but the significant change is the reset > code in the last hunk of the patch; trying that on whatever version of > FreeBSD you're using is worthwhile. > > Thanks, > > --jh I had problems using some aue in anything prior to 8-current. when I used usb from hps, all worked fine. I filed a PR for 7-stable in that time. my aue on 7.x didn't work at all. matheus -- We will call you cygnus, The God of balance you shall be A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? http://en.wikipedia.org/wiki/Posting_style From owner-freebsd-usb@FreeBSD.ORG Thu Jul 30 20:38:17 2009 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 3C2F2106564A; Thu, 30 Jul 2009 20:38:17 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 93AD58FC1A; Thu, 30 Jul 2009 20:38:16 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=iZpzobX8+EdzBH9M1qRAdyrED3pjPQBkceQr9SjOL1QbpkpXsAIJVbiwm/L3ntUfiqCRcGMIJYLDOe1ifwEfeoDVghxGrEk8F81Db63vnNX7It5M5QwsNGf+8YCumjYdigEPqu9e+XZuSbAkFw0wqL+7/Z9IBzR2YX91Wuds4aM=; Received: from amnesiac.at.no.dns (ppp91-78-117-58.pppoe.mtu-net.ru [91.78.117.58]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1MWcOE-0000Sf-G4; Fri, 31 Jul 2009 00:38:15 +0400 Date: Fri, 31 Jul 2009 00:38:12 +0400 From: Eygene Ryabinkin To: bug-followup@FreeBSD.org, freebsd-usb@FreeBSD.org Message-ID: References: <20090727194459.393CFB8090@phoenix.codelabs.ru> <200907271950.n6RJo3jj021164@freefall.freebsd.org> <8RwwU1KLz1ezvFiU9HsY6uoNfkU@nflB3XSqYRRHWdyVHMOFGnCK5Pk> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="tThc/1wpZn/ma/RB" Content-Disposition: inline In-Reply-To: Sender: rea-fbsd@codelabs.ru X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2009 20:38:17 -0000 --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hans Petter, good day. Tue, Jul 28, 2009 at 07:40:27PM +0400, Eygene Ryabinkin wrote: > HPS wrote: > > > Why do you dislike the sysctl approach? It is simple and reliable. > > > > It's duplicating access to data. There is not that much wrong about > > it, except it will not work if the device is of another kind. I.E. you > > would have to patch the HID sysctl node into every driver accessing > > HID descriptors? > > Just now -- yes, I'll need it. But probably I can move this > functionality into the USB bus level -- it will automatically create > this sysctl node for all HID children and will dispose it on the detach. > usb_probe_and_attach() is a candidate for such functionality. Will it > be bad? OK, attached is the reworked version of the sysctl patch: it now creates the needed nodes automatically (though they still can be created by explicit call from the driver, as in uhid(4)). As a bonus, kernel got the ability to install per-USB class post-attach and pre-detach handlers, so we can do some class-specific things for every driver. What do you think of it? Thanks! -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # --tThc/1wpZn/ma/RB-- From owner-freebsd-usb@FreeBSD.ORG Thu Jul 30 20:40:04 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A33010656C4 for ; Thu, 30 Jul 2009 20:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3667D8FC17 for ; Thu, 30 Jul 2009 20:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6UKe3nG016182 for ; Thu, 30 Jul 2009 20:40:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6UKe3rO016181; Thu, 30 Jul 2009 20:40:03 GMT (envelope-from gnats) Date: Thu, 30 Jul 2009 20:40:03 GMT Message-Id: <200907302040.n6UKe3rO016181@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Eygene Ryabinkin Cc: Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2009 20:40:04 -0000 The following reply was made to PR usb/137189; it has been noted by GNATS. From: Eygene Ryabinkin To: bug-followup@FreeBSD.org, freebsd-usb@FreeBSD.org Cc: hselasky@c2i.net Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors Date: Fri, 31 Jul 2009 00:38:12 +0400 --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hans Petter, good day. Tue, Jul 28, 2009 at 07:40:27PM +0400, Eygene Ryabinkin wrote: > HPS wrote: > > > Why do you dislike the sysctl approach? It is simple and reliable. > > > > It's duplicating access to data. There is not that much wrong about > > it, except it will not work if the device is of another kind. I.E. you > > would have to patch the HID sysctl node into every driver accessing > > HID descriptors? > > Just now -- yes, I'll need it. But probably I can move this > functionality into the USB bus level -- it will automatically create > this sysctl node for all HID children and will dispose it on the detach. > usb_probe_and_attach() is a candidate for such functionality. Will it > be bad? OK, attached is the reworked version of the sysctl patch: it now creates the needed nodes automatically (though they still can be created by explicit call from the driver, as in uhid(4)). As a bonus, kernel got the ability to install per-USB class post-attach and pre-detach handlers, so we can do some class-specific things for every driver. What do you think of it? Thanks! -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # --tThc/1wpZn/ma/RB Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-USB-implement-new-sysctl-node-hiddesc-for-HID-device.patch" Content-Transfer-Encoding: quoted-printable =46rom 4f8fd6e07cc388e96ab567ef29c6d592231ffb8a Mon Sep 17 00:00:00 2001 =46rom: Eygene Ryabinkin Date: Mon, 27 Jul 2009 08:36:07 +0400 Subject: [PATCH 1/3] USB: implement new sysctl node, "hiddesc" for HID devi= ces =2E..and also implement per-class attach/detach hooks -- now USB classes can register theis handlers that will be called just after attachment of device from their class and just before detachment of such device. This functionality provides the foundation to implement the needed sysctl in a generic manner where all HID-type devices will automatically gain this sysctl. The sysctl node will give out HID descriptor for the given device. It should be useful both for debugging and for the usbhidctl(1) utility -- it will be able to get (and dump) report descriptors from the devices that are "children" of the uhid(4): ukbd(4), ums(4) and others. We can't export this data via the ioctl, because ums(4) and ukbd(4) devices are typically used (by moused, Xorg, etc), so we just can't open them to pass the file descriptor to the ioctl call. Any driver can override the automated sysctl creation (that will read the report descriptor from the device-supplied data): this is handy for uhid(4) -- it sometimes uses hand-crafted report descriptors and we want to export the descriptor that driver really uses. Signed-off-by: Eygene Ryabinkin --- sys/dev/usb/input/uhid.c | 5 + sys/dev/usb/usb_device.c | 68 ++++++++++++--- sys/dev/usb/usb_hid.c | 214 ++++++++++++++++++++++++++++++++++++++++++= ++++ sys/dev/usb/usb_hooks.h | 48 ++++++++++ sys/dev/usb/usbhid.h | 1 + 5 files changed, 325 insertions(+), 11 deletions(-) create mode 100644 sys/dev/usb/usb_hooks.h diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c index 411aeb6..2432491 100644 --- a/sys/dev/usb/input/uhid.c +++ b/sys/dev/usb/input/uhid.c @@ -756,6 +756,11 @@ uhid_attach(device_t dev) if (error) { goto detach; } + + /* Sysctl stuff */ + hid_install_hiddesc_sysctl_handler(dev, + sc->sc_repdesc_ptr, sc->sc_repdesc_size); + return (0); /* success */ =20 detach: diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index 6617297..df2d531 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -50,6 +50,7 @@ #include #include #include +#include #include "usbdevs.h" =20 #define USB_DEBUG_VAR usb_debug @@ -81,8 +82,8 @@ static void usb_init_endpoint(struct usb_device *, uint8_= t, struct usb_endpoint_descriptor *, struct usb_endpoint *); static void usb_unconfigure(struct usb_device *, uint8_t); static void usb_detach_device(struct usb_device *, uint8_t, uint8_t); -static void usb_detach_device_sub(struct usb_device *, device_t *, - uint8_t); +static void usb_detach_device_sub(struct usb_device *, + struct usb_interface *, uint8_t); static uint8_t usb_probe_and_attach_sub(struct usb_device *, struct usb_attach_arg *); static void usb_init_attach_arg(struct usb_device *, @@ -122,6 +123,15 @@ usb_statestr(enum usb_dev_state state) return ((state < USB_STATE_MAX) ? statestr[state] : "UNKNOWN"); } =20 +/* List of the class-specific attach/detach hooks. */ +static struct usb_perclass_hooks { + usb_postattach_hook_t attach; + usb_predetach_hook_t detach; +} usb_perclass_hooks[UICLASS_VENDOR]; + +/* Useful macro */ +#define COUNTOF(x) (sizeof(x)/sizeof(*(x))) + /*------------------------------------------------------------------------* * usbd_get_ep_by_addr * @@ -988,7 +998,7 @@ usb_reset_iface_endpoints(struct usb_device *udev, uint= 8_t iface_index) * Flag values, see "USB_UNCFG_FLAG_XXX". *------------------------------------------------------------------------= */ static void -usb_detach_device_sub(struct usb_device *udev, device_t *ppdev, +usb_detach_device_sub(struct usb_device *udev, struct usb_interface *iface, uint8_t flag) { device_t dev; @@ -996,17 +1006,17 @@ usb_detach_device_sub(struct usb_device *udev, devic= e_t *ppdev, =20 if (!(flag & USB_UNCFG_FLAG_FREE_SUBDEV)) { =20 - *ppdev =3D NULL; + iface->subdev =3D NULL; =20 - } else if (*ppdev) { + } else if (iface->subdev) { =20 /* - * NOTE: It is important to clear "*ppdev" before deleting - * the child due to some device methods being called late - * during the delete process ! + * NOTE: It is important to clear "iface->subdev" before + * deleting the child due to some device methods being + * called late during the delete process! */ - dev =3D *ppdev; - *ppdev =3D NULL; + dev =3D iface->subdev; + iface->subdev =3D NULL; =20 device_printf(dev, "at %s, port %d, addr %d " "(disconnected)\n", @@ -1014,12 +1024,21 @@ usb_detach_device_sub(struct usb_device *udev, devi= ce_t *ppdev, udev->port_no, udev->address); =20 if (device_is_attached(dev)) { + uByte class; + if (udev->flags.peer_suspended) { err =3D DEVICE_RESUME(dev); if (err) { device_printf(dev, "Resume failed!\n"); } } + /* Run class-specific pre-detach hooks. */ + class =3D iface->idesc->bInterfaceClass; + if(class < COUNTOF(usb_perclass_hooks) && + usb_perclass_hooks[class].detach) { + usb_perclass_hooks[class].detach(dev); + } + if (device_detach(dev)) { goto error; } @@ -1081,7 +1100,7 @@ usb_detach_device(struct usb_device *udev, uint8_t if= ace_index, /* looks like the end of the USB interfaces */ break; } - usb_detach_device_sub(udev, &iface->subdev, flag); + usb_detach_device_sub(udev, iface, flag); } } =20 @@ -1147,6 +1166,17 @@ usb_probe_and_attach_sub(struct usb_device *udev, iface->subdev =3D uaa->temp_dev; =20 if (device_probe_and_attach(iface->subdev) =3D=3D 0) { + uByte class; + /* + * Run per-class post-attach hooks. They require + * ivars to be set, so we should call them here. + */ + class =3D iface->idesc->bInterfaceClass; + if(class < COUNTOF(usb_perclass_hooks) && + usb_perclass_hooks[class].attach) { + usb_perclass_hooks[class].attach(iface->subdev); + } + /* * The USB attach arguments are only available during probe * and attach ! @@ -2447,3 +2477,19 @@ usbd_device_attached(struct usb_device *udev) { return (udev->state > USB_STATE_DETACHED); } + +/* + * Sets per-class hook handlers in our hook registry. + * Arguments: + * - class: device class; + * - attach: post-attach hook, NULL disables the hook; + * - detach: pre-detach hook, NULL disable the hook. + */ +void usb_set_perclass_hooks(uByte class, + usb_postattach_hook_t attach, usb_predetach_hook_t detach) +{ + if (class >=3D COUNTOF(usb_perclass_hooks)) + return; + usb_perclass_hooks[class].attach =3D attach; + usb_perclass_hooks[class].detach =3D detach; +} diff --git a/sys/dev/usb/usb_hid.c b/sys/dev/usb/usb_hid.c index 220ffa2..c86325e 100644 --- a/sys/dev/usb/usb_hid.c +++ b/sys/dev/usb/usb_hid.c @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include =20 #define USB_DEBUG_VAR usb_debug =20 @@ -76,6 +77,34 @@ __FBSDID("$FreeBSD$"); static void hid_clear_local(struct hid_item *); static uint8_t hid_get_byte(struct hid_data *s, const uint16_t wSize); =20 +/* + * Infrastructure for automatical registration and unregistration + * of the HID generic sysctl nodes. hid_autosysctl holds the list + * of all HID devices for which sysctl handler was created, explicitely + * (by the driver) or implicitely (by the HID subsystem automation). + * + * Data items that were automatically initialized and should be freed on + * device detach will have non-NULL value; NULL value tells that the + * request for sysctl creation was explicit and driver manages memory by + * himself. + * + * Just now we have only one automatical sysctl node -- 'hiddesc' + * and all that we want to free is the report descriptor data, so + * 'struct hid_autosysctl' is very simple. If more sysctls are to + * be handled -- probably one should add the flag that will tell + * to which sysctl the data belongs to. + */ +static struct mtx hid_autosysctl_mtx; +static LIST_HEAD(, hid_autosysctl) hid_autosysctl =3D + LIST_HEAD_INITIALIZER(hid_autosysctl); + +struct hid_autosysctl { + device_t owner; /* Who owns the sysctl */ + void *data; /* Data that should be freed */ + struct sysctl_oid *oid; /* OID of the created sysctl node */ + LIST_ENTRY(hid_autosysctl) links; +}; + #define MAXUSAGE 64 #define MAXPUSH 4 struct hid_data { @@ -742,3 +771,188 @@ usbd_req_get_hid_desc(struct usb_device *udev, struct= mtx *mtx, } return (USB_ERR_NORMAL_COMPLETION); } + +/*------------------------------------------------------------------------* + * hid_sysctl_handler_hiddesc + * + * Sysctl(3) handler for the device's HID descriptor. Mean to be used + * by all HID children drivers (if they want such sysctl). + *------------------------------------------------------------------------= */ +static int +hid_sysctl_handler_hiddesc(SYSCTL_HANDLER_ARGS) +{ + int err; + + KASSERT(arg1 !=3D NULL, ("HID descriptor ptr is NULL " + "inside 'hiddesc' sysctl handler")); + err =3D SYSCTL_OUT(req, arg1, arg2); + return (err); +} + +/*------------------------------------------------------------------------* + * hid_install_sysctl_handler_hiddesc + * + * Installs sysctl handler for the device's "hiddesc" leaf and registers + * the fact of the installation. + * + * We're registering the installation of all handlers to allow this + * function to be called multiple times, e.g.: + * - "explicitely", by device driver itself; + * - "implicitely", by the generic registration mechanism. + * + * But only one sysctl handler will be installed -- the one initiated + * by the first invocation of this function. + * + * Arguments: + * - dev: the device for which the handler is installed; + * - desc: pointer to the memory chunk with the report descriptor + * data. If it is NULL, then the caller wants us to fetch + * its descriptor and do deallocation on the device detach + * (via the HID generic pre-detach hook). + * - size: size of the report descriptor; ignored when desc =3D=3D NULL. + *------------------------------------------------------------------------= */ +void +hid_install_hiddesc_sysctl_handler(device_t dev, void *desc, size_t size) +{ + unsigned char grabbed_desc =3D 0; + struct hid_autosysctl *entry, *cur; + + /* + * Get descriptor data (if needed) and grab memory while we're + * not locked. + */ + if (desc =3D=3D NULL) { + int err; + uint16_t len; + struct usb_attach_arg *uaa =3D device_get_ivars(dev); + + err =3D usbd_req_get_hid_desc(uaa->device, NULL, + &desc, &len, M_USBDEV, uaa->info.bIfaceIndex); + if (err) + return; /* Sorry, folks. */ + + size =3D len; + grabbed_desc =3D 1; + } + entry =3D malloc(sizeof(*entry), M_USBDEV, M_WAITOK | M_ZERO); + entry->owner =3D dev; + entry->data =3D (grabbed_desc ? desc : NULL); + + /* Start manipulations with the autosysctl list */ + mtx_lock(&hid_autosysctl_mtx); + + /* Look if we already have sysctl for this device. */ + LIST_FOREACH(cur, &hid_autosysctl, links) { + if (cur->owner =3D=3D dev) { + mtx_unlock(&hid_autosysctl_mtx); + if (grabbed_desc) + free(desc, M_USBDEV); + free(entry, M_USBDEV); + return; + } + } + + LIST_INSERT_HEAD(&hid_autosysctl, entry, links); + + /* End manipulations with the autosysctl list */ + mtx_unlock(&hid_autosysctl_mtx); + + entry->oid =3D SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "hiddesc", CTLTYPE_STRING|CTLFLAG_RD, + desc, (int)size, hid_sysctl_handler_hiddesc, + "O", "HID report descriptor for device"); +} + +/*------------------------------------------------------------------------* + * hid_remove_sysctl_handler_hiddesc + * + * Frees the data that possibly had been automatically allocated for the + * 'hiddesc' sysctl handler. The removal of the sysctl node is done here + * too: we should first delete the node and free the associated data only + * afterwards, because otherwise we can have sysctl handler to be called + * with the already freed pointer. + * + * Arguments: + * - dev: the device for which the handler was installed previously. + *------------------------------------------------------------------------= */ +static void +hid_remove_hiddesc_sysctl_handler(device_t dev) +{ + struct hid_autosysctl *cur, *np_temp; + + mtx_lock(&hid_autosysctl_mtx); + LIST_FOREACH_SAFE(cur, &hid_autosysctl, links, np_temp) { + if (cur->owner =3D=3D dev) { + LIST_REMOVE(cur, links); + /* Drop the lock before sysctl manipulations */ + mtx_unlock(&hid_autosysctl_mtx); + + /* + * We must both remove sysctl from context + * and free it. Otherwise device removal + * procedures will try to remove it automatically + * and that's bad idea to delete removed sysctl. + */ + sysctl_ctx_entry_del(device_get_sysctl_ctx(dev), + cur->oid); + sysctl_remove_oid(cur->oid, 1, 0); + + if (cur->data) + free(cur->data, M_USBDEV); + free(cur, M_USBDEV); + return; + } + } + mtx_unlock(&hid_autosysctl_mtx); +} + +/*------------------------------------------------------------------------* + * hid_hiddev_postattach_hook + * + * Called by the device attachment code inside usb_device.c after + * successfull attachment of the HID device. + *------------------------------------------------------------------------= */ +static void +hid_hiddev_postattach_hook(device_t dev) +{ + hid_install_hiddesc_sysctl_handler(dev, NULL, 0); +} + +/*------------------------------------------------------------------------* + * hid_hiddev_predetach_hook + * + * Called by the device detachment code inside usb_device.c before the + * detachment of the HID device. + *------------------------------------------------------------------------= */ +static void +hid_hiddev_predetach_hook(device_t dev) +{ + hid_remove_hiddesc_sysctl_handler(dev); +} + +/*------------------------------------------------------------------------* + * Methods to register and unregister our sysctl mutex and class-specific + * attach/detach hooks. + *------------------------------------------------------------------------= */ +static void +uhid_mtx_init(void *arg) +{ + /* initialize mutex */ + mtx_init(&hid_autosysctl_mtx, "HID autosysctl", NULL, MTX_DEF); + /* register hooks */ + usb_set_perclass_hooks(UICLASS_HID, hid_hiddev_postattach_hook, + hid_hiddev_predetach_hook); +} + +static void +uhid_mtx_uninit(void *arg) +{ + /* destroy mutex */ + mtx_destroy(&hid_autosysctl_mtx); + /* unregister hooks */ + usb_set_perclass_hooks(UICLASS_HID, NULL, NULL); +} + +SYSINIT(uhid_mtx_init, SI_SUB_LOCK, SI_ORDER_FIRST, uhid_mtx_init, NULL); +SYSUNINIT(uhid_mtx_uninit, SI_SUB_LOCK, SI_ORDER_ANY, uhid_mtx_uninit, NUL= L); diff --git a/sys/dev/usb/usb_hooks.h b/sys/dev/usb/usb_hooks.h new file mode 100644 index 0000000..a356594 --- /dev/null +++ b/sys/dev/usb/usb_hooks.h @@ -0,0 +1,48 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 2009 Eygene Ryabinkin. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURP= OSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENT= IAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STR= ICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY W= AY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _USB_HOOKS_H_ +#define _USB_HOOKS_H_ + +#include + +/* + * There is the possibility to have per-class post-attach and pre-detach + * hooks for USB devices. These hooks are class-specific, but are generic + * to the class itself. + * + * Hooks can be set (or cleared) using usb_set_perclass_hooks. The usual + * place where hooks are to be registered is the SYSINIT entry for the + * class-specific interface. + */ + +typedef void (*usb_postattach_hook_t)(device_t); +typedef void (*usb_predetach_hook_t)(device_t); + +void usb_set_perclass_hooks(uByte class, + usb_postattach_hook_t attach, usb_predetach_hook_t); + +#endif /* _USB_HOOKS_H_ */ diff --git a/sys/dev/usb/usbhid.h b/sys/dev/usb/usbhid.h index 4c5f313..e3f6105 100644 --- a/sys/dev/usb/usbhid.h +++ b/sys/dev/usb/usbhid.h @@ -235,5 +235,6 @@ struct usb_hid_descriptor *hid_get_descriptor_from_usb( usb_error_t usbd_req_get_hid_desc(struct usb_device *udev, struct mtx *mtx, void **descp, uint16_t *sizep, struct malloc_type *mem, uint8_t iface_index); +void hid_install_hiddesc_sysctl_handler(device_t dev, void *desc, size_t s= ize); #endif /* _KERNEL */ #endif /* _USB_HID_H_ */ --=20 1.6.3.3 --tThc/1wpZn/ma/RB-- From owner-freebsd-usb@FreeBSD.ORG Fri Jul 31 07:19:19 2009 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 541C6106566C for ; Fri, 31 Jul 2009 07:19:19 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.tele2.se [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id DD7D58FC17 for ; Fri, 31 Jul 2009 07:19:18 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=52VOGAJ3MIIA:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=RUGs7RsqHfnnyCMCypQA:9 a=L7s8rrqG-scMQX_gEnIA:7 a=ZEk0is3KFe6E1ibzgQ618f8LHJwA:4 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 547119737; Fri, 31 Jul 2009 09:19:16 +0200 From: Hans Petter Selasky To: rea-fbsd@codelabs.ru Date: Fri, 31 Jul 2009 09:19:03 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <20090727194459.393CFB8090@phoenix.codelabs.ru> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907310919.06906.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org, bug-followup@freebsd.org Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors 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: Fri, 31 Jul 2009 07:19:19 -0000 On Thursday 30 July 2009 22:38:12 Eygene Ryabinkin wrote: > Hans Petter, good day. > > Tue, Jul 28, 2009 at 07:40:27PM +0400, Eygene Ryabinkin wrote: > > HPS wrote: > > > > Why do you dislike the sysctl approach? It is simple and reliable. > > > > > > It's duplicating access to data. There is not that much wrong about > > > it, except it will not work if the device is of another kind. I.E. you > > > would have to patch the HID sysctl node into every driver accessing > > > HID descriptors? > > > > Just now -- yes, I'll need it. But probably I can move this > > functionality into the USB bus level -- it will automatically create > > this sysctl node for all HID children and will dispose it on the detach. > > usb_probe_and_attach() is a candidate for such functionality. Will it > > be bad? > > OK, attached is the reworked version of the sysctl patch: it now creates > the needed nodes automatically (though they still can be created by > explicit call from the driver, as in uhid(4)). As a bonus, kernel got the > ability to install per-USB class post-attach and pre-detach handlers, so > we can do some class-specific things for every driver. What do you think > of it? Hi, I think it's too much code to doo too little, and adds extra complexity, and that doing this via libusb would be much more generic. --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Jul 31 07:39:11 2009 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 266C0106564A for ; Fri, 31 Jul 2009 07:39:11 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from mail-ew0-f206.google.com (mail-ew0-f206.google.com [209.85.219.206]) by mx1.freebsd.org (Postfix) with ESMTP id A8ED88FC20 for ; Fri, 31 Jul 2009 07:39:10 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: by ewy2 with SMTP id 2so1256466ewy.43 for ; Fri, 31 Jul 2009 00:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=iSNVMLfqoWJTIy0Li3Vb+yG8ATJDwVP/2y/QfvgY44A=; b=Z3Ck2q8vvFYwnoGKKe8ZNuavNdGDV6cNUFW18hkWKPD2e4IjcPn4zXQzUqMjFHStFr vLqz7/5ujznd8ZoQDWweGZvCXmZCK2rTWqDRECSbK2FSvdfa7y2MqhtGiD2LgIYE+dIv QnGepmuqJLtA+19nD0s4SJe0mkhjRwBZMyddk= 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:content-transfer-encoding; b=t85l4+fGmgzZ9nn1TMMulwp8SsYYV7K2fepqy/A70uemB5wqAVaqKAGBiREXUQh2U7 nTRHXnb17beKSGwwpbWDHuzDFgbpkZPaN4gSFa8sjOScvrHjgtCMIKw14QKHcEbE3dVq 3+sEI8NYKEs7fj/SjfQydIzklYW34Y5TPMaDE= MIME-Version: 1.0 Received: by 10.216.71.196 with SMTP id r46mr453478wed.54.1249024592797; Fri, 31 Jul 2009 00:16:32 -0700 (PDT) In-Reply-To: <4A71C72F.5000109@gmail.com> References: <4A71C72F.5000109@gmail.com> Date: Fri, 31 Jul 2009 09:16:32 +0200 Message-ID: From: Rene Ladan To: Tiernan Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: usb@freebsd.org Subject: Re: devel/libusb port: bug in one of the patches 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: Fri, 31 Jul 2009 07:39:11 -0000 2009/7/30 Tiernan : > Hi Rene, > > The patch files/patch-bsd.c in the ports tree for devel/libusb contains a > hack that sets the fd to be non blocking to work around USB_SET_TIMEOUT o= n > ugen, however on my system (6.4-RELEASE) ugen does indeed support > USB_SET_TIMEOUT, and the hack breaks various things as it does not proper= ly > implement the timeout, just sets it nonblocking. > > I'm not sure what versions of FreeBSD do not support USB_SET_TIMEOUT, > however if memory serves 5.x is deprecated, so I'm guessing its not neede= d > any more so might be useful to axe. > I'm now running 8.X myself which has devel/libusb built in, so maybe it's better to assign the list to this. Ren=E9 From owner-freebsd-usb@FreeBSD.ORG Fri Jul 31 08:20:03 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA1BE1065672 for ; Fri, 31 Jul 2009 08:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C7FCD8FC17 for ; Fri, 31 Jul 2009 08:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6V8K3WC085260 for ; Fri, 31 Jul 2009 08:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6V8K3nP085258; Fri, 31 Jul 2009 08:20:03 GMT (envelope-from gnats) Date: Fri, 31 Jul 2009 08:20:03 GMT Message-Id: <200907310820.n6V8K3nP085258@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jul 2009 08:20:04 -0000 The following reply was made to PR usb/137189; it has been noted by GNATS. From: Hans Petter Selasky To: rea-fbsd@codelabs.ru Cc: bug-followup@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors Date: Fri, 31 Jul 2009 09:19:03 +0200 On Thursday 30 July 2009 22:38:12 Eygene Ryabinkin wrote: > Hans Petter, good day. > > Tue, Jul 28, 2009 at 07:40:27PM +0400, Eygene Ryabinkin wrote: > > HPS wrote: > > > > Why do you dislike the sysctl approach? It is simple and reliable. > > > > > > It's duplicating access to data. There is not that much wrong about > > > it, except it will not work if the device is of another kind. I.E. you > > > would have to patch the HID sysctl node into every driver accessing > > > HID descriptors? > > > > Just now -- yes, I'll need it. But probably I can move this > > functionality into the USB bus level -- it will automatically create > > this sysctl node for all HID children and will dispose it on the detach. > > usb_probe_and_attach() is a candidate for such functionality. Will it > > be bad? > > OK, attached is the reworked version of the sysctl patch: it now creates > the needed nodes automatically (though they still can be created by > explicit call from the driver, as in uhid(4)). As a bonus, kernel got the > ability to install per-USB class post-attach and pre-detach handlers, so > we can do some class-specific things for every driver. What do you think > of it? Hi, I think it's too much code to doo too little, and adds extra complexity, and that doing this via libusb would be much more generic. --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Jul 31 19:42:09 2009 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 6E0DA106566C; Fri, 31 Jul 2009 19:42:09 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.swipnet.se [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id D00028FC19; Fri, 31 Jul 2009 19:42:08 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=6I5d2MoRAAAA:8 a=4zbFFRfU6erAt4S3k3cA:9 a=Ma98PAmHCdqcz4waBxFS-8maYt0A:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 900166953; Fri, 31 Jul 2009 21:42:07 +0200 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Fri, 31 Jul 2009 21:42:02 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <4A711D7C.2060100@sandstorm.net> In-Reply-To: <4A711D7C.2060100@sandstorm.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907312142.04501.hselasky@c2i.net> Cc: john hood , Dr Josef Karthauser , freebsd-usb@freebsd.org Subject: Re: bug fix for aue driver 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: Fri, 31 Jul 2009 19:42:09 -0000 On Thursday 30 July 2009 06:11:40 john hood wrote: > john hood Hi, Can you verify that the following patch is correct: http://perforce.freebsd.org/chv.cgi?CH=166865 Thanks! --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Aug 1 22:30:07 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 679B71065680 for ; Sat, 1 Aug 2009 22:30:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B99088FC26 for ; Sat, 1 Aug 2009 22:30:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n71MU6jx084928 for ; Sat, 1 Aug 2009 22:30:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n71MU64m084927; Sat, 1 Aug 2009 22:30:06 GMT (envelope-from gnats) Resent-Date: Sat, 1 Aug 2009 22:30:06 GMT Resent-Message-Id: <200908012230.n71MU64m084927@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Oliver Herold Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 267DF106564A for ; Sat, 1 Aug 2009 22:29:31 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id C2ED08FC1D for ; Sat, 1 Aug 2009 22:29:30 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n71MTUho071788 for ; Sat, 1 Aug 2009 22:29:30 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n71MTU84071787; Sat, 1 Aug 2009 22:29:30 GMT (envelope-from nobody) Message-Id: <200908012229.n71MTU84071787@www.freebsd.org> Date: Sat, 1 Aug 2009 22:29:30 GMT From: Oliver Herold To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/137341: driver if_rum doesn't work at all and throws panics 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, 01 Aug 2009 22:30:08 -0000 >Number: 137341 >Category: usb >Synopsis: driver if_rum doesn't work at all and throws panics >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Aug 01 22:30:06 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Oliver Herold >Release: FreeBSD 8.0 current (weekly update) >Organization: F!XMBR >Environment: FreeBSD moria 8.0-BETA2 FreeBSD 8-0-BETA2 #0: Thu Jul 30 18:04:39 CEST 2009 root@moria:/usr/obj/usr/src/sys/GENERIC amd64 >Description: http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/128418 http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/133296 http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/132080 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/119945 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/120966 It didn't change a single bit since my first pr more than a year ago. The difference nowadays is: it doesn't throw a panic, instead it loses the connection and if I try to /etc/rc.d/netif restart then the panic occures. I'm using OpenBSD 4.5 on the same laptop (it has got Intel 5000 Wifi) and don't have a single failure with it (rum). Btw. the problem persists with FreeBSD 8.0 (i386) too. >How-To-Repeat: 1. use the network connection (together with WPA encryption via wpa_supplicant) 2. wait some minutes -> connection lost 3. /etc/rc.d/netif restart -> wait some seconds -> et voila: panic >Fix: >Release-Note: >Audit-Trail: >Unformatted: