Received: by 10.192.165.148 with SMTP id m20csp842011imm; Fri, 27 Apr 2018 08:21:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoXLVCKjABp50KeRZUFdGbqj6djEzkzSuqb9LcQpvgo/FF9gQSivTZeNSKX+L6VwGOjmoZz X-Received: by 2002:a17:902:2006:: with SMTP id n6-v6mr2707050pla.125.1524842496546; Fri, 27 Apr 2018 08:21:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524842496; cv=none; d=google.com; s=arc-20160816; b=l4/V+3qLvnpYWZCQHZaPCdX6Qk69eL69D6jZuyA0eOFIRWhMpk6fWodzcqx5or2SQL mifgTm9CA7T3Vr5WKzh0DE4KGhOTvr8+liNa2+EvHq9kd9pRcTOEwtz0yzNuFQdDu+y7 0l02NhCVkSywEXO8iarwmXg8afExAL2u69KpBkHLMYNHNmNfcifcENww1XA5P/93gOYf 0worll1fSGvB6E45tZdhYHAiBsnkQza8nMiY54onCN0poTb+yzfpFgI35PK+vYfJbt9B FHKEKkxuK5Y8bSeiKheUlCLih3TbbLDGl3zqv3IUaXyoX/8GWOwdh6dTEVWtomeTWeow zE+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=RprM/Er2wF/r0lb1jXOSt7G4qaLLJicf7BKeXi9W3FA=; b=tPHpTWd+pLWdGInpKBc8y2ykPIEthw5clilgauoFDTHwKCZ5F/IxagWo3u5snlH8CW btowtKUTMzRVNPbMAdqUv8JDS09MOCjql75gz542m17o/WepaCtXFbPxvBLtcySDP2if DqQTpD3QqvUpCnIUu/o0fxH24oYo134XDkAziQtVMwlHiZOKU9kPN2MWyhZmSEw/2ADS EUAvQRjk53Vum1oHfZeJugz2ZSL2GhISwkDtBGMTSj2eRHtGmpLwdtFNMw3a6IB9KeCk 6Pz79XyrLzlWHD/YKWn/9ZtpkExkrm5j+CWUgvlR2D9r3bqRR8tCeuEhy1j4H4pEkN0T hWpA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x6-v6si1375171plr.333.2018.04.27.08.21.22; Fri, 27 Apr 2018 08:21:36 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933425AbeD0OCx (ORCPT + 99 others); Fri, 27 Apr 2018 10:02:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:49448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933411AbeD0OCu (ORCPT ); Fri, 27 Apr 2018 10:02:50 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 56A7A218A0; Fri, 27 Apr 2018 14:02:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 56A7A218A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Merlijn Wajer , Bin Liu Subject: [PATCH 4.9 10/74] usb: musb: Fix external abort in musb_remove on omap2430 Date: Fri, 27 Apr 2018 15:58:00 +0200 Message-Id: <20180427135710.330667834@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135709.899303463@linuxfoundation.org> References: <20180427135709.899303463@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Merlijn Wajer commit 94e46a4f2d5eb14059e42f313c098d4854847376 upstream. This fixes an oops on unbind / module unload (on the musb omap2430 platform). musb_remove function now calls musb_platform_exit before disabling runtime pm. Signed-off-by: Merlijn Wajer Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman --- drivers/usb/musb/musb_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2485,10 +2485,11 @@ static int musb_remove(struct platform_d musb_generic_disable(musb); spin_unlock_irqrestore(&musb->lock, flags); musb_writeb(musb->mregs, MUSB_DEVCTL, 0); + 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);