From owner-freebsd-usb@FreeBSD.ORG Sun Oct 28 11:10:01 2007 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 B59BB16A421 for ; Sun, 28 Oct 2007 11:10:01 +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 91CAC13C4A5 for ; Sun, 28 Oct 2007 11:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9SBA1g6085990 for ; Sun, 28 Oct 2007 11:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9SBA1p1085989; Sun, 28 Oct 2007 11:10:01 GMT (envelope-from gnats) Resent-Date: Sun, 28 Oct 2007 11:10:01 GMT Resent-Message-Id: <200710281110.l9SBA1p1085989@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, Henrik Gulbrandsen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AAA916A46D for ; Sun, 28 Oct 2007 11:00:28 +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 8A9BB13C4A3 for ; Sun, 28 Oct 2007 11:00:28 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l9SAxrnt023979 for ; Sun, 28 Oct 2007 10:59:53 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l9SAxrIp023978; Sun, 28 Oct 2007 10:59:53 GMT (envelope-from nobody) Message-Id: <200710281059.l9SAxrIp023978@www.freebsd.org> Date: Sun, 28 Oct 2007 10:59:53 GMT From: Henrik Gulbrandsen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/117598: [patch] Not possible to record with Plantronics DSP-400 USB headset 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, 28 Oct 2007 11:10:01 -0000 >Number: 117598 >Category: usb >Synopsis: [patch] Not possible to record with Plantronics DSP-400 USB headset >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 28 11:10:01 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Henrik Gulbrandsen >Release: FreeBSD 7.0-BETA1.5 i386 >Organization: >Environment: FreeBSD Test 7.0-BETA1.5 FreeBSD 7.0-BETA1.5 #2 Sat Oct 27 12:53:33 CEST 2007 tester@Test:/usr/src/sys/i386/compile/GENERIC i386 (uname -a after patching) >Description: The Plantronics DSP-400 USB headset works fine for playback, but recording fails. A look at /dev/sndstat indicated that there were no recording channels available, and the relevant lines from /var/log/messages are as follows: Oct 25 17:37:43 root: Unknown USB device: vendor 0x047f product 0x0ca1 bus uhub2 Oct 25 17:37:43 kernel: uaudio0: on uhub2 Oct 25 17:37:43 kernel: uaudio0: ignored input endpoint of type adaptive Oct 25 17:37:43 last message repeated 2 times Oct 25 17:37:43 kernel: uaudio0: audio rev 1.00 Oct 25 17:37:43 kernel: pcm0: on uaudio0 Apparently, the headset reports using an adaptive audio source endpoint for data from the microphone. According to the USB specs, such endpoints need an explicit synch pipe to specify the wanted sample rate [See USB Spec rev 2.0, sec. 5.12.4.2 "Feedback" and the USB Device Class Definition for Audio Devices, sec. 3.7.2.2 "Isochronous Synch Endpoint"]. Unfortunately, FreeBSD currently doesn't support these synch endpoints. Fortunately, neither does the DSP-400 :-) The rest of the story follows in the fix description... >How-To-Repeat: Plug in your Plantronics DSP-400 headset and make sure that the snd_uaudio kernel module is loaded. Verify that playback works and recording fails. >Fix: Recompiling sys/dev/sound/usb/uaudio.c with defined UAUDIO_MULTIPLE_ENDPOINTS revealed that that the required synch endpoint didn't exist. There is already a USB quirk flag UQ_AU_INP_ASYNC, which specifies that a claimed adaptive input is in fact not adaptive at all, but better handled as asynchronous. After setting the flag for the DSP-400 headset, recording seems to work without obvious flaws. I'm attaching a patch that adds this to the set of known quirks. Since this has happened at least twice, I'm also adding some optional code that assumes that all cases with a mysteriously missing sync endpoint should be handled similarly. This may help to save some debugging time for other problem devices out there... Patch attached with submission follows: --- dev/sound/usb/uaudio.c.orig 2007-06-20 07:11:37.000000000 +0200 +++ dev/sound/usb/uaudio.c 2007-10-27 21:50:10.000000000 +0200 @@ -116,7 +116,11 @@ #else /* #define USB_DEBUG */ #endif + +/* A few knobs to enable/disable features... */ /* #define UAUDIO_MULTIPLE_ENDPOINTS */ +#define UAUDIO_ASSUME_ASYNC + #ifdef USB_DEBUG #define DPRINTF(x) do { if (uaudiodebug) printf x; } while (0) #define DPRINTFN(n,x) do { if (uaudiodebug>(n)) printf x; } while (0) @@ -2018,6 +2022,12 @@ dir == UE_DIR_IN && type == UE_ISO_ADAPT) type = UE_ISO_ASYNC; +#ifdef UAUDIO_ASSUME_ASYNC + /* Dammit! The spec doesn't allow this, so why not assume a quirk? */ + if (dir == UE_DIR_IN && type == UE_ISO_ADAPT && id->bNumEndpoints == 1) + type = UE_ISO_ASYNC; +#endif + /* We can't handle endpoints that need a sync pipe yet. */ sync = FALSE; if (dir == UE_DIR_IN && type == UE_ISO_ADAPT) { @@ -2050,9 +2060,18 @@ if (sync && id->bNumEndpoints <= 1) { printf("%s: a sync-pipe endpoint but no other endpoint\n", device_get_nameunit(sc->sc_dev)); +#ifndef UAUDIO_ASSUME_ASYNC + if (dir != UE_DIR_IN) + return USBD_INVAL; + printf("This device may need a UQ_AU_INP_ASYNC quirk flag.\n"); + printf("Consider adding it in sys/dev/usb/usb_quirks.c !!!\n"); + printf("vendor: 0x%04x; product: 0x%04x; release: 0x%04x\n", + sc->sc_vendor, sc->sc_product, sc->sc_release); +#endif /* UAUDIO_ASSUME_ASYNC */ return USBD_INVAL; } -#endif +#endif /* UAUDIO_MULTIPLE_ENDPOINTS */ + if (!sync && id->bNumEndpoints > 1) { printf("%s: non sync-pipe endpoint but multiple endpoints\n", device_get_nameunit(sc->sc_dev)); --- dev/usb/usb_quirks.c.orig 2007-07-22 17:59:45.000000000 +0200 +++ dev/usb/usb_quirks.c 2007-10-27 12:53:02.000000000 +0200 @@ -74,6 +74,8 @@ { USB_VENDOR_TELEX, USB_PRODUCT_TELEX_MIC1, 0x009, { UQ_AU_NO_FRAC }}, { USB_VENDOR_SILICONPORTALS, USB_PRODUCT_SILICONPORTALS_YAPPHONE, 0x100, { UQ_AU_INP_ASYNC }}, + { USB_VENDOR_PLANTRONICS, USB_PRODUCT_PLANTRONICS_DSP400, + 0x004, { UQ_AU_INP_ASYNC }}, { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_UN53B, ANY, { UQ_NO_STRINGS }}, /* XXX These should have a revision number, but I don't know what they are. */ { USB_VENDOR_HP, USB_PRODUCT_HP_895C, ANY, { UQ_BROKEN_BIDIR }}, --- dev/usb/usbdevs.orig 2007-10-05 09:26:39.000000000 +0200 +++ dev/usb/usbdevs 2007-10-27 12:53:06.000000000 +0200 @@ -1851,6 +1851,9 @@ product PLANEX3 GU1000T 0xab11 GU-1000T product PLANEX3 GWUS54MINI 0xab13 GW-US54Mini +/* Plantronics products */ +product PLANTRONICS DSP400 0x0ca1 DSP-400 Foldable PC Headset + /* Plextor Corp. */ product PLEXTOR 40_12_40U 0x0011 PlexWriter 40/12/40U >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Sun Oct 28 12:27:00 2007 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 A0BDF16A417 for ; Sun, 28 Oct 2007 12:27:00 +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 DA1A513C4A3 for ; Sun, 28 Oct 2007 12:26:59 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [85.19.218.45] (account mc467741@c2i.net [85.19.218.45] verified) by mailfe07.swip.net (CommuniGate Pro SMTP 5.1.10) with ESMTPA id 668438738; Sun, 28 Oct 2007 13:26:58 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sun, 28 Oct 2007 14:27:24 +0200 User-Agent: KMail/1.9.7 References: <200710281059.l9SAxrIp023978@www.freebsd.org> In-Reply-To: <200710281059.l9SAxrIp023978@www.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710281327.26131.hselasky@c2i.net> Cc: freebsd-gnats-submit@freebsd.org, Henrik Gulbrandsen Subject: Re: usb/117598: [patch] Not possible to record with Plantronics DSP-400 USB headset 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, 28 Oct 2007 12:27:00 -0000 On Sunday 28 October 2007, Henrik Gulbrandsen wrote: > >Number: 117598 > >Category: usb > >Synopsis: [patch] Not possible to record with Plantronics DSP-400 > > USB headset Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Oct 28 11:10:01 UTC 2007 > >Closed-Date: > >Last-Modified: > >Originator: Henrik Gulbrandsen > >Release: FreeBSD 7.0-BETA1.5 i386 > >Organization: > >Environment: > > FreeBSD Test 7.0-BETA1.5 FreeBSD 7.0-BETA1.5 #2 Sat Oct 27 12:53:33 CEST > 2007 tester@Test:/usr/src/sys/i386/compile/GENERIC i386 > > (uname -a after patching) > > >Description: > > The Plantronics DSP-400 USB headset works fine for playback, but recording > fails. A look at /dev/sndstat indicated that there were no recording > channels available, and the relevant lines from /var/log/messages are as > follows: > > Oct 25 17:37:43 root: Unknown USB device: vendor 0x047f product 0x0ca1 bus > uhub2 Oct 25 17:37:43 kernel: uaudio0: class 0/0, rev 1.10/0.04, addr 2> on uhub2 Oct 25 17:37:43 kernel: > uaudio0: ignored input endpoint of type adaptive Oct 25 17:37:43 last > message repeated 2 times > Oct 25 17:37:43 kernel: uaudio0: audio rev 1.00 > Oct 25 17:37:43 kernel: pcm0: on uaudio0 > > Apparently, the headset reports using an adaptive audio source endpoint for > data from the microphone. According to the USB specs, such endpoints need > an explicit synch pipe to specify the wanted sample rate [See USB Spec rev > 2.0, sec. 5.12.4.2 "Feedback" and the USB Device Class Definition for Audio > Devices, sec. 3.7.2.2 "Isochronous Synch Endpoint"]. Unfortunately, FreeBSD > currently doesn't support these synch endpoints. Fortunately, neither does > the DSP-400 :-) > > The rest of the story follows in the fix description... > > >How-To-Repeat: > > Plug in your Plantronics DSP-400 headset and make sure that the snd_uaudio > kernel module is loaded. Verify that playback works and recording fails. > > >Fix: > > Recompiling sys/dev/sound/usb/uaudio.c with defined > UAUDIO_MULTIPLE_ENDPOINTS revealed that that the required synch endpoint > didn't exist. There is already a USB quirk flag UQ_AU_INP_ASYNC, which > specifies that a claimed adaptive input is in fact not adaptive at all, but > better handled as asynchronous. After setting the flag for the DSP-400 > headset, recording seems to work without obvious flaws. > > I'm attaching a patch that adds this to the set of known quirks. Since this > has happened at least twice, I'm also adding some optional code that > assumes that all cases with a mysteriously missing sync endpoint should be > handled similarly. This may help to save some debugging time for other > problem devices out there... > > > Patch attached with submission follows: > > --- dev/sound/usb/uaudio.c.orig 2007-06-20 07:11:37.000000000 +0200 > +++ dev/sound/usb/uaudio.c 2007-10-27 21:50:10.000000000 +0200 > @@ -116,7 +116,11 @@ > #else > /* #define USB_DEBUG */ > #endif > + > +/* A few knobs to enable/disable features... */ > /* #define UAUDIO_MULTIPLE_ENDPOINTS */ > +#define UAUDIO_ASSUME_ASYNC > + > #ifdef USB_DEBUG > #define DPRINTF(x) do { if (uaudiodebug) printf x; } while (0) > #define DPRINTFN(n,x) do { if (uaudiodebug>(n)) printf x; } while (0) > @@ -2018,6 +2022,12 @@ > dir == UE_DIR_IN && type == UE_ISO_ADAPT) > type = UE_ISO_ASYNC; > > +#ifdef UAUDIO_ASSUME_ASYNC > + /* Dammit! The spec doesn't allow this, so why not assume a quirk? */ > + if (dir == UE_DIR_IN && type == UE_ISO_ADAPT && id->bNumEndpoints == 1) > + type = UE_ISO_ASYNC; > +#endif > + > /* We can't handle endpoints that need a sync pipe yet. */ > sync = FALSE; > if (dir == UE_DIR_IN && type == UE_ISO_ADAPT) { > @@ -2050,9 +2060,18 @@ > if (sync && id->bNumEndpoints <= 1) { > printf("%s: a sync-pipe endpoint but no other endpoint\n", > device_get_nameunit(sc->sc_dev)); > +#ifndef UAUDIO_ASSUME_ASYNC > + if (dir != UE_DIR_IN) > + return USBD_INVAL; > + printf("This device may need a UQ_AU_INP_ASYNC quirk flag.\n"); > + printf("Consider adding it in sys/dev/usb/usb_quirks.c !!!\n"); > + printf("vendor: 0x%04x; product: 0x%04x; release: 0x%04x\n", > + sc->sc_vendor, sc->sc_product, sc->sc_release); > +#endif /* UAUDIO_ASSUME_ASYNC */ > return USBD_INVAL; > } > -#endif > +#endif /* UAUDIO_MULTIPLE_ENDPOINTS */ > + > if (!sync && id->bNumEndpoints > 1) { > printf("%s: non sync-pipe endpoint but multiple endpoints\n", > device_get_nameunit(sc->sc_dev)); > --- dev/usb/usb_quirks.c.orig 2007-07-22 17:59:45.000000000 +0200 > +++ dev/usb/usb_quirks.c 2007-10-27 12:53:02.000000000 +0200 > @@ -74,6 +74,8 @@ > { USB_VENDOR_TELEX, USB_PRODUCT_TELEX_MIC1, 0x009, { UQ_AU_NO_FRAC > }}, { USB_VENDOR_SILICONPORTALS, USB_PRODUCT_SILICONPORTALS_YAPPHONE, > 0x100, { UQ_AU_INP_ASYNC }}, > + { USB_VENDOR_PLANTRONICS, USB_PRODUCT_PLANTRONICS_DSP400, > + 0x004, { UQ_AU_INP_ASYNC }}, > { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_UN53B, ANY, { UQ_NO_STRINGS > }}, /* XXX These should have a revision number, but I don't know what they > are. */ { USB_VENDOR_HP, USB_PRODUCT_HP_895C, ANY, { UQ_BROKEN_BIDIR > }}, --- dev/usb/usbdevs.orig 2007-10-05 09:26:39.000000000 +0200 > +++ dev/usb/usbdevs 2007-10-27 12:53:06.000000000 +0200 > @@ -1851,6 +1851,9 @@ > product PLANEX3 GU1000T 0xab11 GU-1000T > product PLANEX3 GWUS54MINI 0xab13 GW-US54Mini > > +/* Plantronics products */ > +product PLANTRONICS DSP400 0x0ca1 DSP-400 Foldable PC Headset > + > /* Plextor Corp. */ > product PLEXTOR 40_12_40U 0x0011 PlexWriter 40/12/40U > > >Release-Note: > >Audit-Trail: > >Unformatted: > What you experience is very common and I think that a quirk would be useless. How about assuming ASYNC by default ? --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Oct 28 13:30:04 2007 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 21D6416A46D for ; Sun, 28 Oct 2007 13:30: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 0F8AD13C4CC for ; Sun, 28 Oct 2007 13:30: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.1/8.14.1) with ESMTP id l9SDU3q2093070 for ; Sun, 28 Oct 2007 13:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9SDU3P6093067; Sun, 28 Oct 2007 13:30:03 GMT (envelope-from gnats) Date: Sun, 28 Oct 2007 13:30:03 GMT Message-Id: <200710281330.l9SDU3P6093067@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/117598: [patch] Not possible to record with Plantronics DSP-400 USB headset 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: Sun, 28 Oct 2007 13:30:04 -0000 The following reply was made to PR usb/117598; it has been noted by GNATS. From: Hans Petter Selasky To: freebsd-usb@freebsd.org Cc: Henrik Gulbrandsen , freebsd-gnats-submit@freebsd.org Subject: Re: usb/117598: [patch] Not possible to record with Plantronics DSP-400 USB headset Date: Sun, 28 Oct 2007 14:27:24 +0200 On Sunday 28 October 2007, Henrik Gulbrandsen wrote: > >Number: 117598 > >Category: usb > >Synopsis: [patch] Not possible to record with Plantronics DSP-400 > > USB headset Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Oct 28 11:10:01 UTC 2007 > >Closed-Date: > >Last-Modified: > >Originator: Henrik Gulbrandsen > >Release: FreeBSD 7.0-BETA1.5 i386 > >Organization: > >Environment: > > FreeBSD Test 7.0-BETA1.5 FreeBSD 7.0-BETA1.5 #2 Sat Oct 27 12:53:33 CEST > 2007 tester@Test:/usr/src/sys/i386/compile/GENERIC i386 > > (uname -a after patching) > > >Description: > > The Plantronics DSP-400 USB headset works fine for playback, but recording > fails. A look at /dev/sndstat indicated that there were no recording > channels available, and the relevant lines from /var/log/messages are as > follows: > > Oct 25 17:37:43 root: Unknown USB device: vendor 0x047f product 0x0ca1 bus > uhub2 Oct 25 17:37:43 kernel: uaudio0: class 0/0, rev 1.10/0.04, addr 2> on uhub2 Oct 25 17:37:43 kernel: > uaudio0: ignored input endpoint of type adaptive Oct 25 17:37:43 last > message repeated 2 times > Oct 25 17:37:43 kernel: uaudio0: audio rev 1.00 > Oct 25 17:37:43 kernel: pcm0: on uaudio0 > > Apparently, the headset reports using an adaptive audio source endpoint for > data from the microphone. According to the USB specs, such endpoints need > an explicit synch pipe to specify the wanted sample rate [See USB Spec rev > 2.0, sec. 5.12.4.2 "Feedback" and the USB Device Class Definition for Audio > Devices, sec. 3.7.2.2 "Isochronous Synch Endpoint"]. Unfortunately, FreeBSD > currently doesn't support these synch endpoints. Fortunately, neither does > the DSP-400 :-) > > The rest of the story follows in the fix description... > > >How-To-Repeat: > > Plug in your Plantronics DSP-400 headset and make sure that the snd_uaudio > kernel module is loaded. Verify that playback works and recording fails. > > >Fix: > > Recompiling sys/dev/sound/usb/uaudio.c with defined > UAUDIO_MULTIPLE_ENDPOINTS revealed that that the required synch endpoint > didn't exist. There is already a USB quirk flag UQ_AU_INP_ASYNC, which > specifies that a claimed adaptive input is in fact not adaptive at all, but > better handled as asynchronous. After setting the flag for the DSP-400 > headset, recording seems to work without obvious flaws. > > I'm attaching a patch that adds this to the set of known quirks. Since this > has happened at least twice, I'm also adding some optional code that > assumes that all cases with a mysteriously missing sync endpoint should be > handled similarly. This may help to save some debugging time for other > problem devices out there... > > > Patch attached with submission follows: > > --- dev/sound/usb/uaudio.c.orig 2007-06-20 07:11:37.000000000 +0200 > +++ dev/sound/usb/uaudio.c 2007-10-27 21:50:10.000000000 +0200 > @@ -116,7 +116,11 @@ > #else > /* #define USB_DEBUG */ > #endif > + > +/* A few knobs to enable/disable features... */ > /* #define UAUDIO_MULTIPLE_ENDPOINTS */ > +#define UAUDIO_ASSUME_ASYNC > + > #ifdef USB_DEBUG > #define DPRINTF(x) do { if (uaudiodebug) printf x; } while (0) > #define DPRINTFN(n,x) do { if (uaudiodebug>(n)) printf x; } while (0) > @@ -2018,6 +2022,12 @@ > dir == UE_DIR_IN && type == UE_ISO_ADAPT) > type = UE_ISO_ASYNC; > > +#ifdef UAUDIO_ASSUME_ASYNC > + /* Dammit! The spec doesn't allow this, so why not assume a quirk? */ > + if (dir == UE_DIR_IN && type == UE_ISO_ADAPT && id->bNumEndpoints == 1) > + type = UE_ISO_ASYNC; > +#endif > + > /* We can't handle endpoints that need a sync pipe yet. */ > sync = FALSE; > if (dir == UE_DIR_IN && type == UE_ISO_ADAPT) { > @@ -2050,9 +2060,18 @@ > if (sync && id->bNumEndpoints <= 1) { > printf("%s: a sync-pipe endpoint but no other endpoint\n", > device_get_nameunit(sc->sc_dev)); > +#ifndef UAUDIO_ASSUME_ASYNC > + if (dir != UE_DIR_IN) > + return USBD_INVAL; > + printf("This device may need a UQ_AU_INP_ASYNC quirk flag.\n"); > + printf("Consider adding it in sys/dev/usb/usb_quirks.c !!!\n"); > + printf("vendor: 0x%04x; product: 0x%04x; release: 0x%04x\n", > + sc->sc_vendor, sc->sc_product, sc->sc_release); > +#endif /* UAUDIO_ASSUME_ASYNC */ > return USBD_INVAL; > } > -#endif > +#endif /* UAUDIO_MULTIPLE_ENDPOINTS */ > + > if (!sync && id->bNumEndpoints > 1) { > printf("%s: non sync-pipe endpoint but multiple endpoints\n", > device_get_nameunit(sc->sc_dev)); > --- dev/usb/usb_quirks.c.orig 2007-07-22 17:59:45.000000000 +0200 > +++ dev/usb/usb_quirks.c 2007-10-27 12:53:02.000000000 +0200 > @@ -74,6 +74,8 @@ > { USB_VENDOR_TELEX, USB_PRODUCT_TELEX_MIC1, 0x009, { UQ_AU_NO_FRAC > }}, { USB_VENDOR_SILICONPORTALS, USB_PRODUCT_SILICONPORTALS_YAPPHONE, > 0x100, { UQ_AU_INP_ASYNC }}, > + { USB_VENDOR_PLANTRONICS, USB_PRODUCT_PLANTRONICS_DSP400, > + 0x004, { UQ_AU_INP_ASYNC }}, > { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_UN53B, ANY, { UQ_NO_STRINGS > }}, /* XXX These should have a revision number, but I don't know what they > are. */ { USB_VENDOR_HP, USB_PRODUCT_HP_895C, ANY, { UQ_BROKEN_BIDIR > }}, --- dev/usb/usbdevs.orig 2007-10-05 09:26:39.000000000 +0200 > +++ dev/usb/usbdevs 2007-10-27 12:53:06.000000000 +0200 > @@ -1851,6 +1851,9 @@ > product PLANEX3 GU1000T 0xab11 GU-1000T > product PLANEX3 GWUS54MINI 0xab13 GW-US54Mini > > +/* Plantronics products */ > +product PLANTRONICS DSP400 0x0ca1 DSP-400 Foldable PC Headset > + > /* Plextor Corp. */ > product PLEXTOR 40_12_40U 0x0011 PlexWriter 40/12/40U > > >Release-Note: > >Audit-Trail: > >Unformatted: > What you experience is very common and I think that a quirk would be useless. How about assuming ASYNC by default ? --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Oct 28 13:51:21 2007 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 CACB116A41B; Sun, 28 Oct 2007 13:51:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 7D79D13C4B2; Sun, 28 Oct 2007 13:51:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id l9SDnjeo014203; Sun, 28 Oct 2007 07:49:45 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 28 Oct 2007 07:50:45 -0600 (MDT) Message-Id: <20071028.075045.-432802644.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200710281327.26131.hselasky@c2i.net> References: <200710281059.l9SAxrIp023978@www.freebsd.org> <200710281327.26131.hselasky@c2i.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-gnats-submit@FreeBSD.org, henrik@gulbra.net, freebsd-usb@FreeBSD.org Subject: Re: usb/117598: [patch] Not possible to record with Plantronics DSP-400 USB headset 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, 28 Oct 2007 13:51:21 -0000 In message: <200710281327.26131.hselasky@c2i.net> Hans Petter Selasky writes: : On Sunday 28 October 2007, Henrik Gulbrandsen wrote: : > >Number: 117598 : > >Category: usb : > >Synopsis: [patch] Not possible to record with Plantronics DSP-400 : > > USB headset Confidential: no : > >Severity: non-critical : > >Priority: low : > >Responsible: freebsd-usb : > >State: open : > >Quarter: : > >Keywords: : > >Date-Required: : > >Class: sw-bug : > >Submitter-Id: current-users : > >Arrival-Date: Sun Oct 28 11:10:01 UTC 2007 : > >Closed-Date: : > >Last-Modified: : > >Originator: Henrik Gulbrandsen : > >Release: FreeBSD 7.0-BETA1.5 i386 : > >Organization: : > >Environment: : > : > FreeBSD Test 7.0-BETA1.5 FreeBSD 7.0-BETA1.5 #2 Sat Oct 27 12:53:33 CEST : > 2007 tester@Test:/usr/src/sys/i386/compile/GENERIC i386 : > : > (uname -a after patching) : > : > >Description: : > : > The Plantronics DSP-400 USB headset works fine for playback, but recording : > fails. A look at /dev/sndstat indicated that there were no recording : > channels available, and the relevant lines from /var/log/messages are as : > follows: : > : > Oct 25 17:37:43 root: Unknown USB device: vendor 0x047f product 0x0ca1 bus : > uhub2 Oct 25 17:37:43 kernel: uaudio0: class 0/0, rev 1.10/0.04, addr 2> on uhub2 Oct 25 17:37:43 kernel: : > uaudio0: ignored input endpoint of type adaptive Oct 25 17:37:43 last : > message repeated 2 times : > Oct 25 17:37:43 kernel: uaudio0: audio rev 1.00 : > Oct 25 17:37:43 kernel: pcm0: on uaudio0 : > : > Apparently, the headset reports using an adaptive audio source endpoint for : > data from the microphone. According to the USB specs, such endpoints need : > an explicit synch pipe to specify the wanted sample rate [See USB Spec rev : > 2.0, sec. 5.12.4.2 "Feedback" and the USB Device Class Definition for Audio : > Devices, sec. 3.7.2.2 "Isochronous Synch Endpoint"]. Unfortunately, FreeBSD : > currently doesn't support these synch endpoints. Fortunately, neither does : > the DSP-400 :-) : > : > The rest of the story follows in the fix description... : > : > >How-To-Repeat: : > : > Plug in your Plantronics DSP-400 headset and make sure that the snd_uaudio : > kernel module is loaded. Verify that playback works and recording fails. : > : > >Fix: : > : > Recompiling sys/dev/sound/usb/uaudio.c with defined : > UAUDIO_MULTIPLE_ENDPOINTS revealed that that the required synch endpoint : > didn't exist. There is already a USB quirk flag UQ_AU_INP_ASYNC, which : > specifies that a claimed adaptive input is in fact not adaptive at all, but : > better handled as asynchronous. After setting the flag for the DSP-400 : > headset, recording seems to work without obvious flaws. : > : > I'm attaching a patch that adds this to the set of known quirks. Since this : > has happened at least twice, I'm also adding some optional code that : > assumes that all cases with a mysteriously missing sync endpoint should be : > handled similarly. This may help to save some debugging time for other : > problem devices out there... : > : > : > Patch attached with submission follows: : > : > --- dev/sound/usb/uaudio.c.orig 2007-06-20 07:11:37.000000000 +0200 : > +++ dev/sound/usb/uaudio.c 2007-10-27 21:50:10.000000000 +0200 : > @@ -116,7 +116,11 @@ : > #else : > /* #define USB_DEBUG */ : > #endif : > + : > +/* A few knobs to enable/disable features... */ : > /* #define UAUDIO_MULTIPLE_ENDPOINTS */ : > +#define UAUDIO_ASSUME_ASYNC : > + : > #ifdef USB_DEBUG : > #define DPRINTF(x) do { if (uaudiodebug) printf x; } while (0) : > #define DPRINTFN(n,x) do { if (uaudiodebug>(n)) printf x; } while (0) : > @@ -2018,6 +2022,12 @@ : > dir == UE_DIR_IN && type == UE_ISO_ADAPT) : > type = UE_ISO_ASYNC; : > : > +#ifdef UAUDIO_ASSUME_ASYNC : > + /* Dammit! The spec doesn't allow this, so why not assume a quirk? */ : > + if (dir == UE_DIR_IN && type == UE_ISO_ADAPT && id->bNumEndpoints == 1) : > + type = UE_ISO_ASYNC; : > +#endif : > + : > /* We can't handle endpoints that need a sync pipe yet. */ : > sync = FALSE; : > if (dir == UE_DIR_IN && type == UE_ISO_ADAPT) { : > @@ -2050,9 +2060,18 @@ : > if (sync && id->bNumEndpoints <= 1) { : > printf("%s: a sync-pipe endpoint but no other endpoint\n", : > device_get_nameunit(sc->sc_dev)); : > +#ifndef UAUDIO_ASSUME_ASYNC : > + if (dir != UE_DIR_IN) : > + return USBD_INVAL; : > + printf("This device may need a UQ_AU_INP_ASYNC quirk flag.\n"); : > + printf("Consider adding it in sys/dev/usb/usb_quirks.c !!!\n"); : > + printf("vendor: 0x%04x; product: 0x%04x; release: 0x%04x\n", : > + sc->sc_vendor, sc->sc_product, sc->sc_release); : > +#endif /* UAUDIO_ASSUME_ASYNC */ : > return USBD_INVAL; : > } : > -#endif : > +#endif /* UAUDIO_MULTIPLE_ENDPOINTS */ : > + : > if (!sync && id->bNumEndpoints > 1) { : > printf("%s: non sync-pipe endpoint but multiple endpoints\n", : > device_get_nameunit(sc->sc_dev)); : > --- dev/usb/usb_quirks.c.orig 2007-07-22 17:59:45.000000000 +0200 : > +++ dev/usb/usb_quirks.c 2007-10-27 12:53:02.000000000 +0200 : > @@ -74,6 +74,8 @@ : > { USB_VENDOR_TELEX, USB_PRODUCT_TELEX_MIC1, 0x009, { UQ_AU_NO_FRAC : > }}, { USB_VENDOR_SILICONPORTALS, USB_PRODUCT_SILICONPORTALS_YAPPHONE, : > 0x100, { UQ_AU_INP_ASYNC }}, : > + { USB_VENDOR_PLANTRONICS, USB_PRODUCT_PLANTRONICS_DSP400, : > + 0x004, { UQ_AU_INP_ASYNC }}, : > { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_UN53B, ANY, { UQ_NO_STRINGS : > }}, /* XXX These should have a revision number, but I don't know what they : > are. */ { USB_VENDOR_HP, USB_PRODUCT_HP_895C, ANY, { UQ_BROKEN_BIDIR : > }}, --- dev/usb/usbdevs.orig 2007-10-05 09:26:39.000000000 +0200 : > +++ dev/usb/usbdevs 2007-10-27 12:53:06.000000000 +0200 : > @@ -1851,6 +1851,9 @@ : > product PLANEX3 GU1000T 0xab11 GU-1000T : > product PLANEX3 GWUS54MINI 0xab13 GW-US54Mini : > : > +/* Plantronics products */ : > +product PLANTRONICS DSP400 0x0ca1 DSP-400 Foldable PC Headset : > + : > /* Plextor Corp. */ : > product PLEXTOR 40_12_40U 0x0011 PlexWriter 40/12/40U : > : > >Release-Note: : > >Audit-Trail: : > >Unformatted: : > : : What you experience is very common and I think that a quirk would be useless. : How about assuming ASYNC by default ? If the patch is reliable (eg, we get no false positives from the printf), then we should eliminate the quirk. Warner From owner-freebsd-usb@FreeBSD.ORG Sun Oct 28 14:00:06 2007 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 6280316A418 for ; Sun, 28 Oct 2007 14:00: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 50E9513C481 for ; Sun, 28 Oct 2007 14:00: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.1/8.14.1) with ESMTP id l9SE06r8098123 for ; Sun, 28 Oct 2007 14:00:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9SE063F098122; Sun, 28 Oct 2007 14:00:06 GMT (envelope-from gnats) Date: Sun, 28 Oct 2007 14:00:06 GMT Message-Id: <200710281400.l9SE063F098122@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: "M. Warner Losh" Cc: Subject: Re: usb/117598: [patch] Not possible to record with Plantronics DSP-400 USB headset X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "M. Warner Losh" List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2007 14:00:06 -0000 The following reply was made to PR usb/117598; it has been noted by GNATS. From: "M. Warner Losh" To: hselasky@c2i.net Cc: freebsd-usb@FreeBSD.org, freebsd-gnats-submit@FreeBSD.org, henrik@gulbra.net Subject: Re: usb/117598: [patch] Not possible to record with Plantronics DSP-400 USB headset Date: Sun, 28 Oct 2007 07:50:45 -0600 (MDT) In message: <200710281327.26131.hselasky@c2i.net> Hans Petter Selasky writes: : On Sunday 28 October 2007, Henrik Gulbrandsen wrote: : > >Number: 117598 : > >Category: usb : > >Synopsis: [patch] Not possible to record with Plantronics DSP-400 : > > USB headset Confidential: no : > >Severity: non-critical : > >Priority: low : > >Responsible: freebsd-usb : > >State: open : > >Quarter: : > >Keywords: : > >Date-Required: : > >Class: sw-bug : > >Submitter-Id: current-users : > >Arrival-Date: Sun Oct 28 11:10:01 UTC 2007 : > >Closed-Date: : > >Last-Modified: : > >Originator: Henrik Gulbrandsen : > >Release: FreeBSD 7.0-BETA1.5 i386 : > >Organization: : > >Environment: : > : > FreeBSD Test 7.0-BETA1.5 FreeBSD 7.0-BETA1.5 #2 Sat Oct 27 12:53:33 CEST : > 2007 tester@Test:/usr/src/sys/i386/compile/GENERIC i386 : > : > (uname -a after patching) : > : > >Description: : > : > The Plantronics DSP-400 USB headset works fine for playback, but recording : > fails. A look at /dev/sndstat indicated that there were no recording : > channels available, and the relevant lines from /var/log/messages are as : > follows: : > : > Oct 25 17:37:43 root: Unknown USB device: vendor 0x047f product 0x0ca1 bus : > uhub2 Oct 25 17:37:43 kernel: uaudio0: class 0/0, rev 1.10/0.04, addr 2> on uhub2 Oct 25 17:37:43 kernel: : > uaudio0: ignored input endpoint of type adaptive Oct 25 17:37:43 last : > message repeated 2 times : > Oct 25 17:37:43 kernel: uaudio0: audio rev 1.00 : > Oct 25 17:37:43 kernel: pcm0: on uaudio0 : > : > Apparently, the headset reports using an adaptive audio source endpoint for : > data from the microphone. According to the USB specs, such endpoints need : > an explicit synch pipe to specify the wanted sample rate [See USB Spec rev : > 2.0, sec. 5.12.4.2 "Feedback" and the USB Device Class Definition for Audio : > Devices, sec. 3.7.2.2 "Isochronous Synch Endpoint"]. Unfortunately, FreeBSD : > currently doesn't support these synch endpoints. Fortunately, neither does : > the DSP-400 :-) : > : > The rest of the story follows in the fix description... : > : > >How-To-Repeat: : > : > Plug in your Plantronics DSP-400 headset and make sure that the snd_uaudio : > kernel module is loaded. Verify that playback works and recording fails. : > : > >Fix: : > : > Recompiling sys/dev/sound/usb/uaudio.c with defined : > UAUDIO_MULTIPLE_ENDPOINTS revealed that that the required synch endpoint : > didn't exist. There is already a USB quirk flag UQ_AU_INP_ASYNC, which : > specifies that a claimed adaptive input is in fact not adaptive at all, but : > better handled as asynchronous. After setting the flag for the DSP-400 : > headset, recording seems to work without obvious flaws. : > : > I'm attaching a patch that adds this to the set of known quirks. Since this : > has happened at least twice, I'm also adding some optional code that : > assumes that all cases with a mysteriously missing sync endpoint should be : > handled similarly. This may help to save some debugging time for other : > problem devices out there... : > : > : > Patch attached with submission follows: : > : > --- dev/sound/usb/uaudio.c.orig 2007-06-20 07:11:37.000000000 +0200 : > +++ dev/sound/usb/uaudio.c 2007-10-27 21:50:10.000000000 +0200 : > @@ -116,7 +116,11 @@ : > #else : > /* #define USB_DEBUG */ : > #endif : > + : > +/* A few knobs to enable/disable features... */ : > /* #define UAUDIO_MULTIPLE_ENDPOINTS */ : > +#define UAUDIO_ASSUME_ASYNC : > + : > #ifdef USB_DEBUG : > #define DPRINTF(x) do { if (uaudiodebug) printf x; } while (0) : > #define DPRINTFN(n,x) do { if (uaudiodebug>(n)) printf x; } while (0) : > @@ -2018,6 +2022,12 @@ : > dir == UE_DIR_IN && type == UE_ISO_ADAPT) : > type = UE_ISO_ASYNC; : > : > +#ifdef UAUDIO_ASSUME_ASYNC : > + /* Dammit! The spec doesn't allow this, so why not assume a quirk? */ : > + if (dir == UE_DIR_IN && type == UE_ISO_ADAPT && id->bNumEndpoints == 1) : > + type = UE_ISO_ASYNC; : > +#endif : > + : > /* We can't handle endpoints that need a sync pipe yet. */ : > sync = FALSE; : > if (dir == UE_DIR_IN && type == UE_ISO_ADAPT) { : > @@ -2050,9 +2060,18 @@ : > if (sync && id->bNumEndpoints <= 1) { : > printf("%s: a sync-pipe endpoint but no other endpoint\n", : > device_get_nameunit(sc->sc_dev)); : > +#ifndef UAUDIO_ASSUME_ASYNC : > + if (dir != UE_DIR_IN) : > + return USBD_INVAL; : > + printf("This device may need a UQ_AU_INP_ASYNC quirk flag.\n"); : > + printf("Consider adding it in sys/dev/usb/usb_quirks.c !!!\n"); : > + printf("vendor: 0x%04x; product: 0x%04x; release: 0x%04x\n", : > + sc->sc_vendor, sc->sc_product, sc->sc_release); : > +#endif /* UAUDIO_ASSUME_ASYNC */ : > return USBD_INVAL; : > } : > -#endif : > +#endif /* UAUDIO_MULTIPLE_ENDPOINTS */ : > + : > if (!sync && id->bNumEndpoints > 1) { : > printf("%s: non sync-pipe endpoint but multiple endpoints\n", : > device_get_nameunit(sc->sc_dev)); : > --- dev/usb/usb_quirks.c.orig 2007-07-22 17:59:45.000000000 +0200 : > +++ dev/usb/usb_quirks.c 2007-10-27 12:53:02.000000000 +0200 : > @@ -74,6 +74,8 @@ : > { USB_VENDOR_TELEX, USB_PRODUCT_TELEX_MIC1, 0x009, { UQ_AU_NO_FRAC : > }}, { USB_VENDOR_SILICONPORTALS, USB_PRODUCT_SILICONPORTALS_YAPPHONE, : > 0x100, { UQ_AU_INP_ASYNC }}, : > + { USB_VENDOR_PLANTRONICS, USB_PRODUCT_PLANTRONICS_DSP400, : > + 0x004, { UQ_AU_INP_ASYNC }}, : > { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_UN53B, ANY, { UQ_NO_STRINGS : > }}, /* XXX These should have a revision number, but I don't know what they : > are. */ { USB_VENDOR_HP, USB_PRODUCT_HP_895C, ANY, { UQ_BROKEN_BIDIR : > }}, --- dev/usb/usbdevs.orig 2007-10-05 09:26:39.000000000 +0200 : > +++ dev/usb/usbdevs 2007-10-27 12:53:06.000000000 +0200 : > @@ -1851,6 +1851,9 @@ : > product PLANEX3 GU1000T 0xab11 GU-1000T : > product PLANEX3 GWUS54MINI 0xab13 GW-US54Mini : > : > +/* Plantronics products */ : > +product PLANTRONICS DSP400 0x0ca1 DSP-400 Foldable PC Headset : > + : > /* Plextor Corp. */ : > product PLEXTOR 40_12_40U 0x0011 PlexWriter 40/12/40U : > : > >Release-Note: : > >Audit-Trail: : > >Unformatted: : > : : What you experience is very common and I think that a quirk would be useless. : How about assuming ASYNC by default ? If the patch is reliable (eg, we get no false positives from the printf), then we should eliminate the quirk. Warner From owner-freebsd-usb@FreeBSD.ORG Sun Oct 28 14:10:04 2007 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 180B016A41A for ; Sun, 28 Oct 2007 14: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 06B1B13C481 for ; Sun, 28 Oct 2007 14: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.1/8.14.1) with ESMTP id l9SEA2TP098477 for ; Sun, 28 Oct 2007 14:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9SEA2HP098476; Sun, 28 Oct 2007 14:10:02 GMT (envelope-from gnats) Date: Sun, 28 Oct 2007 14:10:02 GMT Message-Id: <200710281410.l9SEA2HP098476@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Henrik Gulbrandsen Cc: Subject: Re: usb/117598: [patch] Not possible to record with Plantronics DSP-400 USB headset X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Henrik Gulbrandsen List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2007 14:10:04 -0000 The following reply was made to PR usb/117598; it has been noted by GNATS. From: Henrik Gulbrandsen To: Hans Petter Selasky Cc: freebsd-gnats-submit@freebsd.org Subject: Re: usb/117598: [patch] Not possible to record with Plantronics DSP-400 USB headset Date: Sun, 28 Oct 2007 14:43:07 +0100 On Sun, 2007-10-28 at 14:27 +0200, Hans Petter Selasky wrote: > What you experience is very common and I think that a quirk would be useless. > How about assuming ASYNC by default ? Well, I couldn't think of a good reason not to, so that's why you'll find a "#define UAUDIO_ASSUME_ASYNC" at the beginning of the patch. I just wanted to make it easy to turn it off, just in case someone else could think of a good reason why that would be better - and the quirk fix is there to ensure that my own headset keeps working in that case. I wouldn't have added the quirk flag if it wasn't for the fact that it was already there. In a case like this, I'd prefer to work around the problem once and for all. See the usb/78984 patch for example. That was never applied, by the way. I probably missed some administrative detail. /Henrik From owner-freebsd-usb@FreeBSD.ORG Sun Oct 28 15:50:05 2007 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 116F816A41B for ; Sun, 28 Oct 2007 15:50:05 +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 F413F13C48A for ; Sun, 28 Oct 2007 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.1/8.14.1) with ESMTP id l9SFo4PH004321 for ; Sun, 28 Oct 2007 15:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9SFo499004320; Sun, 28 Oct 2007 15:50:04 GMT (envelope-from gnats) Date: Sun, 28 Oct 2007 15:50:04 GMT Message-Id: <200710281550.l9SFo499004320@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Henrik Gulbrandsen Cc: Subject: Re: usb/117598: [patch] Not possible to record with Plantronics DSP-400 USB headset X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Henrik Gulbrandsen List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2007 15:50:05 -0000 The following reply was made to PR usb/117598; it has been noted by GNATS. From: Henrik Gulbrandsen To: "M. Warner Losh" Cc: hselasky@c2i.net, freebsd-gnats-submit@FreeBSD.org Subject: Re: usb/117598: [patch] Not possible to record with Plantronics DSP-400 USB headset Date: Sun, 28 Oct 2007 16:45:46 +0100 --=-58217vnrXX1U7ux/YEJl Content-Type: text/plain Content-Transfer-Encoding: 7bit On Sun, 2007-10-28 at 07:50 -0600, M. Warner Losh wrote: > If the patch is reliable (eg, we get no false positives from the > printf), then we should eliminate the quirk. True, but this would require at least a small leap of faith, since I haven't analyzed the consequences in detail. All I know is that we are currently handling this as an error situation and return USBD_INVAL. Assuming an asynchronous endpoint and continuing will work around the problem if this is indeed what the device expects, but it may lead to other bugs if the core problem is something else. My qualified guess is that this will probably help more often than it hurts, so I enabled UAUDIO_ASSUME_ASYNC by default. If we check this in and nobody complains in the near future, then it's probably safe to do as you say and eliminate the quirk (and the printf) in a later version. /Henrik P.S. The patch is virtually unreadable in the web version, so I'm attaching it again, hoping to get better formatting this time. --=-58217vnrXX1U7ux/YEJl Content-Disposition: attachment; filename=dsp-400.diff Content-Type: text/x-patch; name=dsp-400.diff; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit --- dev/sound/usb/uaudio.c.orig 2007-06-20 07:11:37.000000000 +0200 +++ dev/sound/usb/uaudio.c 2007-10-27 21:50:10.000000000 +0200 @@ -116,7 +116,11 @@ #else /* #define USB_DEBUG */ #endif + +/* A few knobs to enable/disable features... */ /* #define UAUDIO_MULTIPLE_ENDPOINTS */ +#define UAUDIO_ASSUME_ASYNC + #ifdef USB_DEBUG #define DPRINTF(x) do { if (uaudiodebug) printf x; } while (0) #define DPRINTFN(n,x) do { if (uaudiodebug>(n)) printf x; } while (0) @@ -2018,6 +2022,12 @@ dir == UE_DIR_IN && type == UE_ISO_ADAPT) type = UE_ISO_ASYNC; +#ifdef UAUDIO_ASSUME_ASYNC + /* Dammit! The spec doesn't allow this, so why not assume a quirk? */ + if (dir == UE_DIR_IN && type == UE_ISO_ADAPT && id->bNumEndpoints == 1) + type = UE_ISO_ASYNC; +#endif + /* We can't handle endpoints that need a sync pipe yet. */ sync = FALSE; if (dir == UE_DIR_IN && type == UE_ISO_ADAPT) { @@ -2050,9 +2060,18 @@ if (sync && id->bNumEndpoints <= 1) { printf("%s: a sync-pipe endpoint but no other endpoint\n", device_get_nameunit(sc->sc_dev)); +#ifndef UAUDIO_ASSUME_ASYNC + if (dir != UE_DIR_IN) + return USBD_INVAL; + printf("This device may need a UQ_AU_INP_ASYNC quirk flag.\n"); + printf("Consider adding it in sys/dev/usb/usb_quirks.c !!!\n"); + printf("vendor: 0x%04x; product: 0x%04x; release: 0x%04x\n", + sc->sc_vendor, sc->sc_product, sc->sc_release); +#endif /* UAUDIO_ASSUME_ASYNC */ return USBD_INVAL; } -#endif +#endif /* UAUDIO_MULTIPLE_ENDPOINTS */ + if (!sync && id->bNumEndpoints > 1) { printf("%s: non sync-pipe endpoint but multiple endpoints\n", device_get_nameunit(sc->sc_dev)); --- dev/usb/usb_quirks.c.orig 2007-07-22 17:59:45.000000000 +0200 +++ dev/usb/usb_quirks.c 2007-10-27 12:53:02.000000000 +0200 @@ -74,6 +74,8 @@ { USB_VENDOR_TELEX, USB_PRODUCT_TELEX_MIC1, 0x009, { UQ_AU_NO_FRAC }}, { USB_VENDOR_SILICONPORTALS, USB_PRODUCT_SILICONPORTALS_YAPPHONE, 0x100, { UQ_AU_INP_ASYNC }}, + { USB_VENDOR_PLANTRONICS, USB_PRODUCT_PLANTRONICS_DSP400, + 0x004, { UQ_AU_INP_ASYNC }}, { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_UN53B, ANY, { UQ_NO_STRINGS }}, /* XXX These should have a revision number, but I don't know what they are. */ { USB_VENDOR_HP, USB_PRODUCT_HP_895C, ANY, { UQ_BROKEN_BIDIR }}, --- dev/usb/usbdevs.orig 2007-10-05 09:26:39.000000000 +0200 +++ dev/usb/usbdevs 2007-10-27 12:53:06.000000000 +0200 @@ -1851,6 +1851,9 @@ product PLANEX3 GU1000T 0xab11 GU-1000T product PLANEX3 GWUS54MINI 0xab13 GW-US54Mini +/* Plantronics products */ +product PLANTRONICS DSP400 0x0ca1 DSP-400 Foldable PC Headset + /* Plextor Corp. */ product PLEXTOR 40_12_40U 0x0011 PlexWriter 40/12/40U --=-58217vnrXX1U7ux/YEJl-- From owner-freebsd-usb@FreeBSD.ORG Sun Oct 28 18:40:01 2007 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 9BA2416A475 for ; Sun, 28 Oct 2007 18:40:01 +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 74C4F13C4A7 for ; Sun, 28 Oct 2007 18:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9SIe1kI014957 for ; Sun, 28 Oct 2007 18:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9SIe1Gm014956; Sun, 28 Oct 2007 18:40:01 GMT (envelope-from gnats) Resent-Date: Sun, 28 Oct 2007 18:40:01 GMT Resent-Message-Id: <200710281840.l9SIe1Gm014956@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, Zuikov Artyom <4ertus2@mail.ru> Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC52D16A417 for ; Sun, 28 Oct 2007 18:35:37 +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 BB43013C4A5 for ; Sun, 28 Oct 2007 18:35:37 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l9SIZ2Yj026815 for ; Sun, 28 Oct 2007 18:35:02 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l9SIZ2L2026814; Sun, 28 Oct 2007 18:35:02 GMT (envelope-from nobody) Message-Id: <200710281835.l9SIZ2L2026814@www.freebsd.org> Date: Sun, 28 Oct 2007 18:35:02 GMT From: Zuikov Artyom <4ertus2@mail.ru> To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/117613: uhci interrupt storm & USB leaked memory on destroy 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, 28 Oct 2007 18:40:01 -0000 >Number: 117613 >Category: usb >Synopsis: uhci interrupt storm & USB leaked memory on destroy >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 28 18:40:01 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Zuikov Artyom >Release: 6.3-PRERELEASE >Organization: >Environment: FreeBSD 4ertus2 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #6: Sun Oct 28 20:31:08 UTC 2007 42@4ertus2:/usr/obj/usr/src/sys/COMP42 i386 >Description: # KERNCONF # cpu I686_CPU # cat /etc/make.conf | grep CFLAGS CFLAGS= -O2 -pipe # kldload usb && pciconf -l && sleep 4 && kldunload usb hostb0@pci0:0:0: class=0x060000 card=0x80331043 chip=0x03051106 rev=0x03 hdr=0x00 pcib1@pci0:1:0: class=0x060400 card=0x00000000 chip=0x83051106 rev=0x00 hdr=0x01 isab0@pci0:4:0: class=0x060100 card=0x80331043 chip=0x06861106 rev=0x22 hdr=0x00 atapci0@pci0:4:1: class=0x01018a card=0x00000000 chip=0x05711106 rev=0x10 hdr=0x00 uhci0@pci0:4:2: class=0x0c0300 card=0x12340925 chip=0x30381106 rev=0x10 hdr=0x00 uhci1@pci0:4:3: class=0x0c0300 card=0x12340925 chip=0x30381106 rev=0x10 hdr=0x00 hostb1@pci0:4:4: class=0x060000 card=0x80331043 chip=0x30571106 rev=0x30 hdr=0x00 pcm0@pci0:10:0: class=0x040100 card=0x80271102 chip=0x00021102 rev=0x08 hdr=0x00 emujoy0@pci0:10:1: class=0x098000 card=0x00201102 chip=0x70021102 rev=0x08 hdr=0x00 dc0@pci0:11:0: class=0x020000 card=0x00000000 chip=0x00191011 rev=0x41 hdr=0x00 nvidia0@pci1:0:0: class=0x030000 card=0x00000000 chip=0x017110de rev=0xa3 hdr=0x00 # dmesg uhci0: port 0xd400-0xd41f irq 6 at device 4.2 on pci0 uhci0: [GIANT-LOCKED] interrupt storm detected on "irq6:"; throttling interrupt source usb0: on uhci0 usb0: USB revision 1.0 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xd000-0xd01f irq 6 at device 4.3 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered interrupt storm detected on "irq6:"; throttling interrupt source interrupt storm detected on "irq6:"; throttling interrupt source interrupt storm detected on "irq6:"; throttling interrupt source interrupt storm detected on "irq6:"; throttling interrupt source interrupt storm detected on "irq6:"; throttling interrupt source (null): at uhub0 port 1 (addr 2) disconnected uhub0: detached uhub1: detached usb0: detached usb1: detached uhci0: detached uhci1: detached Warning: memory type USBdev leaked memory on destroy (12 allocations, 6144 bytes leaked). Warning: memory type USB leaked memory on destroy (27 allocations, 2048 bytes leaked). stray irq6 >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Sun Oct 28 21:01:41 2007 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 BCADD16A468 for ; Sun, 28 Oct 2007 21:01:41 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id A235613C4B2 for ; Sun, 28 Oct 2007 21:01:41 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1ImFGP-0000Kb-CH for freebsd-usb@freebsd.org; Sun, 28 Oct 2007 14:01:41 -0700 Message-ID: <13457914.post@talk.nabble.com> Date: Sun, 28 Oct 2007 14:01:41 -0700 (PDT) From: poorboy To: freebsd-usb@freebsd.org In-Reply-To: <000001c6e005$9914bfd0$eacc27be@SERVIDOR> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: elpobrero@hotmail.com References: <000001c6e005$9914bfd0$eacc27be@SERVIDOR> Subject: Re: Motorola A41x/V32x 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: Sun, 28 Oct 2007 21:01:41 -0000 how do i down load it? AMYSE wrote: > > Please could you send me the Motorola A41x/V32x driver, because I can not > find it. > > > > Thank you in advanced > > _______________________________________________ > freebsd-usb@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-usb > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" > > -- View this message in context: http://www.nabble.com/Motorola-A41x-V32x-driver-tf2327751.html#a13457914 Sent from the freebsd-usb mailing list archive at Nabble.com. From owner-freebsd-usb@FreeBSD.ORG Mon Oct 29 05:17:58 2007 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 10A9216A417 for ; Mon, 29 Oct 2007 05:17:58 +0000 (UTC) (envelope-from freebsd.org@ab.ote.we.lv) Received: from purple.the-7.net (purple.the-7.net [IPv6:2001:470:1f01:622:230:48ff:fe23:4c67]) by mx1.freebsd.org (Postfix) with ESMTP id EA00313C481 for ; Mon, 29 Oct 2007 05:17:57 +0000 (UTC) (envelope-from freebsd.org@ab.ote.we.lv) Received: from seerajeane.astralblue.net (seerajeane.astralblue.net [IPv6:2001:470:1f01:623:2e0:81ff:fe51:1e73]) by purple.the-7.net (8.14.1/8.14.1) with ESMTP id l9T5H7mo055846 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=OK) for ; Sun, 28 Oct 2007 22:17:07 -0700 (PDT) (envelope-from freebsd.org@ab.ote.we.lv) Received: from seerajeane.astralblue.net (seerajeane.astralblue.net [127.0.0.1]) by seerajeane.astralblue.net (8.14.1/8.14.1) with ESMTP id l9T5HihF005160 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Sun, 28 Oct 2007 22:17:46 -0700 (PDT) (envelope-from freebsd.org@ab.ote.we.lv) Message-ID: <47256CF8.6050909@ab.ote.we.lv> Date: Sun, 28 Oct 2007 22:17:44 -0700 From: "Eugene M. Kim" User-Agent: Thunderbird 2.0.0.6 (X11/20070924) MIME-Version: 1.0 To: usb@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=10.0 tests=ALL_TRUSTED autolearn=disabled version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on purple.the-7.net Cc: Subject: Support for USB Interface Association Descriptor (IAD)? 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, 29 Oct 2007 05:17:58 -0000 Hello, Is anyone working on supporting the USB interface association descriptor? More and more devices these days use it to define a composite function with multiple interfaces, such as a webcam with both audio and video interfaces. Cheers, Eugene From owner-freebsd-usb@FreeBSD.ORG Mon Oct 29 10:03:56 2007 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 78C1D16A41A; Mon, 29 Oct 2007 10:03:55 +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 32E4313C48D; Mon, 29 Oct 2007 10:03:55 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9TA3t1m086068; Mon, 29 Oct 2007 10:03:55 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9TA3t06086064; Mon, 29 Oct 2007 10:03:55 GMT (envelope-from linimon) Date: Mon, 29 Oct 2007 10:03:55 GMT Message-Id: <200710291003.l9TA3t06086064@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-usb@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: usb/117366: USB keyboard status lights not working properly 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, 29 Oct 2007 10:03:57 -0000 Synopsis: USB keyboard status lights not working properly Responsible-Changed-From-To: freebsd-bugs->freebsd-usb Responsible-Changed-By: linimon Responsible-Changed-When: Mon Oct 29 10:03:18 UTC 2007 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=117366 From owner-freebsd-usb@FreeBSD.ORG Mon Oct 29 10:20:03 2007 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 8E47916A418; Mon, 29 Oct 2007 10:20:03 +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 5791313C494; Mon, 29 Oct 2007 10:20:03 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9TAK38f087197; Mon, 29 Oct 2007 10:20:03 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9TAK3iI087193; Mon, 29 Oct 2007 10:20:03 GMT (envelope-from linimon) Date: Mon, 29 Oct 2007 10:20:03 GMT Message-Id: <200710291020.l9TAK3iI087193@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-usb@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: usb/117200: [ugen] ugen0 prints strange string on attach if detached quickly 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, 29 Oct 2007 10:20:04 -0000 Old Synopsis: ugen0 prints strange string on attach if detached quickly New Synopsis: [ugen] ugen0 prints strange string on attach if detached quickly Responsible-Changed-From-To: freebsd-bugs->freebsd-usb Responsible-Changed-By: linimon Responsible-Changed-When: Mon Oct 29 10:19:33 UTC 2007 Responsible-Changed-Why: Reclassify. http://www.freebsd.org/cgi/query-pr.cgi?pr=117200 From owner-freebsd-usb@FreeBSD.ORG Mon Oct 29 11:07:18 2007 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 483C216A479 for ; Mon, 29 Oct 2007 11:07:15 +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 9518B13C4B2 for ; Mon, 29 Oct 2007 11:07:14 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9TB7EFb090288 for ; Mon, 29 Oct 2007 11:07:14 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9TB7DnG090284 for freebsd-usb@FreeBSD.org; Mon, 29 Oct 2007 11:07:13 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 29 Oct 2007 11:07:13 GMT Message-Id: <200710291107.l9TB7DnG090284@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, 29 Oct 2007 11:07:26 -0000 Current FreeBSD problem reports Critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o usb/84750 usb [hang] 6-BETA2 reboot/shutdown with root_fs on externa o usb/91629 usb usbd_abort_pipe() may result in infinite loop 2 problems total. Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o usb/46176 usb [panic] umass causes kernel panic if device removed be o i386/46371 usb USB controller cannot be initialized on IBM Netfinity o bin/57255 usb usbd and multi-function devices o usb/63621 usb [usb] USB MemoryStick Reader stalls/crashes system o usb/69006 usb [patch] Apple Cinema Display hangs USB ports o usb/71155 usb [usb] misbehaving usb-printer hangs processes, causes o usb/73307 usb [panic] Kernel panics on USB disconnect o usb/74771 usb [umass] mounting write-protected umass device as read/ o usb/75705 usb [panic] da0 attach / Optio S4 (with backtrace) o usb/75797 usb 5.3-STABLE(2005 1/4) detect USB headset, But can not f o usb/76395 usb USB printer does not work, usbdevs says "addr 0 should o usb/77184 usb [panic] kernel panic on USB device disconnect o usb/77294 usb [ulpcom] [panic] ucom + ulpcom panic o usb/79269 usb USB ohci da0 plug/unplug causes crashes and lockups. o usb/79287 usb [uhci] UHCI hang after interrupt transfer o usb/79524 usb printing to Minolta PagePro 1[23]xxW via USB fails wit a usb/79656 usb [usb] RHSC interrupts lost o usb/79722 usb [usb] wrong alignments in ehci.h o usb/80040 usb [hang] Use of sound mixer causes system freeze with ua o usb/80361 usb [patch] mounting of usb-stick fails o usb/80829 usb possible panic when loading USB-modules o usb/80862 usb [patch] USB locking issues: missing some Giant calls o usb/82350 usb [usb] null pointer dereference in USB stack o usb/82520 usb Reboot when USL101 connected s usb/82569 usb [usb] USB mass storage plug/unplug causes system panic o usb/82660 usb [umass] [panic] EHCI: I/O stuck in state 'physrd'/pani o usb/83563 usb [panic] Page Fault while detaching Mpman Usb device o usb/83677 usb [usb] usb controller often not detected (Sun W2100z) o usb/83756 usb [ums] [patch] Microsoft Intellimouse Explorer 4.0A doe o usb/83977 usb [ucom] [panic] ucom1: open bulk out error (addr 2): IN o usb/84326 usb [umass] Panic trying to connect SCSI tape drive via US o usb/84336 usb [usb] [reboot] instant system reboot when unmounting a o usb/86767 usb [usb] [patch] bogus "slice starts beyond end of the di o usb/88743 usb [hang] USB makes kernel hang at boot (regression in 6. o usb/88966 usb [modules] kldunload ucom.ko returns "Device busy" erro o usb/89003 usb LaCie Firewire drive not properly supported under 6.0 o usb/89954 usb [usb] USB Disk driver race condition? o usb/90700 usb [umass] [panic] Kernel panic on connect/mount/use umas o usb/91238 usb [umass] USB tape unit fails to write a second tape fil o usb/91283 usb booting very slow with usb devices connection (regress o usb/91538 usb [ulpt] [patch] Unable to print to EPSON CX3500 o usb/91906 usb [hang] FreeBSD hangs while booting with USB legacy sup o usb/92052 usb [unlpt] usbd causes defunct process with busy file-han o usb/92083 usb [ural] [panic] panic using WPA on ural NIC in 6.0-RELE o usb/92142 usb SET_ADDR_FAILED and SHORT_XFER errors from usb drivers o usb/92171 usb [panic] panic unplugging Vodafone Mobile Connect (UMTS o usb/93155 usb [ulpt] /dev/ulpt0: device busy, USB printer does not w o usb/93408 usb [mouse] hw.acpi.cpu.cx_lowest=C3 on AMD Turion causes o usb/93640 usb [irq] device ehci causes interrupt storm on this MSI a o usb/93828 usb [panic] ohci causes panic on boot (HP Pavillion d4100e o usb/94166 usb btx halted with a flashcard plugged o usb/94384 usb [panic] kernel panic with usb2 hardware o usb/94717 usb [ulpt] Reading from /dev/ulpt can break work of a UHCI o usb/94813 usb [umass] mounting write-protected umass device freezes o usb/94897 usb [panic] Kernel Panic when cleanly unmounting USB disk o usb/95131 usb [install] Boot/setup process does not accept key strok o usb/95348 usb [kbd] USB keyboard unplug causes noise on screen o usb/95562 usb [umass] Write Stress in USB Mass drive causes "vinvalb o usb/95636 usb [boot] 5 minute delay at boot when using VT6205 based o usb/96120 usb [mouse] USB mouse not always detected o usb/96224 usb [usb] mount_msdosfs cause page fault in syncer process o usb/96457 usb [panic] fatback on umass = reboot o usb/97286 usb [mouse] MS Wireless Intellimouse Explorer 2.0 doesn't o usb/99431 usb [kbd] FreeBSD on MSI 6566E (Intel 845E motherboards) d o usb/101096 usb [if_ural] [panic] USB WLAN occasionally causes kernel- o usb/101448 usb [ohci] FBSD 6.1-STABLE/AMD64 crashes under heavy USB/O o usb/101752 usb [umass] [panic] 6.1-RELEASE kernel panic on usb device o usb/102066 usb [ukbd] usb keyboard and multimedia keys don't work o usb/102096 usb [patch] /usr/sbin/usbd does not handle multiple device o usb/103025 usb [usb] wrong detection of USB device for FreeBSD 6.1 an o usb/104292 usb [hang] system lockup on forced umount of usb-storage d o usb/104830 usb [umass] system crashes when copying data to umass devi o usb/105186 usb USB 2.0/ehci on FreeBSD 6.2-PRE/AMD64 crashes box o usb/106615 usb [uftdi] uftdi module does not automatically load with o usb/106648 usb [hang] USB Floppy on D1950 10 min Hang on Insert w/o F o usb/106832 usb USB HP printer is not detected by kernel when ACPI ena o usb/107248 usb [umass] [patch] scsi_da.c quirk for Cowon iAUDIO X5 MP o usb/107446 usb [umass] umass problems (usb and fw disks) o usb/107827 usb [panic] ohci_add_done addr not found o usb/107848 usb [umass] cannot access Samsung flash disk o usb/107924 usb [patch] usbd(8) does not call detach o usb/108513 usb [umass] Creative MuVo TX FM fails in 6.2-RELEASE (regr o usb/109274 usb [usb] MCP55 USB Controller fails to attach in AMD64 Cu o usb/109397 usb [panic] on boot from USB flash o usb/110856 usb [ugen] [patch] interrupt in msgs are truncated when bu o usb/110988 usb [umass] [patch] Handling of quirk IGNORE_RESIDUE is um o usb/111753 usb [uhid] [panic] Replicable system panic involving UHID o usb/112568 usb USB mode may wrong when mounting Playstation Pro o usb/112631 usb [panic] Problem with SONY DSC-S80 camera o usb/112640 usb [usb] [hang] Kernel freezes when writing a file to an o usb/113478 usb [boot] FreeBSD could not start on Core2Duo notebook fr o usb/113629 usb [ukbd] Dropped USB keyboard events on Dell Latitude D6 o usb/113672 usb [ehci] [panic] Kernel panic with AEWIN CB6971 o usb/113851 usb [boot] Unable to boot install cd from USB-CDROM o usb/113977 usb [feature request] Need a way to set mode of USB disk's o usb/114310 usb [panic] USB hub attachment panics kernel during libusb o usb/114682 usb USB media-card reader unusable o kern/114780 usb [uplcom] [panic] Panics while stress testing the uplco o usb/115298 usb Turning off USB printer panics kernel o usb/116561 usb RELENG_6 umodem panic "trying to sleep while sleeping o usb/116947 usb [patch] enable boot protocol on the USB keyboards o usb/117200 usb [ugen] ugen0 prints strange string on attach if detach o usb/117313 usb [panic] panic on usb camera attachment o usb/117613 usb uhci interrupt storm & USB leaked memory on destroy 104 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem o usb/40948 usb [usb] USB HP CDW8200 does not work o usb/48342 usb [PATCH] usbd dynamic device list. f usb/51958 usb [urio] [patch] update for urio driver o usb/52026 usb [usb] feature request: umass driver support for InSyst o usb/56095 usb [usb] [patch] QUIRK: Apacer Pen Drive fails to work o usb/59698 usb [kbd] [patch] Rework of ukbd HID to AT code translatio o usb/62257 usb [umass] card reader UCR-61S2B is only half-supported o usb/63837 usb [uhid] [patch] USB: hid_is_collection() only looks for o usb/65769 usb [usb] Call to tcflush(x, TCIFLUSH) stops input on usb- o usb/66547 usb [usb] Palm Tungsten T USB does not initialize correctl o usb/68232 usb [ugen] [patch] ugen(4) isochronous handling correction o usb/70523 usb [usb] [patch] umct sending/receiving wrong characters o usb/71280 usb [aue] aue0 device (linksys usb100tx) doesn't work in 1 o usb/71416 usb [ugen] Cryptoflex e-gate USB token (ugen0) detach is n o usb/71417 usb [ugen] Cryptoflex e-gate USB token (ugen0) communicati o usb/71455 usb [usb] Slow USB umass performance of 5.3 o usb/72380 usb [usb] USB does not work [dual Celeron Abit] o usb/72733 usb Kyocera 7135 Palm OS connection problem. o usb/73056 usb [usb] Sun Microsystems Type 6 USB mouse not working in o usb/74211 usb [umass] USB flash drive causes CAM status 0x4 on 4.10R f usb/74453 usb [patch] Q-lity CD-RW USB ECW-043 (ScanLogic SL11R chip o usb/74557 usb imation 500mb usb key can only be written halfway on f o usb/75764 usb [umass] [patch] "umass0: Phase Error" - no device for o usb/75800 usb [ucom] ucom1: init failed STALLED error in time of syn o usb/75928 usb Cytronix SmartMedia card (SMC) reader has problems whe o usb/76461 usb [umass] disklabel of umass(4)-CAM(4)-da(4) not used by o usb/76653 usb [umass] [patch] Problem with Asahi Optical usb device o usb/76732 usb Mouse problems with USB KVM Switch f usb/78984 usb [patch] Creative MUVO umass failure o usb/79723 usb [usb] prepare for high speed isochronous transfers o usb/80774 usb [patch] have "usbd_find_desc" in line with the other " o usb/80776 usb [udav] UDAV device driver shouldn't use usb_add_task o usb/80777 usb usb_rem_task() should wait for callback to complete? o usb/80854 usb suggestion for new iface-no-probe mechanism o usb/80935 usb [uvisor] [patch] uvisor.c is not work with CLIE TH55. f usb/81621 usb external hd hangs under load on ehci o usb/83863 usb [ugen] Communication problem between opensc/openct via o usb/85067 usb Cannot attach ScanJet 4300C to usb device o usb/85257 usb [boot] BTX boot loader fails on USB CDROM (HP DL145 Op o usb/86298 usb [mouse] Known good USB mouse won't work with correct s o usb/87224 usb Cannot mount USB Zip750 o usb/87648 usb [mouse] Logitech USB-optical mouse problem. o usb/88408 usb [axe] axe0 read PHY failed o usb/91546 usb [umodem] [patch] Nokia 6630 mobile phone does not work o usb/91811 usb Compact Flash in HP Photosmart 2610 return " Medium n o usb/91896 usb Serial Number of USB Memory Sticks is not passed throu o usb/92852 usb [mouse] [patch] Vertical scroll not working properly o o usb/93389 usb [umass] [patch] Digital Camera Pentax S60 don't work o usb/93872 usb [patch] SCSI quirk required for ELTA 8061 OL USB memor o usb/95037 usb [umass] USB disk not recognized on hot-plug. o usb/95173 usb [umass] [patch] cannot mount external usb harddisk VIA o usb/96381 usb [patch] add a quirk table entry for a flash ram usb st o usb/97175 usb [hang] USB cardreader hangs system o usb/97472 usb [patch] add support for Olympus C150,D390 o usb/98343 usb [boot] BBB reset failed errors with Creative Muvo MP3 o usb/99538 usb [kbd] while using USB keyboard default params of atkbd o usb/100746 usb [kbd] system does not boot due to USB keyboard problem o usb/101761 usb [patch] usb.h: increase maximal size of report descrip o usb/101775 usb [libusbhid] [patch] possible error in report descripto o usb/102678 usb [kbd] Dell PowerEdge DRAC5 USB Keyboard does not work o usb/102976 usb [panic] Casio Exilim Digital Camera cause panic o usb/103046 usb [ulpt] [patch] ulpt event driven I/O with select(2) an o usb/103289 usb USB 2.0 problems on AMD LX-800 CPU and CS-5536 chipset o usb/103418 usb [usb] [patch] usbhidctl: add ability to write output a o usb/103917 usb USB driver reports "Addr 0 should never happen" o usb/104290 usb [umass] [patch] quirk: TOSHIBA DVD-RAM drive (libretto o usb/104352 usb [ural] [patch] ural driver doesnt work o usb/104645 usb Rave C-201 MP3 player does not communicate o usb/105065 usb [sata] SATA - USB Bridge f usb/105361 usb [panic] Kernel panic during unmounting mass storage (C o usb/106041 usb FreeBSD does not recognise Mustek BearPaw 2400TA usb s o usb/106621 usb [axe] [patch] DLINK DUB-E100 support broken o usb/106861 usb [usbdevs] [patch]: usbdevs update: Add product ACER Ze o usb/107243 usb [patch] Apacer USB Flash Drive quirk o usb/107388 usb [PATCH] Add utoppy device from NetBSD o usb/107496 usb USB device problem on RELENG_6_2 (SHORT_XFER) (regress o usb/107665 usb [usb] [patch] uscanner support for epson stylus DX5050 o usb/107701 usb [usbd] usbd ignores "detach" o usb/107935 usb [uplcom] [panic] panic while accessing /dev/cuaU0 o usb/108056 usb [ohci] Mouse gets powered off during device probe when o usb/108344 usb [panic] kernel with atausb panics when unplugging USB o usb/108509 usb [hang] FreeBSD hang at startup after ehci0 detected (C o usb/110197 usb [umass] Sony PSP umass device does not detach from EHC s usb/110991 usb [patch] QUIRK: Super Top IDE DEVICE (depends on usb/11 o usb/112461 usb [ehci] ehci USB 2.0 doesn't work on nforce4 o usb/112463 usb problem with Samsung USB DVD writer, libscg and FreeBS o usb/112944 usb [patch] Bi-directional access to HP LaserJet 1010 prin o usb/113060 usb [usbdevs] [patch] Samsung printer not working in bidir o usb/113432 usb WARNING: attempt to net_add_domain(netgraph) after dom o conf/114013 usb [patch] WITHOUT_USB allow to compil a lot of USB stuff o usb/114068 usb [umass] [patch] Problems with connection of the umass p usb/114860 usb if_udav / ShanTou ST268 USB NIC o usb/114916 usb USB Maxtor drive (L300RO) requires quirk. o usb/115080 usb using a Hercules HWGUSB2-54-V2 wifi usb adapter o usb/115197 usb can not install from USB stick drive o usb/115400 usb [ehci] Problem with EHCI on ASUS M2N4-SLI o usb/115737 usb uplcom doesn't identify my Prolific 2303 any more o usb/115933 usb RATOC REX-USB60F (usb serial converter) is working o usb/115935 usb [patch] kernel counterproductively attaches to Cyber P o usb/116057 usb [patch] Update quirks for the MetaGeek Wi-Spy o usb/116282 usb Cannot print on USB HP LJ1018 or LJ1300 o usb/116574 usb [patch] Add device ids for ICH8 USB chipsets o usb/116898 usb panic: sleeping thread while using USB hard drive o usb/117183 usb USB/fusefs -- Fatal trap 12: page fault while in kerne o usb/117185 usb [umodem] Add support for UNION interface descriptor o usb/117205 usb [uscanner] [patch] uscanner support for HP ScanJet 447 o usb/117366 usb USB keyboard status lights not working properly o usb/117546 usb [usbdevs] [patch] Add MaxStream ZigBee product ID to u o usb/117598 usb [uaudio] [patch] Not possible to record with Plantroni 110 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Oct 29 19:30:04 2007 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 5C01816A417 for ; Mon, 29 Oct 2007 19:30: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 4DB1B13C4A7 for ; Mon, 29 Oct 2007 19:30: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.1/8.14.1) with ESMTP id l9TJU4gL017594 for ; Mon, 29 Oct 2007 19:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9TJU4pO017589; Mon, 29 Oct 2007 19:30:04 GMT (envelope-from gnats) Date: Mon, 29 Oct 2007 19:30:04 GMT Message-Id: <200710291930.l9TJU4pO017589@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Emil Mikulic Cc: Subject: Re: kern/117366: USB keyboard status lights not working properly X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Emil Mikulic List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2007 19:30:04 -0000 The following reply was made to PR usb/117366; it has been noted by GNATS. From: Emil Mikulic To: bug-followup@FreeBSD.org, bruce@cran.org.uk Cc: Subject: Re: kern/117366: USB keyboard status lights not working properly Date: Mon, 29 Oct 2007 17:17:59 +1100 This has been bugging me for a while also. I would like to contribute a data point: FreeBSD 7.0-BETA1 (RELENG_7 as of last week) on i386. HP xw4200 workstation, usbdevs -v reports: [...] Controller /dev/usb2: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 addr 2: low speed, power 100 mA, config 1, HP Basic USB Keyboard(0x0024), CHICONY(0x03f0), rev 3.00 [...] I have similar symptoms to Bruce although different (but still wrong) combination of LEDs on. The no-async one-line patch suggested by Alexander Stepanov seems to cure the problem. As does 'set hint.atkbd.0.disabled="1"' at the loader prompt (without the async patch) Instrumenting bits of kbdmux, ukbd and atkbd suggests that, without the above hint, when I hit NumLock, roughly the following happens: kbdmux_ioctl cmd=KDSETLED, arg=2 ukbd:set_leds leds=1 atkbd_ioctl cmd=KDSETLED, arg=2 Hitting NumLock again to turn it off: kbdmux_ioctl cmd=KDSETLED, arg=0 ukbd:set_leds leds=0 atkbd_ioctl cmd=KDSETLED, arg=0 In atkbd_ioctl(), KBD_HAS_DEVICE(kbd) evaluates to false, so write_kbd() isn't called. I'm not sure which code path is disabled by the hint that makes the LEDs behave. Regardless of whether NumLock is on or off, the LEDs on the keyboard show Caps is on and Num and Scroll are off. This probably doesn't mean much. This is all on the text console. I haven't tried X11 yet on this workstation. --Emil From owner-freebsd-usb@FreeBSD.ORG Wed Oct 31 13:50:02 2007 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 5FB5016A41B for ; Wed, 31 Oct 2007 13:50: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 3DA0C13C4A3 for ; Wed, 31 Oct 2007 13:50: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.1/8.14.1) with ESMTP id l9VDo2j7036907 for ; Wed, 31 Oct 2007 13:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9VDo2NO036906; Wed, 31 Oct 2007 13:50:02 GMT (envelope-from gnats) Resent-Date: Wed, 31 Oct 2007 13:50:02 GMT Resent-Message-Id: <200710311350.l9VDo2NO036906@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, Kyryll A Mirnenko Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBC6216A417 for ; Wed, 31 Oct 2007 13:46:54 +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 C074C13C481 for ; Wed, 31 Oct 2007 13:46:54 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l9VDkr5b082505 for ; Wed, 31 Oct 2007 13:46:53 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l9VDkrbG082504; Wed, 31 Oct 2007 13:46:53 GMT (envelope-from nobody) Message-Id: <200710311346.l9VDkrbG082504@www.freebsd.org> Date: Wed, 31 Oct 2007 13:46:53 GMT From: Kyryll A Mirnenko To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/117719: umass plugging with hald running causes kernel panics on 7.0 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, 31 Oct 2007 13:50:02 -0000 >Number: 117719 >Category: usb >Synopsis: umass plugging with hald running causes kernel panics on 7.0 >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 31 13:50:01 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Kyryll A Mirnenko >Release: RELENG_7 >Organization: >Environment: FreeBSD miryanote 7.0-BETA1 FreeBSD 7.0-BETA1 #0: Tue Oct 30 18:58:45 EET 2007 mirya@miryanote:/usr/src/sys/i386/compile/MY-LITE i386 >Description: I have recent RELENG_7 with hald running (yes, hal port was rebuilt twice). I'm trying to plug in an USB hard disk, here's devices list from dmesg leading to it: acpi0: on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pci0: at device 0.1 (no driver attached) pci0: at device 0.3 (no driver attached) ehci0: mem 0xe0100000-0xe01003ff irq 11 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] ehci0: [ITHREAD] usb3: EHCI version 1.0 usb3: companion controllers, 2 ports each: usb0 usb1 usb2 usb3: on ehci0 usb3: USB revision 2.0 uhub3: on usb3 uhub3: 6 ports with 6 removable, self powered umass0: on uhub3 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 114473MB (234441648 512 byte sectors: 255H 63S/T 14593C) The unusual thing with this disk it that it has a GELI-encrypted FFS put in the root, e.g. without any partitions, so you'll have /dev/da0 and /dev/da0.eli after `geli attach`. THE PROBLEM: after plugging it in the system crashes with hald-probe-storage as a current process. Other information useful: 1) when the disk is plugged in before boot (and then hald is run on boot), everything works just well; the same if hald is not run at all 2) the same experiment with a partitioned and FAT-formatted USB flash drive (so I have FAT at /dev/da0s1) didn't cause the panic. 3) the described didn't cause any panics on 6.2 I'll try to get a stacktrace soon and test it with other umass devices >How-To-Repeat: 1) create a GELI-encrypted FFS in the root of some umass device (so it will be da?.eli, hope other umass devices will work the same) 2) run hald (it runs for me at the boot time) 3) plug in the umass device from (1) 4) except a panic in a few moments >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Thu Nov 1 12:03:06 2007 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 CE59816A418 for ; Thu, 1 Nov 2007 12:03:06 +0000 (UTC) (envelope-from henrik@gulbra.net) Received: from av10-2-sn2.hy.skanova.net (av10-2-sn2.hy.skanova.net [81.228.8.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4A5FD13C49D for ; Thu, 1 Nov 2007 12:03:06 +0000 (UTC) (envelope-from henrik@gulbra.net) Received: by av10-2-sn2.hy.skanova.net (Postfix, from userid 502) id E00D839FCC; Thu, 1 Nov 2007 12:49:53 +0100 (CET) Received: from smtp4-2-sn2.hy.skanova.net (smtp4-2-sn2.hy.skanova.net [81.228.8.93]) by av10-2-sn2.hy.skanova.net (Postfix) with ESMTP id B5B8C39FA2 for ; Thu, 1 Nov 2007 12:49:53 +0100 (CET) Received: from [192.168.0.2] (81-235-156-87-no29.tbcn.telia.com [81.235.156.87]) by smtp4-2-sn2.hy.skanova.net (Postfix) with ESMTP id 86D8037E5C for ; Thu, 1 Nov 2007 12:49:53 +0100 (CET) From: Henrik Gulbrandsen To: freebsd-usb Content-Type: multipart/mixed; boundary="=-WJfY929iJC6/zoWlYhEg" Date: Thu, 01 Nov 2007 12:48:50 +0100 Message-Id: <1193917730.1166.186.camel@Particle> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2.1 FreeBSD GNOME Team Port X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Patches for usb/46176 (problems with umass removal before unmount) 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, 01 Nov 2007 12:03:06 -0000 --=-WJfY929iJC6/zoWlYhEg Content-Type: text/plain Content-Transfer-Encoding: 7bit This is not a complete fix, but this bug has been, eh... bugging me ever since I first crashed my system back in 2004. I had a set of patches for 5.3-BETA3, but it was too late to have it included on the 5.3 track, and since I was expecting some heavy redesign in the involved kernel parts, I dropped the patch delivery. Unfortunately, not that much has changed in this area in the past three years, and the current behavior is still far from the ideal I'd prefer: when you plug in a USB memory stick, a new directory is automatically mounted, and when it is unplugged, the directory silently disappears. The attached umass.tar.gz file contains patches and scripts that will give you this functionality in about 99% of the cases. The exact point of failure had moved a little since 5.3-BETA3, but the panic is still not difficult to avoid. However, the code is still highly experimental. In about 1% of USB detaches, the kernel will freeze. More specifically, in my four test runs, it happened after 63, 107, 6, and 321 cycles of attach followed by detach. Your mileage will most likely vary. I understand that the disk and file systems were not really designed for disappearing devices, so it's not that surprising if some lock is left locked under some circumstances. Or something completely different :-) Normally, I would continue looking for it, but I have other plans for the next month or two, so I don't know if I'll get the time. Perhaps someone else is interested enough to give it a shot... Anyway, here is a quick overview of the contents of umass.tar.gz: etc/usbd.conf.patch: an added entry in the usbd.conf file, to handle the umass devices. Yeah, I know... this should probably have used devd.conf instead, but this part is three years old and I didn't want to rerun the 321 attach/detach tests to verify that there is no important difference. etc/usbd/umass: the script that handles mounting and unmounting of the device directory under /media. I tried to make it work as expected, but I only have a single environment and a single USB memory stick to test with, so there may be some issues left. You'll get the gist, though... home/.umass: the main umass script will mount a directory if there is a single X11 user, or if there is no X11 user but a single user logged in at a local text terminal. The new directory will be owned by that user. If a .umass file exists in the user's home directory, it will be run to do more advanced things with the data. The included .umass is an example script that opens the GNOME file manager when the directory is mounted. src/msdosfs_vfsops.c.patch: the msdosfs will normally try to write the "clean" bit back to disk at unmount. When the drive is unplugged without warning, this would not only leave the file system marked as dirty, but will also cause a write failure. This patch modifies the implementation to keep the bit clean all the time if the file system is mounted with the "-o sync" option. This should be the case for USB memory sticks. src/usb_subr.c.patch: the usbd fails to match a usbd.conf entry during detach, since the detach event is filled in after the device is gone. This is easily fixed by moving a line to fill in the information before we clear all the relevant data. src/vfs_bio.c.patch: when the device is gone, remaining write attempts will correctly fail with ENXIO, but the failed buffer will get stuck in the sync queue. In 5.3-BETA3, this wasn't obvious until it blocked the unmounting of file systems at shutdown. Nowadays, it's detected earlier but this patch still seems to help. src/vfs_mount.c.patch: the only null-pointer problem left in the way of detaching is when the unmounting code discovers that it couldn't access the device and attempts to backtrack the correct handling already done. This patch makes it ignore the ENXIO error and finish the unmounting. That's it. I would hate to see another major release of FreeBSD where a system must be rebooted just because you forgot to do the umount before unplugging a umass device. It may again be too late to fix the remaining problems in time for the release, but I am at least hoping to see things work in 8-CURRENT Real Soon Now... /Henrik --=-WJfY929iJC6/zoWlYhEg-- From owner-freebsd-usb@FreeBSD.ORG Thu Nov 1 13:38:46 2007 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 4AB0216A418 for ; Thu, 1 Nov 2007 13:38:46 +0000 (UTC) (envelope-from henrik@gulbra.net) Received: from av12-2-sn2.hy.skanova.net (av12-2-sn2.hy.skanova.net [81.228.8.186]) by mx1.freebsd.org (Postfix) with ESMTP id D14C513C4A7 for ; Thu, 1 Nov 2007 13:38:45 +0000 (UTC) (envelope-from henrik@gulbra.net) Received: by av12-2-sn2.hy.skanova.net (Postfix, from userid 502) id 771FF398DB; Thu, 1 Nov 2007 13:38:41 +0100 (CET) Received: from smtp4-2-sn2.hy.skanova.net (smtp4-2-sn2.hy.skanova.net [81.228.8.93]) by av12-2-sn2.hy.skanova.net (Postfix) with ESMTP id 50F24398A0 for ; Thu, 1 Nov 2007 13:38:41 +0100 (CET) Received: from [192.168.0.2] (81-235-156-87-no29.tbcn.telia.com [81.235.156.87]) by smtp4-2-sn2.hy.skanova.net (Postfix) with ESMTP id 369D537E55 for ; Thu, 1 Nov 2007 13:38:40 +0100 (CET) From: Henrik Gulbrandsen To: freebsd-usb In-Reply-To: <1193917730.1166.186.camel@Particle> References: <1193917730.1166.186.camel@Particle> Content-Type: text/plain Date: Thu, 01 Nov 2007 13:37:37 +0100 Message-Id: <1193920657.1166.192.camel@Particle> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: Re: Patches for usb/46176 (problems with umass removal before unmount) 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, 01 Nov 2007 13:38:46 -0000 Well, apparently the list is stripping even small binary attachments, so I guess I'll just have to point you to a suitable location on the web: http://www.gulbra.net/freebsd-usb/umass.tar.gz /Henrik On Thu, 2007-11-01 at 12:48 +0100, Henrik Gulbrandsen wrote: > This is not a complete fix, but this bug has been, eh... bugging me ever > since I first crashed my system back in 2004. I had a set of patches for > 5.3-BETA3, but it was too late to have it included on the 5.3 track, and > since I was expecting some heavy redesign in the involved kernel parts, > I dropped the patch delivery. > > Unfortunately, not that much has changed in this area in the past three > years, and the current behavior is still far from the ideal I'd prefer: > when you plug in a USB memory stick, a new directory is automatically > mounted, and when it is unplugged, the directory silently disappears. > > The attached umass.tar.gz file contains patches and scripts that will > give you this functionality in about 99% of the cases. The exact point > of failure had moved a little since 5.3-BETA3, but the panic is still > not difficult to avoid. However, the code is still highly experimental. > In about 1% of USB detaches, the kernel will freeze. More specifically, > in my four test runs, it happened after 63, 107, 6, and 321 cycles of > attach followed by detach. Your mileage will most likely vary. > > I understand that the disk and file systems were not really designed for > disappearing devices, so it's not that surprising if some lock is left > locked under some circumstances. Or something completely different :-) > Normally, I would continue looking for it, but I have other plans for > the next month or two, so I don't know if I'll get the time. Perhaps > someone else is interested enough to give it a shot... > > > Anyway, here is a quick overview of the contents of umass.tar.gz: > > etc/usbd.conf.patch: an added entry in the usbd.conf file, to handle the > umass devices. Yeah, I know... this should probably have used devd.conf > instead, but this part is three years old and I didn't want to rerun the > 321 attach/detach tests to verify that there is no important difference. > > etc/usbd/umass: the script that handles mounting and unmounting of the > device directory under /media. I tried to make it work as expected, but > I only have a single environment and a single USB memory stick to test > with, so there may be some issues left. You'll get the gist, though... > > home/.umass: the main umass script will mount a directory if there is a > single X11 user, or if there is no X11 user but a single user logged in > at a local text terminal. The new directory will be owned by that user. > If a .umass file exists in the user's home directory, it will be run to > do more advanced things with the data. The included .umass is an example > script that opens the GNOME file manager when the directory is mounted. > > src/msdosfs_vfsops.c.patch: the msdosfs will normally try to write the > "clean" bit back to disk at unmount. When the drive is unplugged without > warning, this would not only leave the file system marked as dirty, but > will also cause a write failure. This patch modifies the implementation > to keep the bit clean all the time if the file system is mounted with > the "-o sync" option. This should be the case for USB memory sticks. > > src/usb_subr.c.patch: the usbd fails to match a usbd.conf entry during > detach, since the detach event is filled in after the device is gone. > This is easily fixed by moving a line to fill in the information before > we clear all the relevant data. > > src/vfs_bio.c.patch: when the device is gone, remaining write attempts > will correctly fail with ENXIO, but the failed buffer will get stuck in > the sync queue. In 5.3-BETA3, this wasn't obvious until it blocked the > unmounting of file systems at shutdown. Nowadays, it's detected earlier > but this patch still seems to help. > > src/vfs_mount.c.patch: the only null-pointer problem left in the way of > detaching is when the unmounting code discovers that it couldn't access > the device and attempts to backtrack the correct handling already done. > This patch makes it ignore the ENXIO error and finish the unmounting. > > > That's it. I would hate to see another major release of FreeBSD where a > system must be rebooted just because you forgot to do the umount before > unplugging a umass device. It may again be too late to fix the remaining > problems in time for the release, but I am at least hoping to see things > work in 8-CURRENT Real Soon Now... > > /Henrik