From patchwork Mon Jan 25 13:43:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 370231 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp3993783jam; Mon, 25 Jan 2021 05:28:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxm6g7i8XBQqci+gI/Bre/KXAjfqg8P1FYsO7x1/Co72mtjf7cyf+0K+r9+qOEB1bY7iK1a X-Received: by 2002:aa7:c60a:: with SMTP id h10mr430634edq.263.1611581320824; Mon, 25 Jan 2021 05:28:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611581320; cv=pass; d=google.com; s=arc-20160816; b=fkwDtl5bORxHcy3ze5t66rrXH1IDtFoGA6jhVRFtnGEjL3CH44OSrJWEQ07pYniLUI vEcqlWWlo4T3Y+bLZ05oRqeI9DbQRZX/F6D1ZxbwiG6Ob9Ur0yiJMHTjl5Zl1p/vJ7dZ jT0Z88KJbCodj1UN/iFpM+weE06dGBImuBSkjElhlQ93lS3J6RNoP9ghkjI8jG2lyGSs h0rzZct7CGVkkJNVjshpBLnvUmP2lbGNVIxQoyNRKHmPjBuzfvtvcq8t9OIiUJ1tfn2/ 77iqmlPS1v0Kg0bsBEklbl1vQ2L2EQK/D1A+a5wLTLyzHrDLL6Xej3uOHSRkPqWpPzJY qucQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=6lMFf8QqZUvxpQxOZf31xgXNB5z9sPeeZ9zMyrwn1r0=; b=YAbnjwrV959rC5/0Cui1EXmE278Ob1a80hmmnESJzokQYZPgu/9fX+k3/XqVVaI1Kt xXsj9XOhn/uPoLNHt8AZVA4al4nezo8+4MIOwQ4B2x80TWo5xAa8foknKqpRQx/N2Shn /XCyu17U96qeo2HPWfjj/HcgwgL5cYwCODaSaNfNOgnTiASeiaZVgGtgfrK5eYLr6/iN 73dnx0HKZ7DKkf/2dmJNWWszaiTVEsloJDq4Wh65UUrDrpiRDSwP4qaoBmLJpsnXG8N0 9TMttqNcsn5LKnpDxFA+EkdtKubZd4ZhoGsl5RNZyGz4aHU+Tz2g/fYGQGRrvzydkzwo uDXQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=UPINb1PW; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id j17si5970555ejt.189.2021.01.25.05.28.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 05:28:40 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=UPINb1PW; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 128718279C; Mon, 25 Jan 2021 14:26:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="UPINb1PW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7C35382686; Mon, 25 Jan 2021 14:15:07 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02on0631.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe06::631]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 32B6E826C4 for ; Mon, 25 Jan 2021 14:15:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BEo3RHsctokvMX2td2IQv7MxmB8NLqRmn2eUIbAtpzE0EFCpJFDFKzN2rkuAjtWFcAMGe3uO0Wsn7UYsPq5YSJT6Wo5oiLwNsuu0u65agJgja+pp/kZHo9w9vHlkimwf51+PzdUf1T/sg5fC0O0Hyp9B8JHWh5bA1tKSVxW2+ri4fLTH2Wi5RJVHZzkdz26lpbA4iTxGWJxkpm3e5/zNKn1uGdC50JM5xDGSsfiXwk5INobL+PySkvSHgFLAXTpeSELEFAt2I7Dm77DZj7h+UNg/oo63dWOmeepwMS3yq+78UPXaD9NEv4dsiaey9ZUq4mQSQ5Dyjri6bqcKK373pw== 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-SenderADCheck; bh=6lMFf8QqZUvxpQxOZf31xgXNB5z9sPeeZ9zMyrwn1r0=; b=P7xOYwl82fewx4TBssa2BYGtCociDEjurztVy4/dSP5HAu1omDTbg3toqY9Bnuo37ZgXrsGVv4ROC9ZXmy6dFZQ00vXvvnzlp+3S7ZZNsqSqe+QNALX8lDfDNOMy0gqa6oWE2y15rLOu5GERAlkCYX2mgAP1XCxn1ImurGOyG7omBl8+wIvEROACtPLNsr5U1NhuanI6+As+rGDGUYawj0nYAbo8lCsNgCJ8KIqN47sszMHWY8TtRmFtYlNzn9+HB6Bql0m2XD5GEJ/Og8wWOCq4uYvw/vgbXO82XL+NSbkyrYGslx56n8jaPZ8NkUsnYAPY8O6gsQgqeIJ26QUaEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6lMFf8QqZUvxpQxOZf31xgXNB5z9sPeeZ9zMyrwn1r0=; b=UPINb1PWqfpEcTcG9IQVKchd8mc/b1tUh0KbVKflmqZqzumxCgYuk9eEXec3E/TyC0vKPgC9nWG2Pig+4l+xsBGH0pWn5AlQ4q9UFKMbWXUC4CSrppufqEvm5GaWk7heMY36wunUYxorBujM0tT9T4YDmhPI6stUrQ96nEYsGM4= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none;denx.de; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.17; Mon, 25 Jan 2021 13:15:01 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3784.019; Mon, 25 Jan 2021 13:15:01 +0000 From: peng.fan@nxp.com To: sbabic@denx.de, lukma@denx.de, marex@denx.de Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Jun Li , Peng Fan Subject: [PATCH V2 10/17] usb: gadget: update os_desc_config when add config Date: Mon, 25 Jan 2021 21:43:53 +0800 Message-Id: <20210125134400.780-11-peng.fan@nxp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210125134400.780-1-peng.fan@nxp.com> References: <20210125134400.780-1-peng.fan@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR03CA0117.apcprd03.prod.outlook.com (2603:1096:4:91::21) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR03CA0117.apcprd03.prod.outlook.com (2603:1096:4:91::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.6 via Frontend Transport; Mon, 25 Jan 2021 13:14:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: fed17f0c-eab1-40f7-5a79-08d8c133388c X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NDuNMb3bI+44j5HDTZqZ2iS/bwihML1KCgXZKTaHjIksc9xrHGC20CRxdYCFZ4yfYXz44mZtVMeiFR5BW/oPDzm66MBRyD6rRDmyC4epGFQS/x69JcHcbgh0cmuDocafZreRdl+OWywGK0Kyokhar7I7O+gO2Wv4faVw/zrJCm1IlisohLqtIx32/WxqjR3kxSTF/1YoGYnEY2gOKC7J2ttUbDsbR+cJ+6sir6mWra0X7XkZlLzU9iDxQ7dC4szhspbxzMeFNsaFMYbtxNG9PJilpL4V3zGK8pfXxrLWzqUZ5tk0LaN7wRoS2EiL2iX/UHfhU0yjaWpujjaLLcPv5ysgIxPIUkweonRbhdXgtgaH+xAsCt4ZEnF70H9bxH0H7lIwPeKInGu0a2/hp2VvAQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(346002)(39860400002)(376002)(136003)(2906002)(66476007)(66556008)(8936002)(186003)(4326008)(16526019)(83380400001)(8676002)(4744005)(478600001)(66946007)(5660300002)(6666004)(9686003)(2616005)(36756003)(54906003)(1076003)(956004)(6512007)(6486002)(6506007)(86362001)(316002)(52116002)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: ZIBZh/07iKMJkbEIwpzl6TUZXboVvhVJeSAiedygpUPsEl+/74L/MJabkIOiReVx0/SojTTyVVEYpmraRuw5HAdWz6A5C8fCwMo6SMoK5i4nuafBqVjxD647xnIXcH1R96Igf+7h+lpWnK7ZKMtevm/Wac73ZhHunXiEOKdlkXy6PI2uSIjOwZnoIy6Ze790YJONtm6XbR2ZRKyqyQLkoQzgX+KBcdvTiDnU3MqPsN6B9uapjA/pk9O9reRberc8LTtifVOiokBVpFTRFoC+6Nl1KPVzipghbhupFoSkhE7pgNxMuDQU+5HnpRPE6n8gpZOb55UMnEMfskAStDXlur5JKagjuJdEuiUrIubBpqZGtWUSWf4bnZLrL+sxe9v7GfBueFbRe7tJc3bV3OTMIKLH+wiW3cm2+4pV/NP49UCIMnQY/4xr556hPz1q9f0kJlT/nAEY/dvnIZsQxayZ946TvqiYfT17Us8EgTN6G58DCDiTRG+58YNMQKbcgGDCXtIIhcUyhk6d2G1F+buB4NKulVhzc16TyXicIv+/qqArnWNs8m3FU4DwE244n5poRCpltDz9Y3+Lll5CBKfnZISBQfWGM7J9PsTp2CALu8qwewS3W0lT8SLVLBEzq32mjtqMqtzTYnSSaBl9ckh89d4jNy7S9t4q/8eTNRa1SQ2QDQ9+kD+lHKrusweahv4bk39cQXdi8pjILP26jeq5fEXFKA1BvH9nN1iB4YbX5xE95K6X6LGEahr+Vi+TCcb3N1vBvJsZZ2AL24Klh4BOL4f3w2568qnbd7WRM6c5OWue/Ex0duzv119L0br5JEaVFi9kCJ1pmtRuBdPk5IFPSLw0Io1Gf4iYpB3SQgk8uMtgSo5m2DBXWMnMQ4dzbBfEzbbf+h6o87vso3DpiOvBVqK3NXrQl6oSO+zc+FbgkZpXfAUCZGCKa5KxVZHg2PCfji5Awc0MMwwoaxpPYUHD1udil3w71Xz3aDoHPZ+i5+VRnZFra2PpEKvXBGtp69sM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fed17f0c-eab1-40f7-5a79-08d8c133388c X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2021 13:15:01.2938 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: j3b7GlyFh54o2879aYYwTK7BPPMrXZOBsnKaIdgd2DlabHloJrXbRa53/efKEmGsPzFBcrnxgRORKGa/v3QRkQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 X-Mailman-Approved-At: Mon, 25 Jan 2021 14:26:22 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: Jun Li Always use the new added config for os_desc_config to fix cdev-> os_desc_config may miss set in case we restart usb gadget driver. Signed-off-by: Li Jun Signed-off-by: Peng Fan --- drivers/usb/gadget/composite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.28.0 diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index e6fdefd3d0..404da12754 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -512,8 +512,8 @@ int usb_add_config(struct usb_composite_dev *cdev, usb_ep_autoconfig_reset(cdev->gadget); - if (os_desc_config) - cdev->os_desc_config = os_desc_config; + os_desc_config = config; + cdev->os_desc_config = os_desc_config; done: if (status)