From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752631AbaDAQK2 (ORCPT ); Tue, 1 Apr 2014 12:10:28 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:44489 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751759AbaDAQKY (ORCPT ); Tue, 1 Apr 2014 12:10:24 -0400 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Julius Werner , Greg Kroah-Hartman , Kamal Mostafa Subject: [PATCH 3.8 52/86] usb: Make DELAY_INIT quirk wait 100ms between Get Configuration requests Date: Tue, 1 Apr 2014 09:08:05 -0700 Message-Id: <1396368519-12728-53-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1396368519-12728-1-git-send-email-kamal@canonical.com> References: <1396368519-12728-1-git-send-email-kamal@canonical.com> X-Extended-Stable: 3.8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.8.13.21 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Julius Werner commit d86db25e53fa69e3e97f3b55dd82a70689787c5d upstream. The DELAY_INIT quirk only reduces the frequency of enumeration failures with the Logitech HD Pro C920 and C930e webcams, but does not quite eliminate them. We have found that adding a delay of 100ms between the first and second Get Configuration request makes the device enumerate perfectly reliable even after several weeks of extensive testing. The reasons for that are anyone's guess, but since the DELAY_INIT quirk already delays enumeration by a whole second, wating for another 10th of that isn't really a big deal for the one other device that uses it, and it will resolve the problems with these webcams. Signed-off-by: Julius Werner Signed-off-by: Greg Kroah-Hartman Signed-off-by: Kamal Mostafa --- drivers/usb/core/config.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index a6b2cab..62441e3 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -724,6 +724,10 @@ int usb_get_configuration(struct usb_device *dev) result = -ENOMEM; goto err; } + + if (dev->quirks & USB_QUIRK_DELAY_INIT) + msleep(100); + result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno, bigbuffer, length); if (result < 0) { -- 1.8.3.2