From patchwork Wed Sep 16 13:25:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 312437 Delivered-To: patch@linaro.org Received: by 2002:a92:5ad1:0:0:0:0:0 with SMTP id b78csp443544ilg; Wed, 16 Sep 2020 06:01:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtjTrF25+WYHAUyi7BgFpUxAcQhcDa9s056jzXIYADCVQE2EoKFFug4QBUFvHpMamqLnMD X-Received: by 2002:a05:6402:1b0f:: with SMTP id by15mr26720515edb.289.1600261297050; Wed, 16 Sep 2020 06:01:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1600261297; cv=pass; d=google.com; s=arc-20160816; b=ntrblAjBPASjuf4DC2r6e6B0HKbckOy55o8lLYqARjZ4ZeHDuHeodNbC/zDs2Xqyat d15XGE33+0i0OLhEevUxjvSbPSLjREk0D4GVPSMaaTtmQUdCxzUE+WdfHY3U4hqZgXT+ NZ30JDJp1opofyR3TRbfQAvDwrLwbvvCbxI3fRVlMHljbvVOUOmSWNSSowiJP054l39l HBaSwJjGzANF7IWwC655tQSHuPvwwb1vR/RKtNm8xfvj8AOvVRWH5rzhIQNL+lIWNxbL pp8cJ9kRzPC6QbCCrwFGQz8drej1aaEeoCj3sNfb1+A462OpRcGLEx5V8ZJSJ0HpkN6y 5qUw== 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=CrLk76EI5Q+bvz6TAZXroplm+h8pXsgtgtkphfxrCnA=; b=jlRPDEouyaw94+2LzsdideHSMW7zV8u6sqTPVT2U2cq/Ue7C2uosa9JN+3aWiUfUO2 5G5WiQem33FkSP+oHF2vY6rBXQrVkaZFT8UBlsnIlkc+gWIT4BI93y2QdjsPaUKUIC2M k/OM9fmD8xsuaRGWgr4aRup+1AAC94xM27a7Dxp9ubDybDcPtCAKKY3jz7Ngx+3Q7O4r 037mnZntFT82YlltEM4x1Ca5lUwkDqPgTmLYlMZe1wNqqiEPPEuca5MwGAnOtpLC4Umq zabTi5VQ9iF/5bDsp71cQoogClRD9XKFteWJiN3MTwukbpNK+ccDHF/SEqNapuVuCh4+ nKmA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=G3IMpVWc; 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 sd6si11512841ejb.207.2020.09.16.06.01.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2020 06:01:37 -0700 (PDT) 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=G3IMpVWc; 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 F139782374; Wed, 16 Sep 2020 15:00:22 +0200 (CEST) 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="G3IMpVWc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B121D8236C; Wed, 16 Sep 2020 15:00:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0618.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe02::618]) (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 1B0E68236D for ; Wed, 16 Sep 2020 15:00:04 +0200 (CEST) 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=Wy9fSRcfW7SY5BCeTV+l0hd5itmYqJmWvz3rdBhZOLMWzJ4B5g8OuCTXWDMMfxRO37aWjPXvEQlJH+x2cTheYhymCcC6FxhWePj77YIbiUI185xLyTl3mpSGaO6HBNQejVitAvJc4JCQT0aoli9qt9ykH70EbYJhwyAnKO32CFv7O7EIB6f5RA1PpIiTMdBnoosUkS+S4yd1mgrksL4+fHC55f4vRHY7iwXbs5DbzST8nQ+R+qlFwuML4VYABxAcYGXEHj+lCMhGu/LexP+islpz0mGczh4a0IkptF4wxq3mF27OI5ThvcGIhWhGm2NBhUflkcREmK9Otm6QxQwjUQ== 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=CrLk76EI5Q+bvz6TAZXroplm+h8pXsgtgtkphfxrCnA=; b=ghIJ2kMIRI0XNyPxIqKP0+S8y8gGyra9axKIEJ8uQTPUHaypspRUOxM6+oqgNMlQt+jU5HmkLPPAq+vuhNusOhdvFUgek8pmnQcKah5bFkms94OLbIxZFH/FMIZPC1JPot0N9XeLz/NCXIzLXwnZ2MLUUT1+Mk2UebN/PMOz3q5I5cwBfLpGOZBL16ObAfWv/w92mBlraiWpnj4pwiOnrz4/3IEkclEVy5/vUoug4GUNYtTEd/UfgZcxduTSrAPQosh/3CKpQx4HaKLJ/m+qvcUCmJ6ugqoQA0hCq5U6SB93bM6ODFGqfxNv+8/xi3mMw2bFOkHpCeYZTD2f8GjkQA== 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=CrLk76EI5Q+bvz6TAZXroplm+h8pXsgtgtkphfxrCnA=; b=G3IMpVWcmDIH22JWGbI+nmUUUD6To7Oe/X9AkM7MsXHy50t6+6NdXRLKJzu1sr5Qx/4FC31TUeElR36gzzEO/M7YjvKQXyk83zUclg7nFw2MAPNskILcrXhaOQLzKjRp5PmfYRq4uIgNLGxqbdFtD6vdFRiEGKAMfYJSSZnds+I= 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 DB6PR0401MB2373.eurprd04.prod.outlook.com (2603:10a6:4:4b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.18; Wed, 16 Sep 2020 13:00:02 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::39ff:13b4:4f28:1413]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::39ff:13b4:4f28:1413%10]) with mapi id 15.20.3370.019; Wed, 16 Sep 2020 13:00:02 +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 09/16] usb: gadget: update os_desc_config when add config Date: Wed, 16 Sep 2020 21:25:30 +0800 Message-Id: <20200916132537.8313-10-peng.fan@nxp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200916132537.8313-1-peng.fan@nxp.com> References: <20200916132537.8313-1-peng.fan@nxp.com> X-ClientProxiedBy: SG2PR03CA0131.apcprd03.prod.outlook.com (2603:1096:4:91::35) 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 SG2PR03CA0131.apcprd03.prod.outlook.com (2603:1096:4:91::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.5 via Frontend Transport; Wed, 16 Sep 2020 12:59:59 +0000 X-Mailer: git-send-email 2.28.0 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b1da6e02-838b-4d57-e3ca-08d85a406ca3 X-MS-TrafficTypeDiagnostic: DB6PR0401MB2373: 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: 5IM1aq/ZN4PsXVvMXzTKVXqmseytvrd1vsRqfGlFsHDF3RAEb9dgfNucm0L2/PVuQOPZF0Vn3Q+1N4gffLX4PtKyoYOORN1zsvD8gbBEC+iIav/OpEBzBrQ6Jp2C0yOAatSnXV7oPk26J1i5OzmPDr2c9upKaOEjjrnZ5209X41L47fezUpnIcRcvAkFKyQBqBJHoSukXO5pZIgmTWvPuydmrGVA3+M/r81R4N9NL5yk9iTtxgY8eT9EZr1lpkb9PA1HiYY/yBA8qfCGvgZC6S96ql1MLxM5NlZHgDiAnqL8DAbE3L5xyRnmxxNkARtAimGScVniAmL97zdv4HhDwg== 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)(346002)(366004)(376002)(136003)(39860400002)(396003)(54906003)(6666004)(9686003)(4744005)(1076003)(6512007)(5660300002)(478600001)(52116002)(36756003)(6506007)(66946007)(26005)(6486002)(16526019)(186003)(956004)(316002)(66556008)(66476007)(2616005)(86362001)(83380400001)(8936002)(2906002)(4326008)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: u3wR2Fd38t/mJ7gbLnfwu9ARvLWXvQRwpeMVoUfN/YBo3oEmYo2lXLTLMhzAHukkSFLmcwfENimhJ2s6HQwJKhwSgKQ6WiPnxMxkh9UcjF7Uubq/N3H4XJ/unIF2qURqleNzEYul8ujL/BMDiPtc7n4V2//z0P6QEodPNgnTurCAACKkzBu1gb4oG/Q3bELaGn+D2rvZ0lI4npI5J8pB9+GR3qV8NwFLr4sWHQoyokphhUg/sa6KICrf0dnY4NSJenz0wXzS3W1XKptLvumSWL1ZFe2oiO8W2bkcMad7XipGef4SECYQDpCS3mtZqovNt6zVsvC0TSDTCDBzljOO+e8iFthGNo0iH1gIsjQEdHxQoAOt0Y1GZgSWwh1VQP5HFrP2CDxgIop76PQdN0rHIFT5bzbrsCehPKfwgbrSrEmvRxsN5GN2ROm4mKp+P6nWwrVjK/I0kcXIe/sLGYHGbKBDaXFGzDmnt0YkYrUN93XBXlza+6vlhnro4FI0mdV4GM8qGLlSmM+w/vNOkqMbBY48EBoXa7G+3INofgZFLN2V8E7mlHHgUMYxWbuEGWnaGY6kBWM3FclMHYK4csdTz5mGi7tI9klpfsDvlC+SMkFM+VlxalxO3gr+55AXfh/ThppLci/z8aOfm259jRwu/Q== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1da6e02-838b-4d57-e3ca-08d85a406ca3 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Sep 2020 13:00:02.3600 (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: Zwgb4nxhXT2vZ4l2DaYkFNijO9TEwZi1bdjbSYiTDsL0m2Cd5p/w1db7euKQ8cvkXeBwxLRs1H3QcF1XQZVf6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0401MB2373 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 071b4b4a6f..b453055838 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)