Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp139671imw; Thu, 7 Jul 2022 23:23:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1taotJxB4v51p9y3xAUF0pSgF+5fpQ+5pisn0MkC9BICUCYUnOgOau2Sh7ymW86xwSUjN5S X-Received: by 2002:a17:902:d2cf:b0:16c:223e:a3e8 with SMTP id n15-20020a170902d2cf00b0016c223ea3e8mr1972892plc.125.1657261403099; Thu, 07 Jul 2022 23:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657261403; cv=none; d=google.com; s=arc-20160816; b=ZzPm267Sfl9sibiPeIu2W5GK4UtYe7yS/u8dOHpw+FkerBP4OmEwaSFVzqQ+h1geYU UTE0o7R3fj8eDc4LwsbUt+No9GwIi2+gf2vEdnEALernADtP3u7tM258cpKCtobNnvw5 sJcv9ry3IlRxo2YCG3r23tF5lfM0Cz45niOoJWjwQ1BpnGAJcN+VQiP5M2KgVWYiuRYn RpCoL96y9I4VnnUQ5KZZOtVSMA/sDi1ACQwrTi2LVg0o8sD7yVZIXFvUAMhydHBitg6k YcOuZt1yYA8h3MnoYHwL2MWIAAOLeXaZainCA2xc5vKcPrvRSzDNyX6ru0Fxk1yMgEQ7 nxwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=nopVA/lnqhA2exVnToP0mAgp/wxD75eWlnpPSbCMmhw=; b=oTrvP29Maq/wXTHfCEegzIRTlM7fTxNfDl5Eh/J+4eAFWJ2RzVZJgnRNGTuEnVaLFF HsOp1qYJ1cH/qS4a811QrxqtbZYGG6OVfqDnP/+p9SS4Z5p2yoQbLzQuecg4gWOLxdci U8CIpsk97zAY4/IdQuXd7NicmJgBMm4k5cZw5WMYG6DYSgTNR586b7d4CsfiLCaSlS58 RaIwa3u8tAK0NSp6c1CldCgLNeckxL9X+d1364nK56uukXgLt5JKHOlg4y+gmi0qqWvP dusKEYFRt/ANsCPCT8dTO4tcuQEgc/Lu17+hdF3GCYYsm9Iw6fMl3ICwXqXP/UAr/RQp 9xBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=qLifMKaV; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=QfZYx+0h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a632209000000b004126eaa6a16si994342pgi.449.2022.07.07.23.23.08; Thu, 07 Jul 2022 23:23:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=qLifMKaV; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=QfZYx+0h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237049AbiGHGOm (ORCPT + 99 others); Fri, 8 Jul 2022 02:14:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230230AbiGHGOl (ORCPT ); Fri, 8 Jul 2022 02:14:41 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 888B422517 for ; Thu, 7 Jul 2022 23:14:40 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id E5FB7320096D; Fri, 8 Jul 2022 02:14:36 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 08 Jul 2022 02:14:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t=1657260876; x=1657347276; bh=nopVA/lnqhA2exVnToP0mAgp/ wxD75eWlnpPSbCMmhw=; b=qLifMKaVVYCsUgU9yiikgoZJSNfJzHy2jb+u9aDAk 9hbbzrHTATV30Bcsy3EAcNyHGSq/YkJy/w3Rg1h3QiQPPtAZSXwRH0uLDTsT7SU2 MlCNVYE3pDR+7PFerHhcw85mKR+89fWeFbk+gwS0iRSW6Ct7ulgPbBkdUGL6AZ/t JhJkOX6zp4WEYWtYOWQkcqVbQgGcVVvw01W39mOnSvdfoF/zbHXXC9nsgzCHFuTM cxX4ASOOR7hWvfBtX6McmfdpsDGRyWWEB2qYd3sljwhtjI3P3ebEMjEjRENrMDun mQYFa/lBuwS+0v7HUSNH1U2L6n+hLrX8xhoUaRnpcNhmA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1657260876; x=1657347276; bh=nopVA/lnqhA2exVnToP0mAgp/wxD75eWlnp PSbCMmhw=; b=QfZYx+0hze5fBvUiMuj+l7/XD8s1hXCbdcXO7h0X/rMKnO2PZVS abnxnYlIm1PdbN6LsXwwNJfAWcJvYFvEq3OMAh7jsEYXmu05/rfC3SCxj4qSysi/ SMPPnNxxgZxLO2LIbG0j8MkSizxYeDlbDHjqmv2XYtMHp1jjh2vxfls3acOoNIVO /pSnhYR+uGX66623GxMxJvJE8/QSdBZ78YZ0/qZWnRUdOgwGrqhEBFJP8XQAHIhk 05WEHpIr74EzjTQFcuvoiVDgQCvyGoZlXbNDWfr7cSUGSF6j/1CuvPk4DBAiPem+ ot4mpi/Nf84vyqj8sf9eufw3zVNYJKOYnDA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudeiiedguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeekveelhfejueelleetvdejvdeffeetgeelheeujeffhefgffefkeeh hffhkeekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Jul 2022 02:14:35 -0400 (EDT) From: Samuel Holland To: Frank Wunderlich , Vinod Koul Cc: Greg Kroah-Hartman , Peter Geis , Samuel Holland , Heiko Stuebner , Kishon Vijay Abraham I , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH] phy: rockchip-inno-usb2: Ignore OTG IRQs in host mode Date: Fri, 8 Jul 2022 01:14:34 -0500 Message-Id: <20220708061434.38115-1-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When the OTG port is fixed to host mode, the driver does not request its IRQs, nor does it enable those IRQs in hardware. Similarly, the driver should ignore the OTG port IRQs when handling the shared interrupt. Otherwise, it would update the extcon based on an ID pin which may be in an undefined state, or try to queue a uninitialized work item. Fixes: 6a98df08ccd5 ("phy: rockchip-inno-usb2: Fix muxed interrupt support") Reported-by: Frank Wunderlich Signed-off-by: Samuel Holland --- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c index 6711659f727c..26b841c49ec6 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c @@ -978,7 +978,9 @@ static irqreturn_t rockchip_usb2phy_irq(int irq, void *data) switch (rport->port_id) { case USB2PHY_PORT_OTG: - ret |= rockchip_usb2phy_otg_mux_irq(irq, rport); + if (rport->mode != USB_DR_MODE_HOST && + rport->mode != USB_DR_MODE_UNKNOWN) + ret |= rockchip_usb2phy_otg_mux_irq(irq, rport); break; case USB2PHY_PORT_HOST: ret |= rockchip_usb2phy_linestate_irq(irq, rport); -- 2.35.1