Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2335248rdb; Mon, 20 Nov 2023 08:17:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+Osq5RgWYeKOhY1cjiVjLcGhL4/8uxMs5xgl9XPcm1YgSdDABRjnc1zzVytbLAsM5RRcp X-Received: by 2002:a05:6602:298b:b0:7ac:cb6b:616a with SMTP id o11-20020a056602298b00b007accb6b616amr11311568ior.8.1700497026296; Mon, 20 Nov 2023 08:17:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700497026; cv=none; d=google.com; s=arc-20160816; b=yQGAN8OTYt3DlXlRdcVvmAhCjUg2c0Qn71QHBBSashaY8+1y4mVhk8MXl/eXDCOnUs KsEqa7SrFarQAOL/qpuUKRcCxx3N8wIw1N0RClyHHcmuY190s6Nj58fPJuxwA3IdO5Ay m+Ay1HMVD4rMQF8iVADVoB2ytFIAXC5kzPKJgKzUlp6NsbZsf8cK0tZZ8rM7bN+yZLod pFaUJwUiiRk+/RVlGrwk0+clKvafDPlPWNhCZ2q3uTs9187IvS7hbhJ9Fq/865zIShJQ B2IhWglCo6CK0aRbZuid7R/sT+kYMUsHAmNx7sY9FCNDbT/kJNuoqZNIqPLuNNe10UHG 9uvQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gggzIurzExw3FOP18r5l1fwzf4oFLxkFldeW697AT+4=; fh=DosjPweW6NClkqpOhkofDlSjjyWuV2NroeWkw4lGFFA=; b=bjtDgMKPcZHvDTDWnKp//PIgQbudHCcWsOYy1gr9+AmVhS5UyJWPmVEBUSwsCYgGfQ qHDV73Eb7bhKSoZs0rcQCq5v5K/YFBuVYNAucXN6HQQ9w9CWPc7Me97wQnh4xH7wXEuM EJfAMDuUm1GcVzyQ3/tw8EmcQokHJNXxsH0mAw1qBV3Uad97qVUax5SmARXgKd8OHZU4 drDknC2+R7ht3R4IegHmlfXroA1VIiwK3HPbiGXNiaPphaEdwOOg1WwqbWE6VBq7ejdU xcUbwawYRvztMKu6/0++DSovJ1cYtoFmcU2CKxEY5mrgeT513W6pqJd5zAOeqRinSMir kBkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f+M7JHDM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id o185-20020a6341c2000000b005bdf5961e67si8603918pga.639.2023.11.20.08.16.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:17:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f+M7JHDM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 04BD6803217A; Mon, 20 Nov 2023 08:16:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233751AbjKTQQb (ORCPT + 99 others); Mon, 20 Nov 2023 11:16:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231996AbjKTQQX (ORCPT ); Mon, 20 Nov 2023 11:16:23 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC09BF4; Mon, 20 Nov 2023 08:16:19 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31264C433C7; Mon, 20 Nov 2023 16:16:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700496979; bh=0MaPFqn+cznucJKrIbyiZQIJbG+WLSHKNg43LW6FYzo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f+M7JHDMHn8ZVIT2JxDub7nG01OiwBdMwf6+zh466edwZ60K1AAqZ1ZksTXL3hxiZ MLK4KeLxSkakqe6D/mrFe48elNTGrewsWACuaJ0lazdJ+mEzQUbqbCTL+uGj3RsN3m HecodNDE8QVfthebB1KO9Gz7/wvHdqbTksKGf1+sGZgbpWngA+D2HcGpy1+3xGvCfR fHsmBoa7Sv2deofSjvPqwZZ84mF4G3MC2a2lM+OH0E5uuuXpqN9TA594gFju+HuDMV cbkqKZgIWtUeCmKK94wgRU+N8EvCNgoGfQWkLixLSSt/qvzVsOU88JpkZpz+76nVEf r94+ZqlFDwTNg== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1r56wm-0001vo-1x; Mon, 20 Nov 2023 17:16:28 +0100 From: Johan Hovold To: Greg Kroah-Hartman Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thinh Nguyen , Wesley Cheng , Krishna Kurapati PSSNV , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH 2/3] USB: dwc3: qcom: fix wakeup after probe deferral Date: Mon, 20 Nov 2023 17:16:06 +0100 Message-ID: <20231120161607.7405-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231120161607.7405-1-johan+linaro@kernel.org> References: <20231120161607.7405-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 20 Nov 2023 08:16:57 -0800 (PST) The Qualcomm glue driver is overriding the interrupt trigger types defined by firmware when requesting the wakeup interrupts during probe. This can lead to a failure to map the DP/DM wakeup interrupts after a probe deferral as the firmware defined trigger types do not match the type used for the initial mapping: irq: type mismatch, failed to map hwirq-14 for interrupt-controller@b220000! irq: type mismatch, failed to map hwirq-15 for interrupt-controller@b220000! Fix this by not overriding the firmware provided trigger types when requesting the wakeup interrupts. Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver") Cc: stable@vger.kernel.org # 4.18 Signed-off-by: Johan Hovold --- drivers/usb/dwc3/dwc3-qcom.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index 10fb481d943b..82544374110b 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -549,7 +549,7 @@ static int dwc3_qcom_setup_irq(struct platform_device *pdev) irq_set_status_flags(irq, IRQ_NOAUTOEN); ret = devm_request_threaded_irq(qcom->dev, irq, NULL, qcom_dwc3_resume_irq, - IRQF_TRIGGER_HIGH | IRQF_ONESHOT, + IRQF_ONESHOT, "qcom_dwc3 HS", qcom); if (ret) { dev_err(qcom->dev, "hs_phy_irq failed: %d\n", ret); @@ -564,7 +564,7 @@ static int dwc3_qcom_setup_irq(struct platform_device *pdev) irq_set_status_flags(irq, IRQ_NOAUTOEN); ret = devm_request_threaded_irq(qcom->dev, irq, NULL, qcom_dwc3_resume_irq, - IRQF_TRIGGER_HIGH | IRQF_ONESHOT, + IRQF_ONESHOT, "qcom_dwc3 DP_HS", qcom); if (ret) { dev_err(qcom->dev, "dp_hs_phy_irq failed: %d\n", ret); @@ -579,7 +579,7 @@ static int dwc3_qcom_setup_irq(struct platform_device *pdev) irq_set_status_flags(irq, IRQ_NOAUTOEN); ret = devm_request_threaded_irq(qcom->dev, irq, NULL, qcom_dwc3_resume_irq, - IRQF_TRIGGER_HIGH | IRQF_ONESHOT, + IRQF_ONESHOT, "qcom_dwc3 DM_HS", qcom); if (ret) { dev_err(qcom->dev, "dm_hs_phy_irq failed: %d\n", ret); @@ -594,7 +594,7 @@ static int dwc3_qcom_setup_irq(struct platform_device *pdev) irq_set_status_flags(irq, IRQ_NOAUTOEN); ret = devm_request_threaded_irq(qcom->dev, irq, NULL, qcom_dwc3_resume_irq, - IRQF_TRIGGER_HIGH | IRQF_ONESHOT, + IRQF_ONESHOT, "qcom_dwc3 SS", qcom); if (ret) { dev_err(qcom->dev, "ss_phy_irq failed: %d\n", ret); -- 2.41.0