Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6562189ybc; Thu, 28 Nov 2019 01:23:27 -0800 (PST) X-Google-Smtp-Source: APXvYqziu7KPDXqQFi5p9eTOQ+76FGqeUYlrouL+0o7ioDdKWmbbmwXtBao7SmLUsknoRpTLY4OH X-Received: by 2002:aa7:d294:: with SMTP id w20mr30581403edq.134.1574933006895; Thu, 28 Nov 2019 01:23:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1574933006; cv=pass; d=google.com; s=arc-20160816; b=qBKPHx1J7za5Jf/YqYs/f85F8bij8oV+yqNTf2hHevXg9brsJ5EoLidBeUj4N+8PJ6 AOCCJuxAYOLn+8aHFexPUCMjATW/og2lwzj8K+KdkIel7ZH82FuYTtwmTp0RbyoVQFcp 0jwneUBizRX2aKaTgIfZcirxc1yJej8nXP3IkXDnDvrMcI5XY2/u2Jg4kP50f+2afZGF FXfwKBsDZttIGm1OM/cdARQhDBtm7xuJwZ3+LhIMytGkxWdrO1EGgcuZQf2szqOP8GRv B7S2P4GTHeD7WpIo2b7qUc6GeUqZ/GeEYAABcktLfLzEtQ2u6lzUAD+Xe4DjFcdJ4I1P AeOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:mime-version:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from; bh=wy4iaTloM7+Gs5azlBg0dcZ7PJkh1HmJ2bmBMWp4qMY=; b=RNu/LPyeVNwkPpbQwcYZckObcOZFrCkKyZYR8P6SGXkvkjY5OLOVDIigK6YZ5boaLA oSST4EDuAeQhjcuQ95D8QAWDZHR6toCbPwmB0Hkw3VWa5tnfJ6PdzoiSIeJIYbMQRV0R Dff2gKeAEqWTp2+jOiix9AzcVhgkifQgJtRJgcaxkVDtWSrVfB9IjY96p93BVVbd193t EI4fZwJMXG7oXKRo9pDCvWfM1HOBojOdq+lhL9PfNunthM3dKlaNDf1ox+VDaOEoVCu5 SaS74NrUi6Am91Hzg7bGMw1yavocOcTnLyB5Ns2ggCITRkhaascE9c8s3PQzoLC1VI7q E1nw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=k2pk84En; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c8si13656714edf.79.2019.11.28.01.23.02; Thu, 28 Nov 2019 01:23:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=k2pk84En; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726556AbfK1JV5 (ORCPT + 99 others); Thu, 28 Nov 2019 04:21:57 -0500 Received: from nat-hk.nvidia.com ([203.18.50.4]:48953 "EHLO nat-hk.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726092AbfK1JV5 (ORCPT ); Thu, 28 Nov 2019 04:21:57 -0500 Received: from hkpgpgate101.nvidia.com (Not Verified[10.18.92.100]) by nat-hk.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 28 Nov 2019 17:21:11 +0800 Received: from HKMAIL104.nvidia.com ([10.18.16.13]) by hkpgpgate101.nvidia.com (PGP Universal service); Thu, 28 Nov 2019 01:21:11 -0800 X-PGP-Universal: processed; by hkpgpgate101.nvidia.com on Thu, 28 Nov 2019 01:21:11 -0800 Received: from HKMAIL104.nvidia.com (10.18.16.13) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 28 Nov 2019 09:21:11 +0000 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.53) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 28 Nov 2019 09:21:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ibFEnkMpwCi1f/Xf2kDZoT9kfdi1sVr7wm5EkEXW3xcuRovHSMCCEHgZtDafDEUWg/fKk0wI7oL+uRh7WBx+7tELPJPLtJ4gPHktJ92brPRRoUqbHJfVS+nrbs5OR2JrCJn4WylMyt4Qz1V0mqNmxPD+9N/x3iuKsCFQ1HMNtObgsFdFiL6FytZs99qU6RImYU/Lsq72Dc4B/1f5d7Z/KBN/pIF+h8eOAsTUrdMEFJf7Z74kjAaPLR3oKfSufUMxcAXfxKno1OeQlVHguWTgpagGeJsxXhFkz3BnsYGIHsJzqHPy0FiXwcFUm+HtPYSaov+KXvhHC7/jCrx/fUdDrw== 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=wy4iaTloM7+Gs5azlBg0dcZ7PJkh1HmJ2bmBMWp4qMY=; b=eW1ycjggd/+Mt00zdMnG3V1jCP758heevDIrQpHxqbb/okN4xHdk5xngNhjo1YktI3t2GEryIIl0DjuEDhP0P9aoIM/ejafgC/cITktbnalDJNsGgWkyCcMWxiubKFnMiw8Fu5m1ovVpHdbSWx1kSN63+jzLbZ7UqIxtmQ5diMSlHsn7uC/oo7KgLZiA6hyv/HG/Q0pDSGf1P1WAqYpv05iVp5j42V4xPVtt06uACeAvhVUeMFu2tjSu+8xceAMtUy3is0YstxXMJQP3XeOS4GP3kPfkDDhjIMita6wItLjbJ6w8UX78+JzsnBMyZiMTgM3eCqMcUuLghXD1uPVclw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from MN2PR12MB3389.namprd12.prod.outlook.com (20.178.242.161) by MN2PR12MB2911.namprd12.prod.outlook.com (20.179.80.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.20; Thu, 28 Nov 2019 09:21:08 +0000 Received: from MN2PR12MB3389.namprd12.prod.outlook.com ([fe80::e03a:9150:cda:2dbb]) by MN2PR12MB3389.namprd12.prod.outlook.com ([fe80::e03a:9150:cda:2dbb%4]) with mapi id 15.20.2495.014; Thu, 28 Nov 2019 09:21:08 +0000 From: Henry Lin To: Peter Chen CC: Felipe Balbi , Greg Kroah-Hartman , Romain Izard , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , EJ Hsu Subject: Re: [PATCH] usb: gadget: f_ncm: fix wrong usb_ep Thread-Topic: [PATCH] usb: gadget: f_ncm: fix wrong usb_ep Thread-Index: AQHVoCLus26pLsIkukm9vcuV6VVAeqebTyAAgAG/7WqAAA5WAIAAH+35gAENlwCAAg41Vw== Date: Thu, 28 Nov 2019 09:21:08 +0000 Message-ID: References: <20191121041858.15746-1-henryl@nvidia.com>,<20191125042039.GA10953@b29397-desktop> , , In-Reply-To: Accept-Language: en-US, zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=henryl@nvidia.com; x-originating-ip: [59.124.78.18] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9d8971cb-a62a-42ad-8d9f-08d773e44d4a x-ms-traffictypediagnostic: MN2PR12MB2911:|MN2PR12MB2911: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0235CBE7D0 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(376002)(39860400002)(366004)(136003)(396003)(346002)(189003)(199004)(52536014)(6506007)(76176011)(7696005)(102836004)(446003)(186003)(26005)(11346002)(33656002)(316002)(99286004)(54906003)(71190400001)(71200400001)(86362001)(9686003)(256004)(14444005)(55016002)(6436002)(6116002)(3846002)(6246003)(229853002)(2906002)(478600001)(8936002)(107886003)(81156014)(81166006)(8676002)(4326008)(7736002)(74316002)(305945005)(64756008)(6916009)(4744005)(91956017)(25786009)(5660300002)(66556008)(76116006)(66946007)(14454004)(66066001)(66476007)(66446008);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR12MB2911;H:MN2PR12MB3389.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nvidia.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NmPvt5qQ0FpNLhPgy/DI6Fe+hBdcNptv+ohmsPYT53kVD078XVZHK0wWpnGgyxKXLu8l+AcBtkIuAQVRbfW1vi869fdrSTgYwxFtIEk5DROtG+NMT6jF9mbCw6QP707S6mOoMED83BXtBPhvSTOkNkMkoEWlTVdLEhbdJ8pbukpYCQqNt8Vv/EDkpvSBc3Oekd5SnkwOdkk5qIv7J47K6GwhSQuPWTR5r9MwnoL1oSMBY6RkEHmKkoK/h/jOyBgjy0Qb+XOa4bcsbzpBNlBcyp5zqofoILqdJkjIztVltWw+nzOM9ToJRAG3hD4TPIij/Jk3+JvoFO/jfUigk8D6ZhvqJ78R8zEEbWtivpMQzeXlah5SPgLHUPEUPdrRbfQB+FKfbntPeHPhy+RJ7Uk3cyDXQlN59C7oul6TrANx4CtyRDv48KaxPD/49v3NALEn MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 9d8971cb-a62a-42ad-8d9f-08d773e44d4a X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2019 09:21:08.0734 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DpTNLd5s1gEz5upX1/UjHCz5Uws4AZbIgnhvz0far+iB3+Uhva5XND+xtMVoA/lFMHP13v6sZ9sq3lQGbjXPBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB2911 X-OriginatorOrg: Nvidia.com Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1574932871; bh=wy4iaTloM7+Gs5azlBg0dcZ7PJkh1HmJ2bmBMWp4qMY=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:X-MS-Has-Attach:X-MS-TNEF-Correlator: authentication-results:x-originating-ip:x-ms-publictraffictype: x-ms-office365-filtering-correlation-id:x-ms-traffictypediagnostic: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-forefront-prvs: x-forefront-antispam-report:received-spf: x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info:MIME-Version: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg: Content-Language:Content-Type:Content-Transfer-Encoding; b=k2pk84EnpUQlpfrF2FniLKyas3o22UalFml4lChL6Vqgqtp9Wbz2VShxhIUQ/iJ5y HbyK4UvpumW0y306LI1ifV6S56uAoOrOuqdVgDnekxA0PvHglu7Wqow2wsvOtFRgLY mvMNboPfNoihXbyyuMYqX4rogkf5lOQIP+HHb69QnGQ4BpTvZwUYaTTRI+kmqpgcOD /8mSuAwCZ1iWDRJvul9BeKy+t3naSHgygm8sahbHySbzcV03QAWVClHh9FY3in0M2Y VXsnkAvh0QwDOm8NZ+Kuo0su0MqxNyQGYgOhVOlVe4B0Cb/6endagJ9/dHsJrLmmOg WkMH/5Qpp7BcA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> >Does your UDC driver call composite_disconnect when disconnect from the= host?=0A= >> >It should set all desc to NULL at related function ->disable.=0A= >>=0A= >> For ECM case, if ecm_set_alt() gets called with alt =3D=3D 0, in_ep->des= c and out_ep-=0A= >> >desc will be set up. But these two ep will not be enabled as gether_con= nect() is not=0A= >> executed. During disconnect from the host, ecm_disable() gets called wit= h ep=0A= >> disabled. In this case, gether_disconnect() will not get called to set d= esc to NULL.=0A= =0A= >Would you please share your test case? I use Linux host, and the host will= always set alt for 1,=0A= >and doesn't have this issue.=0A= Using Windows host (without any proprietary NCM/ECM driver installed) can r= eproduce set alt=0A= to 0. We just used Win10 to confirm this.=0A=