Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp66988pxb; Tue, 5 Oct 2021 23:30:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+S3AjqKDnS57rQFOLOrDSjRlxYbl/Ggq+vSvn+ct4GDdeh/Mtpk9ahF8qoKz9pU34SfmO X-Received: by 2002:a17:907:a061:: with SMTP id ia1mr28566749ejc.372.1633501850343; Tue, 05 Oct 2021 23:30:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633501850; cv=none; d=google.com; s=arc-20160816; b=LDqnS8A85NBwRAk1lt0Tp3Yxw19a5FgCgQn+KsOb0d7JOyMfpuAcxHfZTxHuTR/5rj 8lzV7dEf4diyZY6c0xIBe92XcsZQuO0dj/CO2nFPBH4vhbCz7XBMC0OoO7wgK62/llUm mGhoMYYJAQrHBFYDVs7xz8nhWOGsqQd5X+LBuagqSA0rx5mGCdjsJdeiWHSVZB/tvjrl bI84Chdd8hryKCD3vkhM2lPWWj431nj3p92v7xUTWLIws8vMPq6+ctKWto61pUZRMF92 dwCdy0BiM0BuiwkQJuC2zE8jPhMSqOyi0iHuS4iIcWirCi7XwW7xt67sA7II0HbhhEic ozUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MHPeHf22NR/8811DWs3khycdUtdIYMjsb5gUEAFkjAc=; b=GJRgl5gzqJmf9w6mGKm2cOT2T24Nu+kE5gspNbJIayac712E27Trrs59JNLEUFoJUV kDplStaIFBoCZo7/a2L9ysxfCYrhMyJXGoG2t7jk5NiOpOSpC7/Ewx7hOfTxfnpGhqUo gWxh7LDBqS1lazmhV9ADv9A0Nq7v+ujUCJjWLXYaPxTN+v7zPasGY2Zn0g8K+IaFiEBO oSFOSEClVPfhVM6FSY1QwzPd8eP4yTE9w6t3FtTxCgHTA5JseHOtBJzHSWdPFfspAF0Y Ztwj5OIJc2fNFwUxxN3U/RZ4myJTYEAzuKXXZSt7R5iX3beLHBjaCcX/swbm0rbRiS6O 0xkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Nu0KSdos; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p7si23899864ejl.82.2021.10.05.23.30.25; Tue, 05 Oct 2021 23:30:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Nu0KSdos; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236535AbhJFG3y (ORCPT + 99 others); Wed, 6 Oct 2021 02:29:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:53850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229797AbhJFG3x (ORCPT ); Wed, 6 Oct 2021 02:29:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6DDA760EC0; Wed, 6 Oct 2021 06:28:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633501681; bh=spg2FfB33eWRaZlMimWllWmYIhAbe/hDa0jC2sb1vWI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Nu0KSdos8srKS5PIPAOZZNp8J/2y5CPh/+dnqB2466tL4XJzMDHY0vH2W7eGUsOYc CwnIoKUKrM8wQ76l6MJw2Q38dpQZHYi605sGDZ27T+ryGez1rmoQ5JHaX7o8kI0A+i sD8TBOVJACa3H17k+oxP6iQHDCcOoJIHajMgs3ro= Date: Wed, 6 Oct 2021 08:27:59 +0200 From: "gregkh@linuxfoundation.org" To: Minas Harutyunyan Cc: Fabrice Gasnier , "robh+dt@kernel.org" , "alexandre.torgue@foss.st.com" , "balbi@kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "devicetree@vger.kernel.org" , "amelie.delaunay@foss.st.com" Subject: Re: [PATCH 1/3] usb: dwc2: add otg_rev and otg_caps information for gadget driver Message-ID: References: <1631692473-8732-1-git-send-email-fabrice.gasnier@foss.st.com> <1631692473-8732-2-git-send-email-fabrice.gasnier@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 01, 2021 at 11:10:19AM +0000, Minas Harutyunyan wrote: > On 9/15/2021 11:54 AM, Fabrice Gasnier wrote: > > Currently the dwc2 doesn't fill in the 'otg_caps' of usb_gadget structure. > > When registering a gadget device (e.g. via configfs), the > > usb_otg_descriptor_init() checks the 'otg_caps' and 'otg_rev'. It defaults > > to HNP and SRP bmAttributes if unspecified. There may be a mismatch with > > what's being set in dwc2 params structure. This result in the descriptors > > to be miss-configured in this case. > > > > So add an option to setup 'otg_caps' and 'otg_rev' in the params. It's > > then provided to the gadget struct. These parameters can then be tuned > > for each platform. In case it's not set, it will default to current > > behavior. > > Also add option to setup these from the device tree by calling > > of_usb_update_otg_caps(). This provides support for standard properties > > such as "otg-rev", "hnp-disable" and "srp-disable" (see usb-drd.yaml). > > > > Signed-off-by: Fabrice Gasnier > Acked-by: Minas Harutyunyan > Looks like this commit breaks the build on some configurations: https://lore.kernel.org/r/000000000000b01f1505cda8e03c@google.com So I'll go drop this and the 2/3 patch from my tree. Please fix up and resend. thanks, greg k-h