Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3088387rwb; Mon, 15 Aug 2022 17:50:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR6x4pVlBT++RgXnJNpxRxnwgA1KjbLFn9+sxU+ldyK/Q7cS+1rhJ2ujvoWnGrQFexHYs9Gl X-Received: by 2002:a17:90b:3881:b0:1f5:81e:8ceb with SMTP id mu1-20020a17090b388100b001f5081e8cebmr29355877pjb.207.1660611043512; Mon, 15 Aug 2022 17:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611043; cv=none; d=google.com; s=arc-20160816; b=LGUTE+/JS9DUDRJkP2E9Wv72mu8U8e5tUb/2VSzl93JgC3mZ8ag1Ut7wGp51r2nWiC BDFm4Nco6AYu7W19GjQWuPX8kwJ4dg70GLSHus/ny5PpW7ztu1LIItWvy0GBrMW9lHSF DfjvQozYdNWh00R1O5c8lPLskqrLXDzHfx7kSgrsT8eg/FCkwcAQHL5CuBIknDq8lljW cPBqhoOaWL/wWfx0T3ny7ig6GFkajfil8lziWwzBD7hr4Ngf/+crEeOJPs6/ypkdOnAk SlgWO4R1Jk4ghHqSNjpg4k/RlFtuKPm/3jp6oZ14+beFMxwPIc9qV1aB4PecjUEghqQT ++XQ== 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=0NRDTy/ucL1mol9iF9GBWvoCWf2xz93lr3JsWJJ7tqU=; b=i10SSKqhsNR0p6y6HbgJhHMAHZ3j6SOMIBmEZRJhzsLQlORal8pOshyjj2jvQ5/ebE zMErP30+l0PgGx2rRrQcvH3LutKw3SMEB7o8BxPfPsU8Gq/INQZ00zOKoa5spf63rqZ5 G7RkOyvCOgW4nh/98ezjYhwh/qUeDm8aWJZ8pmajbrYTKtlJtKdVSouyDlNswGvmVSIq wpIGuoN0NcZqUeQZxNZa+rooqYsSKSNrhTKHQ/aYFe0gj+KdtPdl99yRcNs8X5Vo7BDF leGm9sPIYp1TRfua/SFmjxcJLv/cB3Cyco4u0G+0LV/RHjFpYCKmO5L1Pw958bY69H3w 6c9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AyVm09Q5; 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 z11-20020a170902cccb00b0016d2c4d1d1esi11976723ple.218.2022.08.15.17.50.31; Mon, 15 Aug 2022 17:50:43 -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=AyVm09Q5; 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 S1344839AbiHOWPA (ORCPT + 99 others); Mon, 15 Aug 2022 18:15:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350489AbiHOWMT (ORCPT ); Mon, 15 Aug 2022 18:12:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF37A11C961; Mon, 15 Aug 2022 12:39:16 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 6BFBC60BC2; Mon, 15 Aug 2022 19:39:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FE99C433D6; Mon, 15 Aug 2022 19:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592353; bh=BIuSVG4tSIEfGPXbEkEZKeip4h+jB7rKwCTaHB/ldEw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AyVm09Q5For9SJl8BG/85QiRlDfjlF2VzducnjyhzHPhu/GxoKSvl5umzpAMcnxag Gt7Lzr8rHK486zqnQBCe4zFRKDQw0qIjpptK0gTEs9H2Gr2oS3vnRA63fmrkhS+LSi WYc1oGyATIWtXDEXhM/+SLEqkaNPAZc8L5cCVUf4= 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.18 0761/1095] phy: rockchip-inno-usb2: Ignore OTG IRQs in host mode Date: Mon, 15 Aug 2022 20:02:40 +0200 Message-Id: <20220815180500.756948274@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 cba5c32cbaee..0c6548ac9d8a 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c @@ -942,7 +942,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