Message ID | 1534859756-6955-3-git-send-email-loic.poulain@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp5306663ljj; Tue, 21 Aug 2018 06:56:06 -0700 (PDT) X-Google-Smtp-Source: AA+uWPx9MM5RPTmHq7SGXpPHZHLZce3iDSOV8JKNn5Sts+CFhv0PZn4IivLl4cMAqCGEqV7luPd3 X-Received: by 2002:a62:d74f:: with SMTP id v15-v6mr21439886pfl.257.1534859765904; Tue, 21 Aug 2018 06:56:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534859765; cv=none; d=google.com; s=arc-20160816; b=bV9VLZQ1MMoun3cZVZs44jJ/zXIfm5iKr11ERQU4qDOpxIrOej1TZDb04GBc1fZiCP NMDK8+xNoY84+esrDNb13kGzkD3u1Uq9wc8zW29et9JGBW94kxLdmtLHoMgkw1/T4wf/ 9Ime+e10VO7zTKNu/Ye6VtcnNGIBYsmGxkjJLHmLJfzdggHsYegGouPfh1UcuHOTXex3 aMNmTmz3AmY1noisbGdxZhuyKDfnTAjoROQHYs7YQxqSafj7HI9Cp11wrQakdbIfcnD9 mIHBS2HFlgs4Ngup0zLM3TrQp0JUWEcu1DRb7WSRP/Ttb7gAXNsgbi6TIWdDSPWwCFtU uxTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=K+768cvU4pPkRaQ3YhlP5lEiMFUDD4Pvl2Aw6Stu7VM=; b=Y9UJ73Rv/wkInU8xXFLqJj8BW3q7jXaHq9VZTh7PJmV5CDxpAnWXRs58+4Qp9c7Yrv VjDZhUnSos0FaTG4zm+Hpaf8sqA5qIYj7zXV5N8vTWxmqBROwXkN1RYxT5OBAoBtz379 7PDL87ke1aL5C5GPuktSzd33aX/RF+e+HhG8zR6Dmfnbv/ve9khgSz1WbBDkXgbVJy0l QQD8cFNWRfZhD3e2YQGv8Tkzz+NEuZ20JBBXCn9FkPK7DpFtKooYdT3Dwr9SqN0SD7rz yvwh44St2+vdhO645RqVDnLNSgNik5pSX51J9k5sYL8Bo7gnZwstUsezfHQ+gOVGXcmJ sw9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aV4isIV0; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <linux-usb-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f25-v6si7569484pgm.58.2018.08.21.06.56.05; Tue, 21 Aug 2018 06:56:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-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=@linaro.org header.s=google header.b=aV4isIV0; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727345AbeHURQT (ORCPT <rfc822;loic.poulain@linaro.org> + 5 others); Tue, 21 Aug 2018 13:16:19 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43771 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727252AbeHURQS (ORCPT <rfc822; linux-usb@vger.kernel.org>); Tue, 21 Aug 2018 13:16:18 -0400 Received: by mail-wr1-f66.google.com with SMTP id k5-v6so4411707wre.10 for <linux-usb@vger.kernel.org>; Tue, 21 Aug 2018 06:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K+768cvU4pPkRaQ3YhlP5lEiMFUDD4Pvl2Aw6Stu7VM=; b=aV4isIV01NCTUOo6lJhKgs30jUfcFF3l/qpAEyM49F48jfqvWCfTmU8gZmHLTWkwdz V1IXZoSNK2KngMx0OwWYclZCROMzyfim8waLfH+vxKyqu59zYH2BcjzHSKWfjFnkz4UT avvxY2ZMyM6baGcvj8yzI3mvlOuzRUS872nzw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K+768cvU4pPkRaQ3YhlP5lEiMFUDD4Pvl2Aw6Stu7VM=; b=OG4MRRdNwJybLFnD8nprYy/u43/oxdcaab1LtyxMyAwSoApRp+yL0sjz5RuCMzVZqB uxjPfH7avSJu8RZdv58WVttD1YZm9CcZF+TFt1kSmYaRAdRTd4/TWkVnf3Lc0Sjr0P+w Nd2F6ztcNvK938UAA/CL0AQ8as2L0ErarFahg8cWk6pANnmbJMP4iaw2dOQ+CTpQRQPn 6Np0xkRRH4nvbE1FFSoLA0UcGTIPHVjHjOZScD4QWgk02IKAWNLYRnTE/UI+kf9gKt5J 5QnuhY0TvIsMugm5hSRX993QaVq8V8Sq4QD1/fwAmCIb6IZvZt0BIENWDLDkZ2R1jjtL nsfw== X-Gm-Message-State: APzg51Cido8XaqbrGNRTKtqA8/fC5LvuWe5oQqxoKzrCmihaOXa+KzMl sz6RIgguRJyUYq47U+YlDIxEVw== X-Received: by 2002:a5d:4fc3:: with SMTP id h3-v6mr3183393wrw.261.1534859762734; Tue, 21 Aug 2018 06:56:02 -0700 (PDT) Received: from lpoulain-ThinkPad-T470p.home (AToulouse-655-1-762-165.w109-220.abo.wanadoo.fr. [109.220.142.165]) by smtp.gmail.com with ESMTPSA id l24-v6sm16728523wrb.65.2018.08.21.06.56.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Aug 2018 06:56:02 -0700 (PDT) From: Loic Poulain <loic.poulain@linaro.org> To: Peter.Chen@nxp.com Cc: linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, david.brown@linaro.org, robh+dt@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, Loic Poulain <loic.poulain@linaro.org> Subject: [PATCH 3/6] usb: chipidea: Prevent unbalanced IRQ disable Date: Tue, 21 Aug 2018 15:55:53 +0200 Message-Id: <1534859756-6955-3-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534859756-6955-1-git-send-email-loic.poulain@linaro.org> References: <1534859756-6955-1-git-send-email-loic.poulain@linaro.org> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: <linux-usb.vger.kernel.org> X-Mailing-List: linux-usb@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/usb/chipidea/otg.h b/drivers/usb/chipidea/otg.h index 7e7428e..4f8b817 100644 --- a/drivers/usb/chipidea/otg.h +++ b/drivers/usb/chipidea/otg.h @@ -17,7 +17,8 @@ void ci_handle_vbus_change(struct ci_hdrc *ci); static inline void ci_otg_queue_work(struct ci_hdrc *ci) { disable_irq_nosync(ci->irq); - queue_work(ci->wq, &ci->work); + if (queue_work(ci->wq, &ci->work) == false) + enable_irq(ci->irq); } #endif /* __DRIVERS_USB_CHIPIDEA_OTG_H */
The ChipIdea IRQ is disabled before scheduling the otg work and re-enabled on otg work completion. However if the job is already scheduled we have to undo the effect of disable_irq int order to balance the IRQ disable-depth value. Fixes: be6b0c1bd0be ("usb: chipidea: using one inline function to cover queue work operations") Signed-off-by: Loic Poulain <loic.poulain@linaro.org> --- drivers/usb/chipidea/otg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4