From patchwork Wed Mar 26 16:46:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 27157 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f71.google.com (mail-pb0-f71.google.com [209.85.160.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7805020369 for ; Wed, 26 Mar 2014 16:47:14 +0000 (UTC) Received: by mail-pb0-f71.google.com with SMTP id up15sf5280568pbc.6 for ; Wed, 26 Mar 2014 09:47:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=wmY3QotGJWdR4HW6wysgM8FedtZzKaIus+/L9xULwTA=; b=Cn4DCq5JEk8ohStAOSAHEDhFpy9zvI/7k0zY1d9h9ony7Yz4b/qkIY0glQBcLRKLJz NHg28rYUWYKN5KQ8CS0kN6Bm1ClFyRddFdzHgMebbXV/wTWIZyTMRq6SoXXI+YBYcZiz sVc3IC6wdtVf8vErWdADjOZTHAVVqVHtLnrUYL08LIWoaEt89LTbaAy5TT2xUl4zYGEb VK/UIm22fdgbKc0WGMrUSHl31uoUVBLfn1lrf7vqoJWWeLqTeudJVjzbigKaK7hjaBB4 4X8Q7KRdXBLERbDEmt5VpwvFcySThUaHt0L6YEo7HpRyoYidoTAN36FBb7sYkJ32OCth tV8w== X-Gm-Message-State: ALoCoQmvDSthOp/s0dOs3gWeWgZFUc4aSz17B1xifhoFYhrXhooHtGEYH/6VkE0Hwucs6fM720qI X-Received: by 10.66.159.36 with SMTP id wz4mr1943324pab.14.1395852433690; Wed, 26 Mar 2014 09:47:13 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.210 with SMTP id g76ls716661qge.69.gmail; Wed, 26 Mar 2014 09:47:13 -0700 (PDT) X-Received: by 10.220.188.70 with SMTP id cz6mr86199vcb.59.1395852433500; Wed, 26 Mar 2014 09:47:13 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id p8si4655921vef.122.2014.03.26.09.47.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Mar 2014 09:47:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id il7so2758480vcb.32 for ; Wed, 26 Mar 2014 09:47:13 -0700 (PDT) X-Received: by 10.52.126.107 with SMTP id mx11mr578275vdb.41.1395852433424; Wed, 26 Mar 2014 09:47:13 -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.78.9 with SMTP id i9csp61612vck; Wed, 26 Mar 2014 09:47:12 -0700 (PDT) X-Received: by 10.66.164.229 with SMTP id yt5mr5884234pab.67.1395852432428; Wed, 26 Mar 2014 09:47:12 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si5202487pbe.45.2014.03.26.09.47.11; Wed, 26 Mar 2014 09:47:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932272AbaCZQrB (ORCPT + 26 others); Wed, 26 Mar 2014 12:47:01 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:44024 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932137AbaCZQq5 (ORCPT ); Wed, 26 Mar 2014 12:46:57 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2QGkl0T006529; Wed, 26 Mar 2014 11:46:47 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2QGklD7011635; Wed, 26 Mar 2014 11:46:47 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Wed, 26 Mar 2014 11:46:46 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2QGki1V001575; Wed, 26 Mar 2014 11:46:44 -0500 From: Roger Quadros To: CC: , , , , Roger Quadros , "3.9+" Subject: [PATCH v2] usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1 Date: Wed, 26 Mar 2014 18:46:38 +0200 Message-ID: <1395852398-7578-1-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395826086-5097-1-git-send-email-rogerq@ti.com> References: <1395826086-5097-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 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: rogerq@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , 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) Cc: 3.9+ # 3.9+ Reviewed-by: Felipe Balbi Acked-by: Sebastian Andrzej Siewior Signed-off-by: Roger Quadros --- 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 9f170c5..134f354 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c @@ -300,7 +300,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);