From patchwork Mon Oct 24 18:07:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 9392889 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9B83C60231 for ; Mon, 24 Oct 2016 18:08:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95D182908E for ; Mon, 24 Oct 2016 18:08:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A05F2909C; Mon, 24 Oct 2016 18:08:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 091222908E for ; Mon, 24 Oct 2016 18:08:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965586AbcJXSHQ (ORCPT ); Mon, 24 Oct 2016 14:07:16 -0400 Received: from muru.com ([72.249.23.125]:45805 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965564AbcJXSHM (ORCPT ); Mon, 24 Oct 2016 14:07:12 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id CA84782D6; Mon, 24 Oct 2016 18:08:13 +0000 (UTC) Date: Mon, 24 Oct 2016 11:07:08 -0700 From: Tony Lindgren To: Ladislav Michl Cc: Bin Liu , linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, Kishon Vijay Abraham I Subject: Re: [PATCH 0/2] musb-fixes for v4.9-rc2 Message-ID: <20161024180708.kpx6s2jb7dpg6xfx@atomide.com> References: <1476896620-15432-1-git-send-email-b-liu@ti.com> <20161020082318.GA2903@localhost.localdomain> <20161020123524.oepmqvlhzzu7elgj@atomide.com> <20161020193612.GA29736@localhost.localdomain> <20161021071722.2cetd2mt23t245ao@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20161021071722.2cetd2mt23t245ao@atomide.com> User-Agent: Mutt/1.6.2-neo (2016-07-23) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, * Tony Lindgren [161021 00:18]: > * Ladislav Michl [161020 12:37]: > > [ 186.457519] musb-hdrc musb-hdrc.0.auto: VBUS_ERROR in a_wait_bcon (90, > > > And that's the end, since now it does not react on hub plug/unplug. > > > > Also all that VBUS_ERROR conditions are strange as hub is powered separately > > and power lines from phy are not used. > > Hmm yeah. I'd like to be able to reproduce this. Can you email me > your .config (again)? You have things in host mode with a powered > hub plus few devices with no USB gadgets configured? Well I found your earlier .config so presumably that did not change. Below patch seems to do the trick for me, but I need to test more. Care to test if it helps for you? Please test with v4.9-rc2 and the following two fixes heading in Greg's usb-linus branch: cacaaf80c3a6 ("usb: musb: Call pm_runtime from musb_gadget_queue") d8e5f0eca1e8 ("usb: musb: Fix hardirq-safe hardirq-unsafe lock order error") I'll send a proper patch if that works for you. Regards, Tony 8< ------------------------ diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c --- a/drivers/phy/phy-twl4030-usb.c +++ b/drivers/phy/phy-twl4030-usb.c @@ -459,8 +459,6 @@ static int twl4030_phy_power_off(struct phy *phy) struct twl4030_usb *twl = phy_get_drvdata(phy); dev_dbg(twl->dev, "%s\n", __func__); - pm_runtime_mark_last_busy(twl->dev); - pm_runtime_put_autosuspend(twl->dev); return 0; } @@ -472,6 +470,8 @@ static int twl4030_phy_power_on(struct phy *phy) dev_dbg(twl->dev, "%s\n", __func__); pm_runtime_get_sync(twl->dev); schedule_delayed_work(&twl->id_workaround_work, HZ); + pm_runtime_mark_last_busy(twl->dev); + pm_runtime_put_autosuspend(twl->dev); return 0; }