From patchwork Thu Jun 20 21:09:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 11008171 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B7DF924 for ; Thu, 20 Jun 2019 21:10:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DC60281C3 for ; Thu, 20 Jun 2019 21:10:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 326C52847B; Thu, 20 Jun 2019 21:10:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAC86281C3 for ; Thu, 20 Jun 2019 21:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726431AbfFTVKL (ORCPT ); Thu, 20 Jun 2019 17:10:11 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44900 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfFTVKL (ORCPT ); Thu, 20 Jun 2019 17:10:11 -0400 Received: by mail-pf1-f193.google.com with SMTP id t16so2342157pfe.11; Thu, 20 Jun 2019 14:10:10 -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=n2SpWI1yibR3pZui+zsA5SWkFvXjKqrr9tlPiUDopnI=; b=QjHUnmYdROWMRYkxYVPmuYVPNDV1DbWvIZdcfWSL55ySQ0MctwPQ9kYZxtuXgqp1WN EiEtZTikp/OrBL78jp7ZsaUlGVGvvU2GhjHeSxPORWHhACye+nvo/3LszmRKEV9cA7Q5 egtZ2bn2jLsOfpLFDWD43lWgiS4k0/U3ZcdpvfDAfhGWrr8/Q8G1uS/Lxe3zz5Xyk77b 0rEmNWPpy1awuYwCEZ9j1MBHCK53Gcsqld1OOY6ErSXX5okAvXyKv/zAwFmK3J1iTJX0 9xovg3LrnJ7ssWLnc1wdc5IdyFN3adPCq7qNSLjRYp4bDD6aT2HOWUVZ5fMChUYmNXvM WVSg== 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=n2SpWI1yibR3pZui+zsA5SWkFvXjKqrr9tlPiUDopnI=; b=RCEPSJnt5KolhyWgB/zVisQoopjWtcIu7WLs58uIKeFGEbFUoLN/BjrJlVRl5va/Wi jGbZd58bTIEs1cXYqfchdrOo32HMcfspVTx3YAwJw6zQe5V8Jc1HuQpZjLFXkmPLzGYw QrRtPFO3v3pxbeexW3q+UGdqA6nldlpAgen4cf/sJ9TEFYmdDRXK37kRfi4JyDihij+w OBn3vknX8HUg+Aqbis8FSN5F4b5w3BwB2hFLGR3h7Wc+hACPK+2RidCnrVGC1B2jVCa7 j8dN1tTH2N7HL9ey79fQ0xyWolTp8c7FNngDgxx2V0+3nWPAN+P7+ktuA/KUcgM2/zt1 927g== X-Gm-Message-State: APjAAAWO0zgXTCqAOvgQd+G6cweMGB+WBsd7ZWkd7lQtqnT+R2rEz9fq cbJlbFIp1G3KpRzyez8lWz0JGrBp9WY= X-Google-Smtp-Source: APXvYqyqTjMPZxbB9dUfZRknPAWnuMOyFhDiYUlVPyNhviWwjbGwPMxDXClY5RvgmUGxxVByRgYZCA== X-Received: by 2002:a17:90a:4803:: with SMTP id a3mr1775554pjh.58.1561065009830; Thu, 20 Jun 2019 14:10:09 -0700 (PDT) Received: from stbsrv-and-3.and.broadcom.com ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id p1sm386805pff.74.2019.06.20.14.10.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Jun 2019 14:10:09 -0700 (PDT) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , devicetree@vger.kernel.org, Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Luis Chamberlain , Mark Rutland , Rob Herring Subject: [PATCH 1/6] usb: bdc: driver runs out of buffer descriptors on large ADB transfers Date: Thu, 20 Jun 2019 17:09:46 -0400 Message-Id: <1561064991-16874-2-git-send-email-alcooperx@gmail.com> X-Mailer: git-send-email 1.9.0.138.g2de3478 In-Reply-To: <1561064991-16874-1-git-send-email-alcooperx@gmail.com> References: <1561064991-16874-1-git-send-email-alcooperx@gmail.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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