Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964912AbbLGPOm (ORCPT ); Mon, 7 Dec 2015 10:14:42 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:32888 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965225AbbLGPHB (ORCPT ); Mon, 7 Dec 2015 10:07:01 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Li Jun , Peter Chen Subject: [PATCH 4.3 105/125] usb: chipidea: debug: disable usb irq while role switch Date: Mon, 7 Dec 2015 10:01:58 -0500 Message-Id: <20151207145757.399458522@linuxfoundation.org> X-Mailer: git-send-email 2.6.3 In-Reply-To: <20151207145752.225938417@linuxfoundation.org> References: <20151207145752.225938417@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1499 Lines: 46 4.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Li Jun commit 251b3c8b57481bcecd3f753108e36e7389ce12ac upstream. Since the ci->role will be set after the host role start is complete, there will be nobody cared irq during start host if usb irq enabled. This error can be reproduced on i.mx6 sololite EVK board by: 1. disable otg id irq(IDIE) and disable all real otg properties of usbotg1 in dts. 2. boot up the board with ID cable and usb device connected. 3. echo gadget > /sys/kernel/debug/ci_hdrc.0/role 4. echo host > /sys/kernel/debug/ci_hdrc.0/role 5. irq 212: nobody cared. Signed-off-by: Li Jun Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman --- drivers/usb/chipidea/debug.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/usb/chipidea/debug.c +++ b/drivers/usb/chipidea/debug.c @@ -322,8 +322,10 @@ static ssize_t ci_role_write(struct file return -EINVAL; pm_runtime_get_sync(ci->dev); + disable_irq(ci->irq); ci_role_stop(ci); ret = ci_role_start(ci, role); + enable_irq(ci->irq); pm_runtime_put_sync(ci->dev); return ret ? ret : count; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/