Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp778735ybh; Tue, 21 Jul 2020 07:46:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSHJTt16vNW2ga4vwCcjVeKcbvVlMNE9uAPMk+0BRtX5ymOBrtAcOrK9MTq+ZjHO5dIzVM X-Received: by 2002:a05:6402:b6c:: with SMTP id cb12mr26609856edb.116.1595342768058; Tue, 21 Jul 2020 07:46:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595342768; cv=none; d=google.com; s=arc-20160816; b=QGuv6RjyQBo3+7ARMZ9SMLDIxgf82TJBBP2snJJC2EQiBNq5JwuNwFoGMVQqNshgVk +xe+PFe5VLadssga13Ewe9MLmPuWIQ61yGsfzRj3h6FBhEU1AzmpOrUu50nSG1p3+5Ck 9uEV1xBBl3EMpmPwqhZ+s7jUN3/L6dDaUsS6nhuPWsPI8I5fji4UHtksEMYRKarSCvu/ d2yzD6kKnrJhAjKtA6O+cAaJ/c6WgOxHbj0IAm8udeemFw+1L+zal/tFX18xJ9UDlZBh ubsHErbmSMZ0bJC2KQRtuKk5HjVnWgy1nVCtc8Dn771CdCXrbrJnwdb9UvVnf0SQ9x5E XuYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=SDSJ6E6TyEjHyBsZi4uqpY8XOPxYP4sG84LLuvagPCE=; b=NHTrwzsLYhjt7YveBcSuZr0/S7F4nr2dpWG8AukUtjw5PG+qh8Nmrnxaj9Hfky0GXA EW9z8aGP3N2zOSpm9GtYfSF73HEnxjTVtRFK/wByTMCo4rD3rA6Gi2b0AC9AFTsYokeE w9iEk4RXFRACw6PhQePPUux5xllAVB4pD0a8bbZgJzkJu3AZQIR3ivyYO0/zHLZKpbFH iDasiDwZ5eTYM8wnyZr5ZqQlkaVwOd4eLaJzJuMVOZvHDFru/h+Rla9YGk2LP8wfZjVA cMPx3kSuVwa4+PVOzOZI8R6wZJITzWzWi8U97yIGi7QRrL2uMUBFu/tI93fL0+4Pn5ao v2MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LXNkh5E3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n9si11955474eja.529.2020.07.21.07.45.44; Tue, 21 Jul 2020 07:46:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LXNkh5E3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729804AbgGUOoD (ORCPT + 99 others); Tue, 21 Jul 2020 10:44:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726412AbgGUOoB (ORCPT ); Tue, 21 Jul 2020 10:44:01 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15B62C061794; Tue, 21 Jul 2020 07:44:01 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id q5so21461496wru.6; Tue, 21 Jul 2020 07:44:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SDSJ6E6TyEjHyBsZi4uqpY8XOPxYP4sG84LLuvagPCE=; b=LXNkh5E373uukeAG5HTm4hVe/3CIMyTSPNosbt4uZyKOWpSkcIi47dMSNW4x2QyhNj oKPvQ/Yt+xETCl98ceCROauXnRAiXk61fkusYxT1H7caPFb10HLO2f1L1ft3GXZJapeD FpuNkhaC4m7Fa6Q+wEqy+XDWuVzqW7t7hxo/XY1n1BySqM0D/OuqojY1R/cL8zmeHSzQ pjYkV8rGbF8ijkSUIoK5IaCMzZJGilpmmlVQs9vWU2CyGzc4xpkhbAJzdxC4bT2OMvEJ wej6HXbzZEtWJI7d2Kb7FxanzlEuVMvVd2QA5RdcNVmPkO1TUCIwfENJge5ZTeFzk/U+ FaFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SDSJ6E6TyEjHyBsZi4uqpY8XOPxYP4sG84LLuvagPCE=; b=e4cf7yTTrHnLRD1cRPPd29u3RxYoTz+4cz3LmIIdCrIlf7Y8yrfjp20QnmCbefTepZ ajEc1+v9PEbYrSh78tC7H8PNQmo7EhiTHiP7vKqxHsA/3unZQVNhQoHhqfUSvYmgRjbX gaHGjQFBQ676wYOXtHCfoDlKpIEXsHbA7psGaDTqjO0wt6d+/eNOHkI73afXYuDfU8S0 SItIKbmgzjDnCZ/y3oDz5x42H+2oxe8qlOrPJFkDcwWdSAs7fuk8dCPm4WDSOree6Exg cTT+8aHfMyEDZWllZL6qts4xquvrmjuwVvLhRDo3jErABs8zyx0539aIVujrxtdtsoDc 9hFA== X-Gm-Message-State: AOAM531OClGH82pmVVgpc4hCf/59KM7ywkDqsx0QFl8u7ohWEp6quJu0 tHfkdHQqZxaCbemlaCC1V5ebGGh3 X-Received: by 2002:a05:6000:1cf:: with SMTP id t15mr28987303wrx.180.1595342639503; Tue, 21 Jul 2020 07:43:59 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id y6sm38043116wrr.74.2020.07.21.07.43.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 07:43:58 -0700 (PDT) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , devicetree@vger.kernel.org, Felipe Balbi , Florian Fainelli , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Rob Herring , Sasi Kumar Subject: [PATCH v2 5/7] usb: bdc: driver runs out of buffer descriptors on large ADB transfers Date: Tue, 21 Jul 2020 10:43:24 -0400 Message-Id: <20200721144326.7976-6-alcooperx@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200721144326.7976-1-alcooperx@gmail.com> References: <20200721144326.7976-1-alcooperx@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Version v1.0.40 of the Android host ADB software increased maximum transfer sizes from 256K to 1M. Since the STB ADB gadget driver requests only 16K at a time, the BDC driver ran out of buffer descriptors (BDs) if the queuing happens faster than the incoming 16K transfers. This issue is fixed by doubling the number of BDs that can be queued so that the entire 1M request can be queued without running out of buffers. Signed-off-by: Al Cooper --- drivers/usb/gadget/udc/bdc/bdc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc.h b/drivers/usb/gadget/udc/bdc/bdc.h index 6e1e881dc51e..ac75e25c3b6a 100644 --- a/drivers/usb/gadget/udc/bdc/bdc.h +++ b/drivers/usb/gadget/udc/bdc/bdc.h @@ -44,7 +44,7 @@ #define NUM_SR_ENTRIES 64 /* Num of bds per table */ -#define NUM_BDS_PER_TABLE 32 +#define NUM_BDS_PER_TABLE 64 /* Num of tables in bd list for control,bulk and Int ep */ #define NUM_TABLES 2 -- 2.17.1