From patchwork Wed Jul 15 09:32:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11664609 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5949613B4 for ; Wed, 15 Jul 2020 09:34:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3337E206E9 for ; Wed, 15 Jul 2020 09:34:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GPJ6gbtw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="j1hC6fbF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3337E206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3lJ3AWIL4eQj4sRv2tl/nK69EqF3OoO+7ZT1hF8Tf7s=; b=GPJ6gbtwUFA+dN1Tj8yOKSBJN EMBsVlYYkFIg5w8ESoOfEwjXMoJnzVW+99UmPfRUjFEON5SqczR4Pt3GJE4TdDiDB8Sso78+FDpB2 Yo6bKR7QIQMjKp2xgCQdw57khcA4ixCMgUHUmlu2TofgAyfFIdV2shC/Ib8siSE1Yzs149AxGozSJ qAFa3Dbk8xutXCSt8AIeJyyZvGVazx+fG2Y/8qBgKW7vPDz2LwITpqVoj3vDFK9YNNdDMwOvnrS9j rE+fxxrH5R69zb1CX0q2C+mYeXjcK7hFkVb8rt7dKL0TQ2uNDIM15VE1Fqg8I20nPuCf1bp0kBt4p 0/7UkZ8bQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvdm4-0003OI-1v; Wed, 15 Jul 2020 09:32:24 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvdlu-0003KK-Vs for linux-arm-kernel@lists.infradead.org; Wed, 15 Jul 2020 09:32:15 +0000 Received: by mail-wm1-x341.google.com with SMTP id 22so4679481wmg.1 for ; Wed, 15 Jul 2020 02:32:14 -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 :mime-version:content-transfer-encoding; bh=+Z3KCPJPJ9xqOxMrVh/E1QUCCirSlEPo9eFXpxRTSLE=; b=j1hC6fbFvEKSfKk3vGCWwkBbfplkz5E48kA4VMiG9AJs8jLE2MQYYlqUG4PUexzeWZ JaAxqVumQic3OZhO1DNUlAwOkwiHCXh5UE3M2Z+S87THP6F5wND7f9Ee0wmUgmoEegsZ LVnSYFgKt+rh9f+IXR2jnsPTcDcBsap1QoK8duiDrdW8QG78i3ll5N03D/juvat4fj7k X1b6UEJ/f13U3vfWT5XhHJr0ty7jwnu35Q6LggfCBPBNOw8noBWj6GmoDQ/nQyU7nP+D XmMKy432/ChdZt0+jP09xTU+QNTA3a3+aRuWXDbxAe9tU8D26pQELScIlU5dAIpuwSar zzkw== 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:mime-version:content-transfer-encoding; bh=+Z3KCPJPJ9xqOxMrVh/E1QUCCirSlEPo9eFXpxRTSLE=; b=YJTZiVTeuC2e3caAjmaJMr9qdXA6pQjFRXF/eRTqymu0Bo4xnRUxbYo+KADnLVA3hr goCWLu66RJ6McQQWud+a649ozUn9m73z9a3wnYNhTm3QYcq+0iTILKnFuhOOLO4RgBnZ M6/DJtjW7AM1MbeRJ4Tv+ncGfpqcX3tKs4Dvfbj+GOcbakxL/CyHfdCiG8dpUEC1tcP+ BPjp6MgywLAS3wqmiMf7tR1rMY3g7RaKwqoHD+YjpVNbCjhDyMr0gU0xqmZ27Q/XWkd5 JGL38ljrFoQk7HlCtZgQo7ZvYbAXv8bb05Ctuq7wijGDndQOg5SVQ0jnMRspcnYB2+2r zjuA== X-Gm-Message-State: AOAM533FGAtwr2leQuciHva6O9DIjRBS/2hlSwUe+XPnSMgyQ4gVSkyX MjN6U2ri5yHh6ZpDJUoNG91pMX3/oPw= X-Google-Smtp-Source: ABdhPJz2F7AQdDuodvs3Nhzm9b78oR7eczk/gzHg9MMwyTt6vuYsGoFv1+7G/mzU5URIZ5Ey8K5mdg== X-Received: by 2002:a1c:e0c4:: with SMTP id x187mr7495953wmg.153.1594805534090; Wed, 15 Jul 2020 02:32:14 -0700 (PDT) Received: from localhost.localdomain ([2.31.163.61]) by smtp.gmail.com with ESMTPSA id s203sm2686991wms.32.2020.07.15.02.32.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 02:32:13 -0700 (PDT) From: Lee Jones To: gregkh@linuxfoundation.org Subject: [PATCH v2 1/8] usb: dwc2: gadget: Make use of GINTMSK2 Date: Wed, 15 Jul 2020 10:32:02 +0100 Message-Id: <20200715093209.3165641-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200715093209.3165641-1-lee.jones@linaro.org> References: <20200715093209.3165641-1-lee.jones@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200715_053215_097620_D2F6C078 X-CRM114-Status: GOOD ( 12.44 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:341 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Ben Dooks , Minas Harutyunyan , Lee Jones , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The value obtained from GINTSTS2 should be masked with the GINTMSK2 value. Looks like this has been broken since dwc2_gadget_wkup_alert_handler() was added back in 2018. Also fixes the following W=1 warning: drivers/usb/dwc2/gadget.c: In function ‘dwc2_gadget_wkup_alert_handler’: drivers/usb/dwc2/gadget.c:259:6: warning: variable ‘gintmsk2’ set but not used [-Wunused-but-set-variable] 259 | u32 gintmsk2; | ^~~~~~~~ Cc: Minas Harutyunyan Cc: Ben Dooks Fixes: 187c5298a1229 ("usb: dwc2: gadget: Add handler for WkupAlert interrupt") Signed-off-by: Lee Jones Acked-by: Minas Harutyunyan --- Changelog: v2: Re-written to *use* instad of *remove* gintmsk2 drivers/usb/dwc2/gadget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index df5fedaca60a0..03cf1fa856219 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -260,6 +260,7 @@ static void dwc2_gadget_wkup_alert_handler(struct dwc2_hsotg *hsotg) gintsts2 = dwc2_readl(hsotg, GINTSTS2); gintmsk2 = dwc2_readl(hsotg, GINTMSK2); + gintsts2 &= gintmsk2; if (gintsts2 & GINTSTS2_WKUP_ALERT_INT) { dev_dbg(hsotg->dev, "%s: Wkup_Alert_Int\n", __func__);