Received: by 10.223.185.116 with SMTP id b49csp3885216wrg; Tue, 6 Mar 2018 06:38:16 -0800 (PST) X-Google-Smtp-Source: AG47ELuPTxedJ5vpzUomlJKlcWmZ7hFv+ZHhw4cxy3tr5qG6/nNe4FcwcyiZPZyLNRLDZLhImEg2 X-Received: by 10.99.123.79 with SMTP id k15mr15451092pgn.173.1520347096115; Tue, 06 Mar 2018 06:38:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520347096; cv=none; d=google.com; s=arc-20160816; b=Fw7h654vOF5EyCGto8hl7OgD67vu6RQiLh7+47iMIEk56ospVLKSL3lgyeA5/jifr5 dD/yN3GbpoB610V9oeQYXQT79muBfgTmmoslS2eNA79SjSf4XWLJ7aRIyH3bH0LKCoZ1 qi/UO2Noo35S32g3Q8ONFH5G0FZDl4x780M1kp5EqEJMuYqHLObD0ceqn0Qo1DOX4I2B WQUukelw0QfLavoqb8LKxZMTZKDK3SUallINl/DK5GugU8mZVpGRBKG1LRYjgSkVvskU acqwLeCMFFDaUF9ogjqVz37r+Uck+LtT+VKHGtjN3yCS1NT7rvy0dtzCtgG44P2a7MZV Mh0Q== 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 :arc-authentication-results; bh=L0RJL+v2OtyR4A8RTNXZdNxbmVThnjAzBH1v3OpBF+M=; b=tSK/UTCugTEJ/rC3eGy5itb9KcViaXh0F6haWHfTNsXatDSwHbmqBgR4IRu7nqfZp6 IeouNN4M0cR/hnooBblfRDVbmFhrUJ1Nm3tDwX5/OrXHvCLzBrYbBcy2kYHuEwu9I6v3 /oPPfGbqG4gqfdu+dLycpZHcOWqpuyRfbCcXrdzGoRrwXzpIUHe8dj0Rf9/Y7TFpQbj2 QkW1QK2boqzy+4WPGtBGaFcEeaz0UR9whNP1liGvIYD49I4kTQ4fBX60yNl7WtL3T/o5 pBhPyTJ7yG9Kqt3L2uhXXH7oSVvs8HBUJzDIH1VszUszTQXvA3uMLf+PXkjX3aVCL3P4 Ckfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=egoBdYmH; 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 j8si11942626pfn.234.2018.03.06.06.38.01; Tue, 06 Mar 2018 06:38:16 -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=@ti.com header.s=ti-com-17Q1 header.b=egoBdYmH; 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 S1753504AbeCFOhD (ORCPT + 99 others); Tue, 6 Mar 2018 09:37:03 -0500 Received: from fllnx210.ext.ti.com ([198.47.19.17]:59986 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817AbeCFOhB (ORCPT ); Tue, 6 Mar 2018 09:37:01 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w26EaxeV003284; Tue, 6 Mar 2018 08:36:59 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1520347020; bh=7cQTVfJJ8NVNVEdKeBHnyFuPJf9Gfs3LXnEI7nXp3HY=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=egoBdYmHiC1D8R9zl0/eaeGA0oozJ/iBwBXlgKp1KjmPixrMiBFoM3kUbmXOFAPdC a73mnEinp6XQFgLWflruHsy3XZt2Lm9cfyoQFXG6CuQeHOoBEpaLM2kPIUqAL4PbmM GgcCblOrMzg0Bb3rDn/yH4ZPWzZMYaROFSdJ7d8g= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w26Eax16006711; Tue, 6 Mar 2018 08:36:59 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Tue, 6 Mar 2018 08:36:59 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Tue, 6 Mar 2018 08:36:59 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w26EaxC9028094; Tue, 6 Mar 2018 08:36:59 -0600 Date: Tue, 6 Mar 2018 08:36:59 -0600 From: Bin Liu To: Merlijn Wajer CC: Pali =?iso-8859-1?Q?Roh=E1r?= , Greg Kroah-Hartman , , , Ivaylo Dimitrov , Subject: Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs) Message-ID: <20180306143659.GG14921@uda0271908> Mail-Followup-To: Bin Liu , Merlijn Wajer , Pali =?iso-8859-1?Q?Roh=E1r?= , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Ivaylo Dimitrov , linux-omap@vger.kernel.org References: <20180302152712.GA22262@uda0271908> <20180302165439.62xw4slhhupy4vy5@pali> <20180305192844.GE14921@uda0271908> <54fc4244-2584-f63d-23be-9e0413bcbee4@wizzup.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <54fc4244-2584-f63d-23be-9e0413bcbee4@wizzup.org> 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 Mon, Mar 05, 2018 at 08:44:40PM +0100, Merlijn Wajer wrote: > Hi Bin, > > On 05/03/18 20:28, Bin Liu wrote: > > > The musb udc driver sets the state to b_idle without checking a > > gadget driver, this should be cleaned up. I have add this in my backlog. > > But if this issue doesn't bother you much right now, I will make the > > action low priority and address it later whenever I got time. (likely > > not very soon, I have a hand full of musb driver bugs to fix...) > > I can try to fix it this (or next) week. Do you have a pointer for me? Quickly looking at the code, musb->xceiv->otg->state is set to OTG_STATE_B_IDLE in musb_init_controller(), musb_gadget_setup(), musb_gadget_start(), and musb_g_disconnect(). I am not sure if there is redundancy, and gadget driver should be checked in some of them. Regards, -Bin.