From patchwork Thu Apr 18 20:39:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wulff X-Patchwork-Id: 13635425 Received: from mx0a-0068d901.pphosted.com (mx0a-0068d901.pphosted.com [205.220.168.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCF8F190663 for ; Thu, 18 Apr 2024 20:39:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.168.35 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713472759; cv=fail; b=rdMHiXCtH0QpWuP7EaerGsu26PFwopKA/j0rNXeanIj7x/YFWKzl0PD32TYg2fct1yRbigMZ1dCe2Tz0YkZVigTd5sxqRHzozWF7XEPJilbgl6+sBm7+fE4O809SbeYa3ZQn4hozuhbA8Y/btQK9WsEZv3pRnkAHu2DhRgiexDA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713472759; c=relaxed/simple; bh=ntt66NR2HOKW7rNojVbNmO1T673wVasmn3NukVR3JSc=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=Gi1R4c5aW0Zhepf8k5Y7raVm1PGl+15ai3b4ozQdHxzTE+XAaO7uZY4L5G9mvAlkh2XT/3bsnaUKtJ3CvCUgQWDQ8hhL6BEReFBfdEivIKDJDILTPlh+UB1JgbWDGwLXRrvqm0xEK4yHpV/cveNFqoKdPZsxnnL9GOyPTo+YmSs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=biamp.com; spf=pass smtp.mailfrom=biamp.com; dkim=pass (2048-bit key) header.d=biamp.com header.i=@biamp.com header.b=EE/cQs39; dkim=pass (2048-bit key) header.d=biamp.com header.i=@biamp.com header.b=eBvyCjAv; arc=fail smtp.client-ip=205.220.168.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=biamp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=biamp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=biamp.com header.i=@biamp.com header.b="EE/cQs39"; dkim=pass (2048-bit key) header.d=biamp.com header.i=@biamp.com header.b="eBvyCjAv" Received: from pps.filterd (m0278264.ppops.net [127.0.0.1]) by mx0b-0068d901.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43I8T72V007712 for ; Thu, 18 Apr 2024 13:39:10 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=biamp.com; h= from:to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=proofpoint; bh=ZBWTfp aqiBeZLGHK7AkRl5q5dEJQihA9xXlyt91MzEg=; b=EE/cQs39SBbcFpV+211U+W IqHpAe32JJV50QjPE32uu8oL337MWKjqaIEtJL85O3HKRhTA9h+N5yFtvxfWpoZr sh1YRkgaagm2LyfNC8UYALAF2tBOVectRkgrtaPvntnr57KvIYTkkeA3ei8b6zh/ ycAeMPGS38MG4aT4LJOZz6A2gtwrF80ufElluqime8jlIVmvX0sZrokuYWJS+Odj pjPea3xSRsWAx4FleRXFWhlK9RAyJSUevqZXrwvDeqosIRJmfj48iMhydmnfZj+J fdxi7IG7lk7qzkE8geJd0C4viv/P/J8w2uqDb3rPNjEumxOLYDxn7Q/eZqj/Xmdw == Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by mx0b-0068d901.pphosted.com (PPS) with ESMTPS id 3xg09r3kp1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 18 Apr 2024 13:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jTiRCEdgWVoLXGMSNc18P9JLvJDLgqF4TAvpTIHfNXMt+H4QEMcvHtOyfUXnZfDlzrC/UNUkPYs6ZfMoRK4Pr/xHIj/4dT40LpT5h1wcJ0aiPhlLQBV5xEJa4hdyKsyUPKRHNudI0SZm4LMrLWs0WO7MB5F5VHQdUyyZwJObombE/RUeHEpEg5KoR8STBX1tkDOt5FCHwlvRVDvnmM31Q+Lzyyu6ltw/JOvTNaVl2tbOnJgJ5h7vtsL/SdAc3ksr/BWKya/03fGRXcrtJD+CJnzuhB/gkX0yv/+nUmCc/oBeqlg8GNgnQi8RiSyiX5yKDVaZzI6WQCCmId/0qgBbKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZBWTfpaqiBeZLGHK7AkRl5q5dEJQihA9xXlyt91MzEg=; b=brTGEqTRdb7OkfFfhJ6JXAwxo17pWY5Vgy86M6LsjzwKXflUjk8IVrXRAcNR6A8cWcZU7cwTalxD39L/n6JMa/dAB70ghAxagajmuVHgENJonp4wPZQs8QJhYeNsvJrnDLhWdyezIpjeCzHh3y5e7TrlLOJ0mFshnkWCLo44L/RzpTNl7307VYC3d3vq/XRduYxEYkDMo8iNbj7VcVBcIwMBmhGXL4O9K1hwm1O6zAVcQUPwxyN77vkqrr+tp1w6xT0Cj+H33K9C+N1yw8ijWQowoh/1D6PTmbfDuSuKlCN0760kdjUDJOz7Gew7n/jNSi7CfaRO8UkdJIWJWtqr4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=biamp.com; dmarc=pass action=none header.from=biamp.com; dkim=pass header.d=biamp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=biamp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZBWTfpaqiBeZLGHK7AkRl5q5dEJQihA9xXlyt91MzEg=; b=eBvyCjAviUPKroN1s6OimT2KF9gqITBbyooHiXqpp0Yt7QueoZBvWvyNv3+MLHDTwdFCTLspjJ3mipn8xLAc16GuYYgLtDGvc1KoCts2FGK5e+KDWVwlIAYDKB4A2PprE5QtfC+DwU69/aL6lc5Q96LkdLxotq/OfchaWGVYdYqmZe9sEkPR6iHYDLHCdTAYNgeeo+LP8B9K6S0OTPJIZB5kDALT9prLuyNAdvOgxBiNmZSSL09GmhsPm/m+O5or4j9QQwENCFfbczdGYCt4dX9rgDqwoE4DkDFtclu7N9qMHodhM61gvm1vhuv5MichfW3nR8d6ELfES6R1KqIm8w== Received: from CO1PR17MB5419.namprd17.prod.outlook.com (2603:10b6:303:ec::17) by CH2PR17MB3847.namprd17.prod.outlook.com (2603:10b6:610:5c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.41; Thu, 18 Apr 2024 20:39:05 +0000 Received: from CO1PR17MB5419.namprd17.prod.outlook.com ([fe80::f48:ee61:a81b:d555]) by CO1PR17MB5419.namprd17.prod.outlook.com ([fe80::f48:ee61:a81b:d555%4]) with mapi id 15.20.7472.037; Thu, 18 Apr 2024 20:39:04 +0000 From: Chris Wulff To: "linux-usb@vger.kernel.org" Subject: [PATCH v2] usb: gadget: f_fs: add capability for dfu run-time descriptor Thread-Topic: [PATCH v2] usb: gadget: f_fs: add capability for dfu run-time descriptor Thread-Index: AQHakdAF2mrm4jxc0ECnggSkCs40SQ== Date: Thu, 18 Apr 2024 20:39:03 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR17MB5419:EE_|CH2PR17MB3847:EE_ x-ms-office365-filtering-correlation-id: 34f354b1-a5d8-4f79-b90f-08dc5fe79615 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: =?iso-8859-1?q?e715eTR49lbCr2ZJWKUehUT8PY?= =?iso-8859-1?q?xa22LT1Dg4LjQBjJdu8VXubgMFs93ljPESFJjwOEAV6IY3cpuv+sMHlcJFMe?= =?iso-8859-1?q?zy1jNEveIxD6Tb5eLGEepqbzl08zgiyB7h4cs0RL8d47lr8Vr01uISs6YBjd?= =?iso-8859-1?q?3smh+LE25dV/L9+HojbJ/xZf2fZ1oL771TBI3rpR50zQ57cC3yITl5SLcKp7?= =?iso-8859-1?q?myTcDdPuMA+KNh8l1d164znBQXd8RyzAnzwnuh8CIMKvgDCCNii2PxisFqAD?= =?iso-8859-1?q?utNDOtnwJ2nrCntHFXRZeEha9VhTpaYYxebQkZE/Too4GQJhxSzo2nXV9gzN?= =?iso-8859-1?q?nePZ95sQ6O64ZtjD/MQgFjRdV3pau6a6p12NQsdirN8FQO5BjCYP45cPZoJ0?= =?iso-8859-1?q?SMSTi7+FteDiJxSpKjP9A7hosvgOPacZhfnz0EXYmNlDHAuenzabmxlbZdM6?= =?iso-8859-1?q?Prtd/2+BKOEfGoNCj9eB6BvbZcKGd711hKDtNEXBTcJIzyoxR8tOSSlSpbQC?= =?iso-8859-1?q?pQjvDUIg7HDa/pJ8rjYBKA1R2DtJ0n9fLahz+bCY8bA8SbaHYe+EXkngDany?= =?iso-8859-1?q?iZFfQI1JCKl3hr7a25dfaPYrUb0leOKpmGVbYJqhCiUR+TK6B7nQBzaD+UAf?= =?iso-8859-1?q?Cr6ovACbO90pxXM0wzG/Qb8SooFN2u77imtvybbeedpvVCc855J/nUZk3meD?= =?iso-8859-1?q?/Z7Od4IxCtLLroexsPIrXbD4Q55e16asqiLPIILGSjZDGSFa89Qt0I1frbBk?= =?iso-8859-1?q?X366bt2ErIWQfcWs5YXpjX8NrdpETRXkKE77rKkxmBzfFpugmlTQ3MduYTFO?= =?iso-8859-1?q?Jeut7FE7l7gyGBWtC2JoDmSrXlG3euTCnyYrnaDs5m4LLoCNGcd82mv5rIf1?= =?iso-8859-1?q?YiF9VQHX0RazDIDhGLbZFeouXbVO0qicXA0WxLeZS/mDbhLK3nRolnykLoxc?= =?iso-8859-1?q?1Mv2m40q93yEaKY1Khi1h+dOlpFN1pQPrXT5sXTOChnOOVimGzVUDONfyLNE?= =?iso-8859-1?q?577t3UmBvGcQiq1W2m7IPoiJDfahhIUY//WOjnytWIKDy+RSbBgLCDPIvf8/?= =?iso-8859-1?q?9USebQEockoETgdCOW+bvlB7z0muKiGt9YCsnTTrzuyyINhiI65+rRUoOiyI?= =?iso-8859-1?q?jIuOkUi0gaHzpYXis3jUC9vyVIVW42mY5hfpkjt5TNgCC13A4wsqVDI5uF3H?= =?iso-8859-1?q?bSMR5yHqF9ddIpn5MRhWrLmKxTlVwOVoHYnxyI//Wr6377vmMWAFVqTuZJ8Y?= =?iso-8859-1?q?YAWg18yu7ZNMS1+XKLuJeKedGYbrJ9a4HoYfouYSJJS9whPmGJ5771UXgQYd?= =?iso-8859-1?q?OeqB8dujOJIU6e7nWPsAp7Ow4JaFrDqybKPEFHeU+1Sz/ppShme4TZjhqFTw?= =?iso-8859-1?q?9BoOkVuYNSXBDvud4yBw=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR17MB5419.namprd17.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007)(38070700009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?7cDj6JDyvdK/jlJLAfA/fEW?= =?iso-8859-1?q?+ACZwuvNHINT5a+Nbvr9bKQshEXjCC2IgDX/iiLTnlneOLRAT7SqFpaM5bZT?= =?iso-8859-1?q?8GsF5DOGk5LTaqBZgjAyzga2oqG+0GyAVbV9D+iiyXSzOT4o83I/+XhTcVv5?= =?iso-8859-1?q?otetoRBbVOhy5/BkSujB3COZrzusl08+PHQV87a4TWss/Ode7giLVIs4lPe8?= =?iso-8859-1?q?QTCc8qKq4TJgSGSWhenB6cTVUtyZy9KoolWkBD2PCZUlA3KsyfDU2vTOX3Fy?= =?iso-8859-1?q?9wiVmjBnAUQWXLx9RtJSHVJzkmHA0Dh+KLAM5GGxO0yzWrzQXnNUOvNDmU8C?= =?iso-8859-1?q?WH7Z2u9xSizbqtS/Xh6hSd70J2X2T2ZeUMGzMxjm61AFtmZ0K80HnZxmLy3+?= =?iso-8859-1?q?Ck/ltFrRmpGUxhItnGFuDUjN9yAeWo5DIygShScE2B+ifG089onwvbt3jAa6?= =?iso-8859-1?q?KsTsEapi+2oIYZKXbXjtpsrxYbBGn/FJLfVnVIHyJYLy7OyhRxEH3WKDVJQj?= =?iso-8859-1?q?+d/Dcd3ZrQfpws60nAnlfELNh7py52Su+BZ9VM3SKAh/lLPxCs5jbFuJXriP?= =?iso-8859-1?q?Xdjlgl33HQnMAV47JVPsZ+AScRrMHqlJgiwYkVgYorHjHVEcpyXwBP9IJoiq?= =?iso-8859-1?q?FXRL6JwhD5yeP6fHnIwxHtSjMo75wVUgEKuGZWT2qQww6eGlawnKGNICHWoE?= =?iso-8859-1?q?Bm4kuBQ6gsTHtEcMlqQL9+bjBuM13bkiyMkYQPqNS3hzph0up9eW5W53+0Fa?= =?iso-8859-1?q?nAyNORuUgj9EJuXf2GujaLqXoh7Pq34PH2hiXZnOZeuL1sK6M5VuAtFiviWP?= =?iso-8859-1?q?ZP69XM7b+cyo9yBdEioYCvvY5uHRpt9ll3KNwk/BLvdZqfmot74dzHdgGKmk?= =?iso-8859-1?q?2To1TiDRl6gWB6v2TvmwVZH7fA1XbWI9bSYbuFyLcvfMNX3V85dt4IxKpsYR?= =?iso-8859-1?q?oK7cgrNiiUNXmMd0lfcbzoG2pzrgKupHH+cEOCmyID1Mb5pVrcKbZDo7OKCB?= =?iso-8859-1?q?9nHKR0tr57aNuQzbb1sRCzWt51W0fB2N2LNswXzwobQvas3LelEvL9taZvTd?= =?iso-8859-1?q?fJ38+o4V9trkZauQsSU3q7hDq1K3ZWNJId6qrRlOcSuw8p2beDAgUuaAa0+r?= =?iso-8859-1?q?scMH6gfd2UlQxaYsiuNUv9IE/MiR+uCpligv5xHmlqOz0gdm7qD2KVjH1F+k?= =?iso-8859-1?q?yl1eAIoVOUVluCsWVofuQg8fqmwsxq1se5jHniOTWB3Q48cBggQyfMIbNRzR?= =?iso-8859-1?q?4IBNGGvkdEX2cbKkdf1zczj71AD0DPi1rnOG1yoxmJGbQohnKc8pxG9RTMes?= =?iso-8859-1?q?gZIXvliHIF0GCPoCHJZ1LMPyTaeD0EisyTMn2MgL9PeYZzaf/m1oNdu9o+sJ?= =?iso-8859-1?q?AH+q49tTfr3WxR3jpGz7nziy5lGo/P9u1Kg8Gb58twUmGuPwgfG/9lQ897ov?= =?iso-8859-1?q?P8pvDlItjapdDKmsPhWSjdg4mBo5f1OMEBBWPBwwBegcTKxqhOR2H2Y6CP57?= =?iso-8859-1?q?8HWw/9g8LAA129hWZj39oGZsTTWEGc2qYyUsEMfUaofLOU8gn8rtEiNKD32W?= =?iso-8859-1?q?F+Gsg9UdFDoLMD+py3N9MKMkt9dl91L68ci/LT1Rodsbfe0QBwNAhkiQHWFW?= =?iso-8859-1?q?bYDbJvHEraJtE4qfa?= Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: biamp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR17MB5419.namprd17.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34f354b1-a5d8-4f79-b90f-08dc5fe79615 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2024 20:39:03.9281 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 341ac572-066c-46f6-bf06-b2d0c7ddf1be X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vuoLS7HDbYJg1SIZSZny10Pzk3bDKp3HeGS7ACG7cXaYaOnQYDRMPG/qw4putFsbnOE38dmH7OZkMxxx70OJrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR17MB3847 X-Proofpoint-ORIG-GUID: fbIOBwhwJP7azLHOaaO172FPdftlI7sy X-Proofpoint-GUID: fbIOBwhwJP7azLHOaaO172FPdftlI7sy From: David Sands Add the ability for FunctionFS driver to be able to create DFU Run-Time descriptors. Signed-off-by: David Sands Co-developed-by: Chris Wulff Signed-off-by: Chris Wulff --- v2: Fixed attribution and signoff drivers/usb/gadget/function/f_fs.c | 11 +++++++++-- include/uapi/linux/usb/ch9.h | 4 ++++ include/uapi/linux/usb/functionfs.h | 10 ++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index bffbc1dc651f..4d39e5e30b73 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -2467,7 +2467,7 @@ typedef int (*ffs_os_desc_callback)(enum ffs_os_desc_type entity, static int __must_check ffs_do_single_desc(char *data, unsigned len, ffs_entity_callback entity, - void *priv, int *current_class) + void *priv, int *current_class, int *current_subclass) { struct usb_descriptor_header *_ds = (void *)data; u8 length; @@ -2524,6 +2524,7 @@ static int __must_check ffs_do_single_desc(char *data, unsigned len, if (ds->iInterface) __entity(STRING, ds->iInterface); *current_class = ds->bInterfaceClass; + *current_subclass = ds->bInterfaceSubClass; } break; @@ -2548,6 +2549,11 @@ static int __must_check ffs_do_single_desc(char *data, unsigned len, if (length != sizeof(struct ccid_descriptor)) goto inv_length; break; + } else if (*current_class == USB_CLASS_APP_SPEC && *current_subclass == USB_SUBCLASS_DFU) { + pr_vdebug("dfu functional descriptor\n"); + if (length != sizeof(struct usb_dfu_functional_descriptor)) + goto inv_length; + break; } else { pr_vdebug("unknown descriptor: %d for class %d\n", _ds->bDescriptorType, *current_class); @@ -2610,6 +2616,7 @@ static int __must_check ffs_do_descs(unsigned count, char *data, unsigned len, const unsigned _len = len; unsigned long num = 0; int current_class = -1; + int current_subclass = -1; for (;;) { int ret; @@ -2629,7 +2636,7 @@ static int __must_check ffs_do_descs(unsigned count, char *data, unsigned len, return _len - len; ret = ffs_do_single_desc(data, len, entity, priv, - ¤t_class); + ¤t_class, ¤t_subclass); if (ret < 0) { pr_debug("%s returns %d\n", __func__, ret); return ret; diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index 44d73ba8788d..dcd962d1a75a 100644 --- a/include/uapi/linux/usb/ch9.h +++ b/include/uapi/linux/usb/ch9.h @@ -263,6 +263,9 @@ struct usb_ctrlrequest { /* From the USB 3.1 spec */ #define USB_DT_SSP_ISOC_ENDPOINT_COMP 0x31 +/* From USB Device Firmware Upgrade Specification, Revision 1.1 */ +#define USB_DT_DFU_FUNCTIONAL 0x21 + /* Conventional codes for class-specific descriptors. The convention is * defined in the USB "Common Class" Spec (3.11). Individual class specs * are authoritative for their usage, not the "common class" writeup. @@ -332,6 +335,7 @@ struct usb_device_descriptor { #define USB_CLASS_VENDOR_SPEC 0xff #define USB_SUBCLASS_VENDOR_SPEC 0xff +#define USB_SUBCLASS_DFU 0x01 /*-------------------------------------------------------------------------*/ diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h index 9f88de9c3d66..cf3f55234a5e 100644 --- a/include/uapi/linux/usb/functionfs.h +++ b/include/uapi/linux/usb/functionfs.h @@ -37,6 +37,16 @@ struct usb_endpoint_descriptor_no_audio { __u8 bInterval; } __attribute__((packed)); +/* DFU Functional descriptor */ +struct usb_dfu_functional_descriptor { + __u8 bLength; + __u8 bDescriptorType; + __u8 bmAttributes; + __le16 wDetachTimeOut; + __le16 wTransferSize; + __le16 bcdDFUVersion; +} __attribute__ ((packed)); + struct usb_functionfs_descs_head_v2 { __le32 magic; __le32 length;