Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp513341yba; Mon, 1 Apr 2019 10:48:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3Rh9HxRCvGOTbarG0oi1rTUlpiOh7iXGlhxZB3Hx3AzB7a8495CZzP5ff/+yWkPGYphmA X-Received: by 2002:a17:902:b58f:: with SMTP id a15mr51043442pls.36.1554140914142; Mon, 01 Apr 2019 10:48:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554140914; cv=none; d=google.com; s=arc-20160816; b=pPjrSnTxkY1f1mq8zLGqivvE2Bi+IAbJGG8PcmDxH7H09eePLeCmetVH5eq2MPgLZE urcMib4OYykMWeeaWAIE45m8koVE2XxWEMwT3yyYvl9Znr/PacN5LxjzWePFwIcTH85C MOqzW83dnqsz6UO2ZgaiIGzNo7ASe69u3CZjnHuKe7ljr/MD7k3cG78xKffqwy4Fr/92 QMqfOHWvsOl1Vqxk4QxzjJmF74uP5AHGI/AvSUJ5xlA3bGOfc94EkT7qOkau41Bm62Vg mKZVDLHcoD/E4vePhLbPsahbcTlky3+cv6TtrxT8tlmqh5/c5DHZ9B8P7lDGL43kMFXL ya6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date :dkim-signature; bh=JpB3gNb95F/GGonib/43haMZjqG4EA7j6bKVwvf3yHw=; b=qKZdo0DemileMk5uf4hnoVEZEKlVnr4NdXaxdLFFbqS7WFc5ApJdIW0PQ1O0OVUQCP aHa10BgrsJdkbl7CGNu+JxmReLVaxo7OAzlIB/SGVGyWzHv5FMyGog4Q+6AlQtDT1geB zjz2lJg9111PNPzWRzk/1m0qCXKRLmdJ6zJTWylS37RdiZKsleP+levaId9FWQC5ueAZ x8jjVQnJmWjFRJggf0Niwsz60JVMuFPl//jQyj+2g03tQ3jC+bpYgRtiH59SCwVejmkR oAJUKloxAPMntZtBEdDLmCp8YKHK6m80YzW7Jr5OLLlqni3ioFPusepCfsTdIKPDtAFH 04bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=FhcSGzqT; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3si9110055pll.268.2019.04.01.10.48.18; Mon, 01 Apr 2019 10:48:34 -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=fail header.i=@crapouillou.net header.s=mail header.b=FhcSGzqT; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387871AbfDARqb (ORCPT + 99 others); Mon, 1 Apr 2019 13:46:31 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:36606 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730448AbfDARqa (ORCPT ); Mon, 1 Apr 2019 13:46:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1554140786; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JpB3gNb95F/GGonib/43haMZjqG4EA7j6bKVwvf3yHw=; b=FhcSGzqToDa+k+S2M2FyE0LdWj/2OO8k19XMV9rR2sZyU6oEOe3gxjcSzFNl5JuvvIq7RL xYDfntTgSJH0dZmFS+vuyhVqQXRVOnYNMQgEGxNMYW4BFQBKzEmvRhB3U1gxGuY8NOlisW LjMJS5RRlDd5++yc2W9ff6Dw87wqKzg= Date: Mon, 01 Apr 2019 19:46:22 +0200 From: Paul Cercueil Subject: Re: [PATCH] usb: musb: Force-disable pullup on shutdown To: Bin Liu Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, od@zcrc.me Message-Id: <1554140782.10471.0@crapouillou.net> In-Reply-To: <20190401171725.GK25852@uda0271908> References: <20190321144246.3547-1-paul@crapouillou.net> <20190401171725.GK25852@uda0271908> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le lun. 1 avril 2019 =E0 19:17, Bin Liu a =E9crit : > On Thu, Mar 21, 2019 at 03:42:46PM +0100, Paul Cercueil wrote: >> When the musb is shutdown, for instance when the driver is unloaded, >> force-disable the pullup. Otherwise, the host will still see the=20 >> gadget >> device even after the shutdown. >=20 > how would this happen? >=20 > when musb-hdrc driver is unloaded, udc core removes the bound gadget > driver which calls musb_gadget_pullup() to disable the pullup. I'm testing with the jz4740-musb driver. I don't unload the module (it's built-in) but unbind it from sysfs. > Regards, > -Bin. =