From patchwork Tue Sep 15 17:52:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 53696 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id 8C8CF22A0D for ; Tue, 15 Sep 2015 17:52:36 +0000 (UTC) Received: by lagj9 with SMTP id j9sf67169303lag.0 for ; Tue, 15 Sep 2015 10:52:35 -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=L6Im7Kg1QMp+xGdnA0U7yXD54Ikm+4GFXRMFM/EIiNCe/6aMyHPKAavhCtHfPPeFTh YONnWqjguKQtzsgj0AobpxWh64VCIIs04lcmI9Nora6W2W4vgZRW4+E4SgWx5ltuhVHL 3kracY9uUAxuLTSNP1eBqmVdT/oH2Tgxuna+W06QgNlZ/ssh1L9QwtIB0MuPRDXP4tMR sesIqO3s3RCsU0Sp5WlNlQrsSB+2q6PO760xCMRbHfxdo69HCVDhS/CYC66MMXuAXQQG 3pJUkzbzAH2+iVZP4EvcNVS40yf/xVGEBkfo2rFLm7BQEvkMUk3BeIKM5cxqfN6AKBGe yvUw== X-Gm-Message-State: ALoCoQkqDFiFou10vZ19+SR3rd0/ccEf74vEfjDyV+45EzdDRq+KsiDVTdkRj6kSU+51jRmOYVxz X-Received: by 10.152.224.129 with SMTP id rc1mr74827lac.10.1442339555553; Tue, 15 Sep 2015 10:52:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.200 with SMTP id o8ls860003laf.3.gmail; Tue, 15 Sep 2015 10:52:35 -0700 (PDT) X-Received: by 10.112.158.1 with SMTP id wq1mr22890565lbb.67.1442339555406; Tue, 15 Sep 2015 10:52:35 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id y5si15114734laj.5.2015.09.15.10.52.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 10:52:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lamp12 with SMTP id p12so111670233lam.0 for ; Tue, 15 Sep 2015 10:52:35 -0700 (PDT) X-Received: by 10.152.37.162 with SMTP id z2mr18449819laj.117.1442339555302; Tue, 15 Sep 2015 10:52:35 -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 w3csp1949334lbq; Tue, 15 Sep 2015 10:52:34 -0700 (PDT) X-Received: by 10.68.197.65 with SMTP id is1mr49889095pbc.109.1442339552763; Tue, 15 Sep 2015 10:52:32 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qp7si33602949pbc.93.2015.09.15.10.52.31; Tue, 15 Sep 2015 10:52:32 -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 S1751844AbbIORwa (ORCPT + 4 others); Tue, 15 Sep 2015 13:52:30 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:46853 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751745AbbIORw3 (ORCPT ); Tue, 15 Sep 2015 13:52:29 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id t8FHqThK000332 for ; Tue, 15 Sep 2015 12:52:29 -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 t8FHqThD022401 for ; Tue, 15 Sep 2015 12:52:29 -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 12:52:29 -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 t8FHqS98017751; Tue, 15 Sep 2015 12:52:28 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Felipe Balbi Subject: [PATCH 5/5] usb: gadget: mass_storage: allow for deeper queue lengths Date: Tue, 15 Sep 2015 12:52:22 -0500 Message-ID: <1442339542-17090-6-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1442339542-17090-1-git-send-email-balbi@ti.com> References: <1442339542-17090-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.215.45 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);