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: 235573 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp452531ilg; Wed, 15 Jul 2020 02:32:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyErvvl7trXht0RvHjJcU5r1W59ruwxk5047T3IH3xrJxJ1yzB1+zt7MnICymswoBlTjtme X-Received: by 2002:aa7:c655:: with SMTP id z21mr8695094edr.330.1594805538208; Wed, 15 Jul 2020 02:32:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594805538; cv=none; d=google.com; s=arc-20160816; b=FZrWykaMlnWzS834NNfkRuRGsw69xcPwv/1n9GecsOqfbMVG3D7KE3gg26F+ODuGTH RaoUxmIysX0m20WRUxrEl4HhO4+r5mBzjje12JRhnsTHp2x7l13JhAjnOQdtIjMXYSnH 1JdgCYpK9Qc3wxw0Po/DtBYbomEwGZBoh4ABX2rSH5TT/rdDlpHBBzK+vTMSgiQVYhDC QS0gljUytL1a1sUanMmxOb0WNEBEckf7louyKWHarZeVQWgovtFIN2ZMe2ZUCFVJ8scW iU9ka9DzVRcMMBkYUBt5hMegKxd73nbI55cxhiN/hts21yzAqeji/+uSRH95TfzbV/8c 6m/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+Z3KCPJPJ9xqOxMrVh/E1QUCCirSlEPo9eFXpxRTSLE=; b=Mwd9mq/2vXDo6lVZ60FGcsP7rGS4dVAjOb62cam1aNPmh142qjBKomNeux6T71kT0P 2xTXSCfBhFViHaT2BVmbPGoBkB7f5EL0xNGmRNTY/YGwldXZowM+yzlKiQky/aTTmYJy 5rh3tB2kkr4t4jbVIS0p7ThWOZHW+zMaBZUxmRbgH2QOwbli9e6pcyZxyR7TlLcLkoQp mXMlVes5R0qdkBG76a5Eu34HIRGNfuSK7lwEgxX/BAgZM/685SsF4uV9CFbsrUphdp+L OM10KgstHy8is4KsSGkHvqG4HfXV+pWwUB4ySU0NXJPwL9tbW0/piRA+LHfJk3KkZ6JY ppzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j1hC6fbF; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n7si926787edo.512.2020.07.15.02.32.18; Wed, 15 Jul 2020 02:32:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j1hC6fbF; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730770AbgGOJcR (ORCPT + 5 others); Wed, 15 Jul 2020 05:32:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730761AbgGOJcQ (ORCPT ); Wed, 15 Jul 2020 05:32:16 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BE52C08C5DD for ; Wed, 15 Jul 2020 02:32:15 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id c80so4687354wme.0 for ; Wed, 15 Jul 2020 02:32:15 -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=ua4EVDg3fOcBBVMAU5xOHeyGyJF1O9hjHzbp2tru6aY64n8iu9khT5Rf3FlUlWo43q k5ojNtCvg2RkRVjNh9iC4q9h5kAmt/9/ZCCj1GxavNmoWECkUrnL5/zP5f19lqGZiB7y cXHdQT3ymKtzuGhv5Hsqr+fShaV1XDsLKOBCFqSnpMzztf7EO7xObTuZMUG1HDKVnNpd GHyrulTqxjSEyKFPbi+s1ydE8sDKkjpi4SSMMSvniYtLbF9txLQEM3pzzGquQ+9SHyWZ C5zVoWNkw3UNqLwsou/CjbD3QwEs5+F1m2yuuz27BpTdYyNwpq79peqW5PH6/iCW3dT8 nrgA== X-Gm-Message-State: AOAM533LMPdzUx3Bv52pz9RBdCzflLPBR0wDwX2ou2eGJvibKh0UNcqB jbXCfxLaA2J5VjP5dDqSuV/YiA== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Lee Jones , Minas Harutyunyan , Ben Dooks 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 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.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 --- Changelog: v2: Re-written to *use* instad of *remove* gintmsk2 drivers/usb/dwc2/gadget.c | 1 + 1 file changed, 1 insertion(+) -- 2.25.1 Acked-by: Minas Harutyunyan 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__);