From patchwork Thu Apr 26 18:26:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Pepper X-Patchwork-Id: 10366665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA1636032C for ; Thu, 26 Apr 2018 18:28:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E82B2874B for ; Thu, 26 Apr 2018 18:27:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 239A9288D2; Thu, 26 Apr 2018 18:27:58 +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=-7.9 required=2.0 tests=BAYES_00, 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 B20652874B for ; Thu, 26 Apr 2018 18:27:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757280AbeDZS1b (ORCPT ); Thu, 26 Apr 2018 14:27:31 -0400 Received: from mail-out-2.itc.rwth-aachen.de ([134.130.5.47]:56679 "EHLO mail-out-2.itc.rwth-aachen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757061AbeDZS12 (ORCPT ); Thu, 26 Apr 2018 14:27:28 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2DuBgAGGeJa/6EagoZbHAEBAQQBAQoBA?= =?us-ascii?q?YNDggMKmFyDA5ULCyyEQAKCSCE4FAECAQEBAQEBAmwohSMGeRBRVwYOBYUPBKp?= =?us-ascii?q?Hg3SEU4JFCQGFY4IkgVQ/gTKHJBGFegKYCQh1b4xeh0+FCwGQFAICAgIJAhSBJ?= =?us-ascii?q?TMhgVIzGiSDEoIdGo4ZbXkcD41KASWBCAGBFwEB?= X-IPAS-Result: =?us-ascii?q?A2DuBgAGGeJa/6EagoZbHAEBAQQBAQoBAYNDggMKmFyDA5U?= =?us-ascii?q?LCyyEQAKCSCE4FAECAQEBAQEBAmwohSMGeRBRVwYOBYUPBKpHg3SEU4JFCQGFY?= =?us-ascii?q?4IkgVQ/gTKHJBGFegKYCQh1b4xeh0+FCwGQFAICAgIJAhSBJTMhgVIzGiSDEoI?= =?us-ascii?q?dGo4ZbXkcD41KASWBCAGBFwEB?= X-IronPort-AV: E=Sophos;i="5.49,331,1520895600"; d="scan'208";a="44162511" Received: from rwthex-s3-b.rwth-ad.de ([134.130.26.161]) by mail-in-2.itc.rwth-aachen.de with ESMTP; 26 Apr 2018 20:26:25 +0200 Received: from localhost.localdomain (37.201.181.173) by rwthex-s3-b.rwth-ad.de (2002:8682:1aa1::8682:1aa1) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1415.2; Thu, 26 Apr 2018 20:26:19 +0200 From: Joel Pepper To: Greg Kroah-Hartman CC: , Joel Pepper Subject: [RFC PATCH] usb: gadget: composite Allow for larger configuration descriptors Date: Thu, 26 Apr 2018 20:26:08 +0200 X-Mailer: git-send-email 2.1.4 In-Reply-To: <1524767168-14928-1-git-send-email-joel.pepper@rwth-aachen.de> References: <1524767168-14928-1-git-send-email-joel.pepper@rwth-aachen.de> MIME-Version: 1.0 X-Originating-IP: [37.201.181.173] X-ClientProxiedBy: rwthex-w2-a.rwth-ad.de (2002:8682:1a9e::8682:1a9e) To rwthex-s3-b.rwth-ad.de (2002:8682:1aa1::8682:1aa1) Message-ID: 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 The composite framework allows us to create gadgets composed from many different functions, which need to fit into a single configuration descriptor. Some functions (like uvc) can produce configuration descriptors upwards of 2500 bytes on their own. This patch increases the limit from 1024 bytes to 4096. Signed-off-by: Joel Pepper --- include/linux/usb/composite.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 4b6b928..8675e14 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h @@ -52,7 +52,7 @@ #define USB_GADGET_DELAYED_STATUS 0x7fff /* Impossibly large value */ /* big enough to hold our biggest descriptor */ -#define USB_COMP_EP0_BUFSIZ 1024 +#define USB_COMP_EP0_BUFSIZ 4096 /* OS feature descriptor length <= 4kB */ #define USB_COMP_EP0_OS_DESC_BUFSIZ 4096