Received: by 10.223.185.116 with SMTP id b49csp82787wrg; Thu, 8 Mar 2018 13:16:37 -0800 (PST) X-Google-Smtp-Source: AG47ELsEmtihYkbHcF/ZCEEVq1yeim6HYic4KeqpQIDb9qWIRTVlztMxrIFvqQg4Jn8UdRndZAcv X-Received: by 2002:a17:902:7b85:: with SMTP id w5-v6mr25710082pll.131.1520543797482; Thu, 08 Mar 2018 13:16:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520543797; cv=none; d=google.com; s=arc-20160816; b=sZLW9veSVS20yJV51lCu7Ni05A1x0qLacKN7g2E5Er9nWjY7qLPPbj1UVIs7vUSnF/ sSPOck8Ac2fcwahnAvhH81oRlMA8huXzNCFCPXvJp5qOjdSMgyZwezF7okOGiUhdLFxP 47UlGbmXqhjwxt2x37Jirng65nM9xVJ8OOrunEsHHA07wAAWmWzjHTTSJwne1vaQ4ko7 e49CKeSOcZBI0Ia5dwZFeqBIscQnM1p/HIECAl7ZVL41iKquOs22JVXtqKOEPb++wAik Pn8l4i8AVj8q9KQMy5rEjNlbQBIY6tp56CfFVS+k1we45X9XsouTIXkcO06wW0YVV951 MscA== 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=UUwri66wcWaRD/7CrdADTYarisgRWjutSMhE8JqoB/Y=; b=u0q4nA6z/Zqo/HKR4sVXOK7Hg1UKHM/Yg/1ZaHO7FCJ4wU7i7GBkclQWjCraioROYO jHgLVYdBt02Q2/mNyAYhFBqSKs/R0yK9p5/wa30GA0YOI1vB11suZAmZp28q7r7cHDQz DBTq2OTWt7JyRovwa+4w6htKWpDCrYy0mQ+5Mr9ZM/sYl3/YeRyPmZmcR32iesrhiu6B jjPE6IuaXwB4o8y0l/d1pES7OOmR7w8MQf5LNHb2gznm1fV3JayCC6nwErJlJKh12QOG i8PKDMvYsc48Ry1jXI7Ayk0YsDNgrUcsazcY5/lGUEEogBEcD7XnWp9eTwXCmvc4cNj0 popw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=n7J1phn7; 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 h6-v6si13734022pls.39.2018.03.08.13.16.22; Thu, 08 Mar 2018 13:16:37 -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=n7J1phn7; 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 S1751073AbeCHVP3 (ORCPT + 99 others); Thu, 8 Mar 2018 16:15:29 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:55995 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750713AbeCHVP2 (ORCPT ); Thu, 8 Mar 2018 16:15:28 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w28LFQSJ007320; Thu, 8 Mar 2018 15:15:26 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1520543726; bh=zEVfuWrFzpCisAaOI+wzfS7TDSRPhCKDtRZzvDVe15k=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=n7J1phn7yZgNt6ynzBaPWih6jl5ExoqPlnN46Jyal8pdb7LTOMZTatUoxvTjcwiiZ 1y44w4h2oV/TOzM9GuBV9fZFdK/ytWBJumU52cDpeHkzsAtGlftbwKlwtLd2FwXFcl MN2Fd4sW4QL/oNsi/9t73/0ROznJJSDWzNkThTdY= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w28LFQRh001944; Thu, 8 Mar 2018 15:15:26 -0600 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 8 Mar 2018 15:15:25 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Thu, 8 Mar 2018 15:15:25 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w28LFPE0004374; Thu, 8 Mar 2018 15:15:25 -0600 Date: Thu, 8 Mar 2018 15:15:25 -0600 From: Bin Liu To: Merlijn Wajer CC: , , Greg Kroah-Hartman , , Subject: Re: [PATCH] usb: musb: Fix external abort in musb_remove Message-ID: <20180308211525.GJ14921@uda0271908> Mail-Followup-To: Bin Liu , Merlijn Wajer , ivo.g.dimitrov.75@gmail.com, linux-omap@vger.kernel.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180308204049.29474-1-merlijn@wizzup.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180308204049.29474-1-merlijn@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 Hi, please add patch version numbers in the subject when necessary. This helps cross-referencing. On Thu, Mar 08, 2018 at 09:40:47PM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload. > > musb_remove function now calls musb_platform_exit before disabling > runtime pm. > > Signed-off-by: Merlijn Wajer > --- > drivers/usb/musb/musb_core.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c > index e2e95071328a..cf90d34f7199 100644 > --- a/drivers/usb/musb/musb_core.c > +++ b/drivers/usb/musb/musb_core.c > @@ -2472,13 +2472,14 @@ static int musb_remove(struct platform_device *pdev) > musb_platform_disable(musb); > spin_lock_irqsave(&musb->lock, flags); > musb_disable_interrupts(musb); > - musb_writeb(musb->mregs, MUSB_DEVCTL, 0); > spin_unlock_irqrestore(&musb->lock, flags); > > + musb_writeb(musb->mregs, MUSB_DEVCTL, 0); Does it solve the issue if not moving this line? I'd like to have minimum change if possible. > + musb_platform_exit(musb); > + > pm_runtime_dont_use_autosuspend(musb->controller); > pm_runtime_put_sync(musb->controller); > pm_runtime_disable(musb->controller); > - musb_platform_exit(musb); > musb_phy_callback = NULL; > if (musb->dma_controller) > musb_dma_controller_destroy(musb->dma_controller); Regards, -Bin.