From patchwork Tue Sep 15 19:16:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 53703 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id 562F322A0D for ; Tue, 15 Sep 2015 19:16:26 +0000 (UTC) Received: by wicgb1 with SMTP id gb1sf11980618wic.3 for ; Tue, 15 Sep 2015 12:16:25 -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:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=6HmBdbRldiSu8li6BDohOXBHCpTKgLr4mxi3wbwCi2E=; b=lnikStA9U1W/oimnEklp+usnmSTVOwuPLXnGmCd83vMLR7qrhLMt6Fu97sene5KMIt 3rFcGvJcsskJIVyh8OK3zZA1v9x3rHDveBbMHPqrNCUe7L64dC5IWa14xTkTyzmIUWs7 CAqlw1/LNaQqZQS7HYGeBfO/dAmsyn9YB5Z/2prbVs1Fb2bVeeR3vocqtVh7bzXxaqvR uNYGQ+itIeR+kalFerxc6GMdXWGHNk6niOCNWOmyoWvZmSdZktdsPjvu6Ya4JtSXSjN3 CD5gFlSgKoM5OX6kH9F/ZxxAdhQdDer6ffqlcYkziw54TqE+T7/WhOXPNCNH3X7BGzgb ne8Q== X-Gm-Message-State: ALoCoQlkaP2eQwyPQ0p7+e4PP+y+0elZLwmnY0H1CSQsBFjF+X3aQ7CLuJ3SxN+aMnDRpjaKe8Nh X-Received: by 10.180.96.226 with SMTP id dv2mr1135068wib.2.1442344585680; Tue, 15 Sep 2015 12:16:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.97 with SMTP id x1ls369495laj.7.gmail; Tue, 15 Sep 2015 12:16:25 -0700 (PDT) X-Received: by 10.112.168.66 with SMTP id zu2mr23987753lbb.29.1442344585521; Tue, 15 Sep 2015 12:16:25 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id wd1si10641656lbb.91.2015.09.15.12.16.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 12:16:25 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbcao8 with SMTP id ao8so91026094lbc.3 for ; Tue, 15 Sep 2015 12:16:25 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr24018836lbb.36.1442344585421; Tue, 15 Sep 2015 12:16:25 -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.112.59.35 with SMTP id w3csp1990133lbq; Tue, 15 Sep 2015 12:16:24 -0700 (PDT) X-Received: by 10.50.79.197 with SMTP id l5mr8978456igx.93.1442344579416; Tue, 15 Sep 2015 12:16:19 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d7si13572503igo.56.2015.09.15.12.16.19; Tue, 15 Sep 2015 12:16:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-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 S1752151AbbIOTQR (ORCPT + 4 others); Tue, 15 Sep 2015 15:16:17 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:46826 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750965AbbIOTQQ (ORCPT ); Tue, 15 Sep 2015 15:16:16 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id t8FJGFsB011032 for ; Tue, 15 Sep 2015 14:16:15 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8FJGFQP002901 for ; Tue, 15 Sep 2015 14:16:15 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.224.2; Tue, 15 Sep 2015 14:16:15 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8FJGExg023998; Tue, 15 Sep 2015 14:16:15 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Felipe Balbi Subject: [PATCH v2 5/5] usb: gadget: mass_storage: allow for deeper queue lengths Date: Tue, 15 Sep 2015 14:16:08 -0500 Message-ID: <1442344568-1820-6-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1442344568-1820-1-git-send-email-balbi@ti.com> References: <1442344568-1820-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) smtp.mailfrom=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: , Instead of allowing a range of 2 to 4 requests, let's allow the user choose up to 32 requests as that will give us a better chance of keeping controller busy. We still maintain default of 2 so users shouldn't be affected. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/Kconfig | 2 +- drivers/usb/gadget/function/f_mass_storage.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index bcf83c0a6e62..33834aa09ed4 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -113,7 +113,7 @@ config USB_GADGET_VBUS_DRAW config USB_GADGET_STORAGE_NUM_BUFFERS int "Number of storage pipeline buffers" - range 2 4 + range 2 32 default 2 help Usually 2 buffers are enough to establish a good buffering diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c index a6eb537d7768..2b9c539c6d60 100644 --- a/drivers/usb/gadget/function/f_mass_storage.c +++ b/drivers/usb/gadget/function/f_mass_storage.c @@ -2662,7 +2662,7 @@ EXPORT_SYMBOL_GPL(fsg_common_put); /* check if fsg_num_buffers is within a valid range */ static inline int fsg_num_buffers_validate(unsigned int fsg_num_buffers) { - if (fsg_num_buffers >= 2 && fsg_num_buffers <= 4) + if (fsg_num_buffers >= 2 && fsg_num_buffers <= 32) return 0; pr_err("fsg_num_buffers %u is out of range (%d to %d)\n", fsg_num_buffers, 2, 4);