Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6741727imu; Mon, 3 Dec 2018 01:56:23 -0800 (PST) X-Google-Smtp-Source: AFSGD/UVM9HbVMR39vmJxL5D9ZqPawmBxzJpRfe93pVNWi+HshdoPuWRt3+FoQw9gVszNEFcAcY5 X-Received: by 2002:a17:902:b090:: with SMTP id p16mr15329493plr.190.1543830983668; Mon, 03 Dec 2018 01:56:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543830983; cv=none; d=google.com; s=arc-20160816; b=DeQiVMncycsSAievQjUzceyg3++IiHux5Cn8DiEwhkvJft7lQBVR3B7UKNUtJQ5/z7 XEQMCj4oKn608q5L0ltu2bd3w9XO7Agv8uM2bZLbTUmkSilBH/3+ZajTF42GtJN1MA+R mjzQHX0hr9UPdTFDz1rnIo2A0aADyRc4CldNhbfuZhlw651j+mpMC3V2ohLMbW30mhc9 HyPnjWZEccJEeNYttutIp/hMskiwg4uflT2zOXbHaeD+L41iZszNxUOTtC+AlXi+Pj4l H0k+pD7KXlaHr2I8NT6tHYnrJB0miKuApAhTp+yV6ggqB+hW1oNVmMwhAkmjLZMTLCH0 kpTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:cc:to:subject:dkim-signature :dkim-filter; bh=r/a/ohCux/7YMu39A2WgPKzqb0opowrMWjEgTFSx8EM=; b=m1DIA3p98ml62W0mgmcOeKLZFwQ7YkyoiI/HVuLnUXo2ho7lw57WekhlQhZqZP+0+5 tbOBdEOxPJKyV2gR11dP5nPQ/Od2RpoUwE0g/7dYtUcpDIePGOCgYWam0M+MtZBRHmTO OeHpaRdhotoo7UGcfDEbkpeOqeRmeaFdONCKnBYUI0zFWZsUGNLKXnMGylOrEEGrnKly oN2gcnfMtVDOLDtlAXIBTaag/N2lk7vf3z+Gc83wQOG+FfgXVcTI2T07Xs6ID+noJHQX iUS7hfMqnYCRfF0dleo6g0gfo7yZ1vDqqIgKlynNfLCVZFUKSAC9FmVEs2Qctkb3V9UP MDjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Rf1sVKIb; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c67si13669687pfa.114.2018.12.03.01.56.09; Mon, 03 Dec 2018 01:56:23 -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=@samsung.com header.s=mail20170921 header.b=Rf1sVKIb; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726045AbeLCJxx (ORCPT + 99 others); Mon, 3 Dec 2018 04:53:53 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:54413 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725864AbeLCJxw (ORCPT ); Mon, 3 Dec 2018 04:53:52 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181203095331euoutp0237ccd26580dfc2c49a367ce9e246ce5b~syfGblzgo1374913749euoutp02N for ; Mon, 3 Dec 2018 09:53:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181203095331euoutp0237ccd26580dfc2c49a367ce9e246ce5b~syfGblzgo1374913749euoutp02N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1543830811; bh=r/a/ohCux/7YMu39A2WgPKzqb0opowrMWjEgTFSx8EM=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=Rf1sVKIbEE3rIvhfspF+lqWMN02lOqB/LOydEauiEORmwiczCXk5ZIh+TBjQon+uJ +VvsmKYQh163g/VKXvdEtVJDUJrkJ9auWfaS8D/Qd7cRy36rVLh81lJFipsl6VjqFm w46ld14TW5E2IAcMjjzSpS4MvpN+L1yYr12mD0W4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181203095331eucas1p289182b1c89e37f3c51bf6857c10de813~syfFxNP5q3217432174eucas1p2O; Mon, 3 Dec 2018 09:53:31 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 2C.F7.04294.A1DF40C5; Mon, 3 Dec 2018 09:53:30 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20181203095330eucas1p1bb43c679342c06db08132480a3dd9fab~syfEzM4q50189901899eucas1p1m; Mon, 3 Dec 2018 09:53:30 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20181203095330eusmtrp19713605e0681c65e0ec5fec8c06f2899~syfEyFnVO2714327143eusmtrp1j; Mon, 3 Dec 2018 09:53:30 +0000 (GMT) X-AuditID: cbfec7f4-c77a99c0000010c6-61-5c04fd1a26aa Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 05.BE.04128.91DF40C5; Mon, 3 Dec 2018 09:53:30 +0000 (GMT) Received: from [192.168.137.240] (unknown [106.210.237.40]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20181203095329eusmtip1452f996cea46032f3e57ba66a4222b2d~syfEUTkl22819228192eusmtip19; Mon, 3 Dec 2018 09:53:29 +0000 (GMT) Subject: Re: [PATCH v1 11/12] usb: gadget: Add configfs attribuite for controling match_existing_only To: Yu Chen , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: suzhuangluan@hisilicon.com, kongfei@hisilicon.com, Felipe Balbi , Greg Kroah-Hartman , John Stultz , Binghui Wang From: Krzysztof Opasiak Message-ID: <1eafffa7-9183-d9c9-2d22-410cc6e0982a@samsung.com> Date: Mon, 3 Dec 2018 10:53:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181203034515.91412-12-chenyu56@huawei.com> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFKsWRmVeSWpSXmKPExsWy7djPc7pSf1liDA6s1bM41vaE3eL6M0mL +UfOsVo0L17PZnHmt67Fxu//mC0u75rDZrFoWSuzRfdPO4vzrTOYHbg8Hs/dyO7RcuQtq8em VZ1sHneu7WHz2D93DbvH501yAWxRXDYpqTmZZalF+nYJXBkrT01hLFjHWbH+3QG2Bsb97F2M nBwSAiYSx+b8Yeti5OIQEljBKLH5yGMmCOcLo8TytmvMEM5nRok3Xx+wwrTMmjmXGcQWEljO KLFntTVE0QdGiRnrFoElhAXSJZ6t/wS2Q0SgQuLHgW9gNrPAbUaJ3Sskuhg5ONgE9CXm7RIF CfMK2Emcn7GcEcRmEVCR+PhxERuILSoQIdFxfzUbRI2gxMmZT1hAbE4BK4npN94wQ4wUl7j1 ZD4ThC0vsf3tHLCjJQROsUtc61wA9aeLROuXHkYIW1ji1fEtUHEZidOTe1gg7GqJ3wuOMEI0 dzBK7PjfC9VgLfFn1UQ2kKOZBTQl1u/Shwg7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4ymQM9NZJYSTc4HJo28 knhDU0NzC0tDc2NzYzMLJXHe8waVUUIC6YklqdmpqQWpRTB9TBycUg2M6152tYaqXX8TeCX0 68tHlwKusRtP3ZJ9zLfYK/aM8JlGw6fHxUpUw++fPX7ugnit7MF193/43Du2Z6e/YcSUbbNb /e20P29RFdv9ciNz6IRLu9i1+Ltki16HKK/QTtU0eqdtv15//t3HCl9luNfwfJjSUrSGd4ft gb7jUj7rqg4d1vqweO+DPCWW4oxEQy3mouJEAFS8r5fiAgAA X-CMS-MailID: 20181203095330eucas1p1bb43c679342c06db08132480a3dd9fab X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20181203034629epcas3p12958dc0d45a7de56c65d24390b4d0dd7 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181203034629epcas3p12958dc0d45a7de56c65d24390b4d0dd7 References: <20181203034515.91412-1-chenyu56@huawei.com> <20181203034515.91412-12-chenyu56@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03.12.2018 04:45, Yu Chen wrote: > Currently the "match_existing_only" of usb_gadget_driver in configfs is > set to one which is not flexible. > Dwc3 udc will be removed when usb core switch to host mode. This causes > failure of writing name of dwc3 udc to configfs's UDC attribuite. > To fix this we need to add a way to change the config of > "match_existing_only". > This patch adds a configfs attribuite for controling match_existing_only > which allow user to config "match_existing_only". > To be honest I strongly disagree with that patch. This attribute was intended for build-in gadgets to allow user to decide whether probe should fail or gadget should wait for UDC (used when gadget is built-in). For ConfigFS we expect the UDC to always exist prior to binding a gadget to it. If UDC goes away from what ever reason gadget should be unbound. So what this patch does in my opinion is abusing the attribute and hacking the kernel instead of creating a simple udev rule that whenever dwc3 appears and it gadget should be enabled write its name to UDC attribute. Best regards, -- Krzysztof Opasiak Samsung R&D Institute Poland Samsung Electronics