Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3261757rwb; Mon, 15 Aug 2022 22:37:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR6YeVHCQMMCucFm4ZJ2KdP55eAaZFHgiuc7U6TbzZBS8VhK13wS6QSjHTD5UFYOUUPMnof2 X-Received: by 2002:a17:907:2719:b0:730:a688:f1e4 with SMTP id w25-20020a170907271900b00730a688f1e4mr12076640ejk.425.1660628228573; Mon, 15 Aug 2022 22:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660628228; cv=none; d=google.com; s=arc-20160816; b=jXQjQ+u3sduwpKYog2uBHPLS+if8A1GATKYszdRS+eMh94d481Tj7NkbEk/CdBaKO9 zu2w6CwhTqceyYohQosbtginqrqtrGHhMNO/YFR0JTKe02kjol84TXashse7jJY2D7zW W4och0xKYlsn1sOkt3XrkJzlhLDpkF50oFJOPHPI6C5ZOBSQiQNeCxUPjzkHY7vULfH1 T0VxnvJ4DCVsryVZS+8SEDxAObaHObqzZnVAD2g5sZMJMfmVk4wTwfcaXIdb4SHX1wQW EfveS2Lg5AVzgAU6EEpt1oHlM9lW3K2ECS2rITez9N3alsNmSePv3DAA+UsQ/ifjpnvt /t6g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1ZxfP1IRiLhKNxVXzVIXMWozKlqK662SrYgn/LHUvbg=; b=XSJNhp6lAkXGUloyZjijQ2wMubpNpamhOI+eq00wFz3gUHLlUaF4S7VQx/0zzoXk3Y jfLDiihx3dZ+Tg6HXf2Er/5HfxxD3hdGHZxtdKn8niDdToIfWHpF5+e/GN70w5yAT3r8 dhNWKcCum5Ayf/K5aieGlY55IsDKOVFJigth4K1FQITSlL45cbkbtDd68Wl7jrBAmjcn i1Gn7xZEBH53J4sTjpRoATc2SNHe3Sk+KmOSbFOhZj49pyE+s8hMtmoy9+w+/y93NSee r5kslyhm+kyljAJfS8XZWitN4YryCTM8gfM2fPZ+qzCIVzpiK4o82aE77IXh/JoCb/Ur sQeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xPLduvZR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cz5-20020a0564021ca500b0043b9d4e9399si8727179edb.138.2022.08.15.22.36.43; Mon, 15 Aug 2022 22:37:08 -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=@linuxfoundation.org header.s=korg header.b=xPLduvZR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231539AbiHPEn0 (ORCPT + 99 others); Tue, 16 Aug 2022 00:43:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231939AbiHPEkj (ORCPT ); Tue, 16 Aug 2022 00:40:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C919D1E1D; Mon, 15 Aug 2022 13:33:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C71E3B81197; Mon, 15 Aug 2022 20:33:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A111C433C1; Mon, 15 Aug 2022 20:33:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595599; bh=jmK2cpuZJgzfFUBDT4X/tT4K1ZIqlymHVLMD9MRYZTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xPLduvZRcHWT/K5p2Ba0G+tCWHtl42P3GuxpxBvjBczvDEVf5bBu1xAdlGmfpLzIG h6NFC6WQDJGPnIcLByFCbZ0x5po5XUwXCq1Dn5uURD940HtpjfYkXOfsp3xpFh9s8q eVit9G+y33DwZ3lefCEujZU2lQtJAzrjERhXyCfA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Frank Wunderlich , Samuel Holland , Peter Geis , Vinod Koul , Sasha Levin Subject: [PATCH 5.19 0815/1157] phy: rockchip-inno-usb2: Ignore OTG IRQs in host mode Date: Mon, 15 Aug 2022 20:02:51 +0200 Message-Id: <20220815180512.092521896@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 From: Samuel Holland [ Upstream commit fd7d47484125c7d04578de9294faa7fec6e5df0a ] 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 Tested-by: Peter Geis Tested-by: Frank Wunderlich Link: https://lore.kernel.org/r/20220708061434.38115-1-samuel@sholland.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- 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 6e44069617df..5223d4c9afdf 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