From patchwork Sun Nov 25 21:21:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Nieder X-Patchwork-Id: 1799641 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 6AE3E3FC5A for ; Sun, 25 Nov 2012 21:21:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753431Ab2KYVVJ (ORCPT ); Sun, 25 Nov 2012 16:21:09 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:65271 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753401Ab2KYVVI (ORCPT ); Sun, 25 Nov 2012 16:21:08 -0500 Received: by mail-pa0-f46.google.com with SMTP id bh2so4552271pad.19 for ; Sun, 25 Nov 2012 13:21:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=vjXqqET7eq7bjuF5hYjBkoUzx37cOVllYrK3wW0bkxE=; b=dCLISo2ti0P71/m80mdZUXq4YWQib4NvK6Rxg+AzY7ooJIBsfjMvWodW0RoAc4hqgV mrf3wJ3Ch2zScwI2689pwlsAzJQpscRyVnQ746I1IFX3EVXCFylrm6pWeP/jvn4fUIOr VstPITlm8O1CoT85nwhpqIsprzgvlpzWEQg9LV/d33ua3/0rxLt4fSua/v+aD2qFsYx9 vWsaDE4jBvAs6Lqoe9mIahtODnw0ZakdzSmybwUsrgWG+Lc0nwc4be1Ayj84IqoKNzEh 6bruxOD74QlhXGIk5ukBittcPbu4t1K65AIjAYUvIzWoStJzTJYj4hvOSWy7uTGFZIRB q9xA== Received: by 10.68.143.129 with SMTP id se1mr32293342pbb.67.1353878467347; Sun, 25 Nov 2012 13:21:07 -0800 (PST) Received: from elie.Belkin (c-67-180-61-129.hsd1.ca.comcast.net. [67.180.61.129]) by mx.google.com with ESMTPS id m7sm7509893paz.3.2012.11.25.13.21.05 (version=SSLv3 cipher=OTHER); Sun, 25 Nov 2012 13:21:06 -0800 (PST) Date: Sun, 25 Nov 2012 13:21:00 -0800 From: Jonathan Nieder To: linux-usb@vger.kernel.org Cc: linux-pm@vger.kernel.org, alsa-devel@alsa-project.org, David Banks , Olivier MATZ , Ralf Lang , Steffen =?utf-8?Q?M=C3=BCller?= , stable@vger.kernel.org Subject: [PATCH] usb: add USB_QUIRK_RESET_RESUME for M-Audio 49 Message-ID: <20121125212100.GE24024@elie.Belkin> References: <4FA2D481.4070304@droids-corp.org> <4FA2DB9D.1040303@droids-corp.org> <20120604110608.GG8248@droids-corp.org> <20120605232432.GE3619@burratino> <4FD06563.7050605@droids-corp.org> <20121125094110.GA21387@elie.Belkin> <50B2815E.2090105@droids-corp.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <50B2815E.2090105@droids-corp.org> User-Agent: Mutt/1.5.21+51 (9e756d1adb76) (2011-07-01) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Some USB MIDI keyboards fail to operate after a USB autosuspend. The device is recognized by ALSA, but no events are received and the device goes quiet. $ amidi -l Dir Device Name IO hw:1,0,0 Oxygen 49 MIDI 1 $ amidi -p hw:1,0,0 -d <... play some notes ...> ^C 0 bytes read A workaround is to disable USB autosuspend for these devices by putting AUTOSUSPEND_USBID_BLACKLIST="0763:2027" (resp. 0763:019b) in /etc/laptop-mode/conf.d/usb-autosuspend.conf. In the spirit of commit 166cb70e97bd ("usb: add USB_QUIRK_RESET_RESUME for M-Audio 88es"), reset the device on resume so this workaround is not needed any more. Noticed on a kernel close to 3.2.10. Tested against 3.6.5. Debian's 2.6.32.54-based kernel did not seem to be affected, though it's not clear whether that is due to code or configuration. Addresses http://bugs.debian.org/664068 Reported-and-tested-by: David Banks # Oxygen 49 Reported-and-tested-by: Olivier MATZ # KeyRig 49 Signed-off-by: Jonathan Nieder Cc: stable@vger.kernel.org --- Thoughts? drivers/usb/core/quirks.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index fdefd9c7f7af..998c6a8290f6 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -105,6 +105,12 @@ static const struct usb_device_id usb_quirk_list[] = { /* Midiman M-Audio Keystation 88es */ { USB_DEVICE(0x0763, 0x0192), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Midiman M-Audio KeyRig 49 */ + { USB_DEVICE(0x0763, 0x019b), .driver_info = USB_QUIRK_RESET_RESUME }, + + /* Midiman M-Audio Oxygen 49 */ + { USB_DEVICE(0x0763, 0x2027), .driver_info = USB_QUIRK_RESET_RESUME }, + /* M-Systems Flash Disk Pioneers */ { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },