From patchwork Tue May 13 09:27:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 30012 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C610920446 for ; Tue, 13 May 2014 09:45:51 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id un15sf385074pbc.8 for ; Tue, 13 May 2014 02:45:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=oG7SxUYkEBYeib+FSYd87VZpuG8i6yFbCEJ292Kw/as=; b=dZJhxUD02uv+Utjf3kOlvSJyOaGO9nk7Q34r5uiYQIFchXuVWcowjD8gwdJsgOSFnr 0d/uBoPWnW3tNWUUf3nonIrw4x3/17bE90q2b3iuzG45JYCcmHyLS6H7g8/9l+kYlHgm kqAigpKiSTi2pFoCBnVSlYxAwcjqgpEjIWG5PeFlzYA6isN42zFxLQyjhKf3GJe0AVSF PbYebVYup3MulSHlvU7wMIO4VCqBRm8ShICVAmL5TiEp85t7qCKY+OtkjBzf0JIV5mdT UedHxMt7tKASuQZqtYfBt3DvVso6E1GfbQI0trC8y3ToZPEl7X92eiaSsZ07+kaE/SuG bGRw== X-Gm-Message-State: ALoCoQmlcd9QQ4sI43EnbcIYT7AGkCwFqeZQ/L3c9mtniTxX926ys0XpPBBnc8zoLh+2qls50jmY X-Received: by 10.67.4.170 with SMTP id cf10mr14061259pad.31.1399974351091; Tue, 13 May 2014 02:45:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.97.99 with SMTP id l90ls1745641qge.13.gmail; Tue, 13 May 2014 02:45:51 -0700 (PDT) X-Received: by 10.58.13.104 with SMTP id g8mr27803740vec.16.1399974350990; Tue, 13 May 2014 02:45:50 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id tx4si866812vdc.22.2014.05.13.02.45.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 02:45:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.170 as permitted sender) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id db11so109835veb.1 for ; Tue, 13 May 2014 02:45:50 -0700 (PDT) X-Received: by 10.58.122.164 with SMTP id lt4mr28506505veb.2.1399974350917; Tue, 13 May 2014 02:45:50 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp137079vcb; Tue, 13 May 2014 02:45:49 -0700 (PDT) X-Received: by 10.68.202.167 with SMTP id kj7mr3992222pbc.160.1399974349046; Tue, 13 May 2014 02:45:49 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qc1si7962726pac.68.2014.05.13.02.45.48; Tue, 13 May 2014 02:45:48 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760155AbaEMJpi (ORCPT + 27 others); Tue, 13 May 2014 05:45:38 -0400 Received: from ip4-83-240-18-248.cust.nbox.cz ([83.240.18.248]:60857 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760090AbaEMJ24 (ORCPT ); Tue, 13 May 2014 05:28:56 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.80.1) (envelope-from ) id 1Wk915-0002w9-I0; Tue, 13 May 2014 11:28:55 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Roger Quadros , Felipe Balbi , Jiri Slaby Subject: [PATCH 3.12 082/182] usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1 Date: Tue, 13 May 2014 11:27:14 +0200 Message-Id: X-Mailer: git-send-email 1.9.3 In-Reply-To: <7aa1bde8f6143b2db33e6567a8c3a4debaa246f4.1399973152.git.jslaby@suse.cz> References: <7aa1bde8f6143b2db33e6567a8c3a4debaa246f4.1399973152.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Roger Quadros 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit 9c1b70361e0b38e4acb8e62b54da66538cb77ff2 upstream. It was impossible to enumerate on a SuperSpeed (XHCI) host with alternate setting = 1 due to the wrongly set 'bMaxBurst' field in the SuperSpeed Endpoint Companion descriptor. Testcase: modprobe -r usbtest; modprobe usbtest alt=1 modprobe g_zero plug device to SuperSpeed port on the host. Without this patch the host always complains like so "usb 12-2: Not enough bandwidth for new device state. usb 12-2: Not enough bandwidth for altsetting 1" Bug was introduced by commit cf9a08ae in v3.9 Fixes: cf9a08ae5aec (usb: gadget: convert source sink and loopback to new function interface) Reviewed-by: Felipe Balbi Acked-by: Sebastian Andrzej Siewior Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi Signed-off-by: Jiri Slaby --- drivers/usb/gadget/zero.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index 0deb9d6cde26..d31814c7238f 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c @@ -280,7 +280,7 @@ static int __init zero_bind(struct usb_composite_dev *cdev) ss_opts->isoc_interval = gzero_options.isoc_interval; ss_opts->isoc_maxpacket = gzero_options.isoc_maxpacket; ss_opts->isoc_mult = gzero_options.isoc_mult; - ss_opts->isoc_maxburst = gzero_options.isoc_maxpacket; + ss_opts->isoc_maxburst = gzero_options.isoc_maxburst; ss_opts->bulk_buflen = gzero_options.bulk_buflen; func_ss = usb_get_function(func_inst_ss);