Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1359130yba; Thu, 4 Apr 2019 09:11:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqzG0dKDTRINE6K3wLg3VTYpjfdmLWS45L89vJ04ZwbWs+c+XJuuUPuEUAHoK32UBVqIur X-Received: by 2002:a62:ab14:: with SMTP id p20mr6784015pff.23.1554394315156; Thu, 04 Apr 2019 09:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554394315; cv=none; d=google.com; s=arc-20160816; b=kD9KcPKcvh/pilSsS2Xg2muzqYKRuAuzCfHNFTxFxRZ+iu9BMsr9BGrYQw/0XY9jXi K6cxFW7Nyc6gMbGYVEBN7qngLc5k2WWfrMo+iZDwC/WF8gCsiJs2N7C8ETR2Ojh+fvZ5 dAu9n+3KsDO7FAYTu/wUYI0I2T+N2bdh3EmafOvPXw+WVTWgQUAmogQSXyvlq7/Q7qq5 UWp+mgSX9jCn8zKrEYEPNEJ5gLzgCm0VTrDH5Qy7PyXnf3arr645LS+hzn1sbsxaf9nI 6P+2awqVT8yYiPBBvRGmj6DioYkmy+6WEf71jnVjRttxwLwu9JcRIunsFWaFbnLYL6as T/3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=jXUbV4eD3j30XaY7hpzKJGJyJUCbnzSUHew47Go2unE=; b=aCubHSI7i45SoPRfODHFFMLygIgNLEC1ul+aydNWAUv00KQWb6KKxGtz+UGrEN2hdw oH1I8C4ebyWR5bt11F1DlmpHdmKVTwkyf1BrpIVHayY0+9p+FvX+M7P6HsRFifMFiPYr GRNlEC5xpet7kexc/wiIz6pnkqreOwJNgT6EHjQ1J4T5VIDeCuM1CuLXI70wdAAZwEIw 9btf8BNIILiRbj/Ny/0KnK8qYFvGe3nFSuRvFpcDjyFtuI36pNKF6lm/pdJ5vYK4lltr dME/01tSWpEFZ1lj2F1Wpq9L/oNwHGd1UDqhFLRO04bSm4H5CwLGicXWSCQ16EOoXYn0 Gfcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="ds/bF1Nx"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si16098989pgq.347.2019.04.04.09.11.37; Thu, 04 Apr 2019 09:11:55 -0700 (PDT) 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=@ti.com header.s=ti-com-17Q1 header.b="ds/bF1Nx"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728552AbfDDQK4 (ORCPT + 99 others); Thu, 4 Apr 2019 12:10:56 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:50172 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727152AbfDDQK4 (ORCPT ); Thu, 4 Apr 2019 12:10:56 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x34GAko6116493; Thu, 4 Apr 2019 11:10:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554394246; bh=jXUbV4eD3j30XaY7hpzKJGJyJUCbnzSUHew47Go2unE=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=ds/bF1Nxmfp+QwYQ/r/dfqYkvRItzGXL7Be7QNSf9lSl3q/KTAKdD9bsKcmH9WCEI RYtovKCiteUlde3TbWM17UL0BxoPyRr5u9NVK53gK57spV3yKCAAPKSRxK/yl4HmrH /TfzSi/C+AakHm+aP8BpCg/11o9LGudhcowsU1Io= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x34GAkA2078836 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 4 Apr 2019 11:10:46 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 4 Apr 2019 11:10:46 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 4 Apr 2019 11:10:46 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x34GAkxl108146; Thu, 4 Apr 2019 11:10:46 -0500 Date: Thu, 4 Apr 2019 11:10:46 -0500 From: Bin Liu To: Paul Cercueil CC: , , Subject: Re: [PATCH] usb: musb: Disable pullup in gadget setup Message-ID: <20190404161046.GA30182@uda0271908> Mail-Followup-To: Bin Liu , Paul Cercueil , od@zcrc.me, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190404093743.6470-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190404093743.6470-1-paul@crapouillou.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 04, 2019 at 11:37:43AM +0200, Paul Cercueil wrote: > The pullup may be already enabled before the driver is initialized. > It has to be disabled at init time, as we cannot guarantee that a gadget > driver will be bound to the UDC. > > Signed-off-by: Paul Cercueil > --- > drivers/usb/musb/musb_gadget.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c > index ffe462a657b1..094dc59c834c 100644 > --- a/drivers/usb/musb/musb_gadget.c > +++ b/drivers/usb/musb/musb_gadget.c > @@ -1794,6 +1794,7 @@ int musb_gadget_setup(struct musb *musb) > > musb->is_active = 0; > musb_platform_try_idle(musb, 0); > + musb_pullup(musb, 0); > > status = usb_add_gadget_udc(musb->controller, &musb->g); > if (status) Applied. Thanks, -Bin.