From patchwork Fri Aug 27 13:11:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 503401 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp1254203jab; Fri, 27 Aug 2021 06:12:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyo3PvAAXwCBfthO3RZ05P8DCF7M0pgnkMagAo9Sefg5jnF2IS/0lvR/dmd0l+S3dzZLH/7 X-Received: by 2002:a05:6638:d1:: with SMTP id w17mr4547575jao.33.1630069939379; Fri, 27 Aug 2021 06:12:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630069939; cv=none; d=google.com; s=arc-20160816; b=HS0OBjWYH7gYiFfTinqwffeyxgMIibZvM1s4fclDu7SeFnRcvJUIRP311du3uQmSqp HQ7towZIhjmP8OSaWcMSDx5h/AcjXfAmc69p0b5un0mJL5JNZUwu+dmKCpve44NcHn5f t8+sO8lsOvCG4X5gYwm9qFlErGpnG81tfQiQTnjdsjEoKKfUexcK6ZoF8TuXKBjppHlv 5TkgAzs4jgitUDcq3wfEIvk2SXJyQ8aEMCgNEiVxg/3Do2GALgeTWFqk0Bw4GtMYOs6R QFs1PCWPw6qvL0MmfBPHnGw9AVN1wQI80S/9ltnxNfYhVEn2qq43DoDHBQYSNv12oQLA jybA== 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=JhkbsWN6yF+zzjQkKyGIO7BRErUtHsxjPq+kPs7GZWc=; b=ZTWzXI1VJ4mkVeKd5nWoPsOmD+rUUfF8Ed3X+lhy1+AgGxyDUGuQwT28mLKo90CPJS 2PagHczZ2GYpXSnIX8WyKzKagZdoPblvjQSdRtW9aSmNNdEEunjyCRxpXW+Ktu8U8OMK rUU9pGgPSFBkQ6LaR6yND0Fi4JvDuCjQVTBbRbJy+yFwbbWh3uRgay2MBsoDWYWRVsHe gsI3uZ7o0FmRxc/ojeAtA/h3HjLfm7E13K6RLBueJt1PiZTLAeofW9WzZbuOozszLYhK XCAalje8TgOdD4S6EehptF48XXXYvFZ6O6xrTKlR+Io2wAq4sgVt0LLE3xeUS03px0Kt yd3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jh73rVA7; 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 v66si8124989iof.105.2021.08.27.06.12.19; Fri, 27 Aug 2021 06:12:19 -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=Jh73rVA7; 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 S245191AbhH0NNH (ORCPT + 4 others); Fri, 27 Aug 2021 09:13:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245185AbhH0NNG (ORCPT ); Fri, 27 Aug 2021 09:13:06 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81B20C061757 for ; Fri, 27 Aug 2021 06:12:17 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id z4so10335216wrr.6 for ; Fri, 27 Aug 2021 06:12:17 -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=JhkbsWN6yF+zzjQkKyGIO7BRErUtHsxjPq+kPs7GZWc=; b=Jh73rVA7zjjGYpLd3WOSV802Ynj4ee73Uo9HOq5s/r766nuO+ctX9wPghw2TvGsCQY fFUUZrojPXQrl1usTmLNx7BNF+hv1OpVubPRpHtuSxMDB4dYDTUcPoNVVsxUo1ryJshT 7IIaSmFLckx9ZvPObWoE3S7CAlXs+muU5d9khtLIrio3ONY1O8PudtKIeKsY9aDnMRsO B2gICeIzSj6x+YoQRY73WOva1KR4gv8InNIl9jU8F3EF1bxamAY4FQ5VsAbVpr3gXYNX yANCQtXV+IKPDRWICDbt2PD6iV8zWTi4UC4KYxwJLDuNV8/vfXguMsbQdhBf0zjdM++5 xN5Q== 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=JhkbsWN6yF+zzjQkKyGIO7BRErUtHsxjPq+kPs7GZWc=; b=BkVuPNprjgJkmlIMAHS7d9bm8nkvrxziuqSD5apTKZajFkRwT9ReaSjTULRH3fCXCV aSmqaoXIYTfAdGAycXQ06FdYjYss3vmriLOKo/4kxbpC8GI4VBUrESqPrbpLfqM0d+ot mdJYDEbwcQ6Zsc68+nuNp/ZvJjmTPCcKvK2EDUJSqX9P0QA6CP9kZL6j/Nvmwb0t1MMd u/kPKUv2lHhZ5edZ8BNNbPAgI9ePcv1yMWLYrB+HPgd0qTbZEo3mOMQFHzBOlgFjme67 FWNX47mys/nHhPPiA2tSZK7BJr7rhhgMwjg7yLqbskUfJsJ/babtpPmBl5pXM9ffPSQD 5pJA== X-Gm-Message-State: AOAM533xNhaA4nfOMGX7uZvFME5BrvNoIWPU/Lqp6IMHIaSMKKRGkL05 Sk3ueUxvBng4Z3h96vH4QwBQv7J5CWTTsw== X-Received: by 2002:a5d:4c50:: with SMTP id n16mr10089098wrt.265.1630069936141; Fri, 27 Aug 2021 06:12:16 -0700 (PDT) Received: from arch-thunder.local (a109-49-46-234.cpe.netcabo.pt. [109.49.46.234]) by smtp.gmail.com with ESMTPSA id c7sm5279349wmq.13.2021.08.27.06.12.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Aug 2021 06:12:15 -0700 (PDT) From: Rui Miguel Silva To: Greg Kroah-Hartman , Dietmar Eggemann Cc: linux-usb@vger.kernel.org, Rui Miguel Silva Subject: [PATCH v2 4/5] usb: isp1760: use the right irq status bit Date: Fri, 27 Aug 2021 14:11:53 +0100 Message-Id: <20210827131154.4151862-5-rui.silva@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210827131154.4151862-1-rui.silva@linaro.org> References: <20210827131154.4151862-1-rui.silva@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Instead of using the fields enum values to check interrupts trigged, use the correct bit values. Reported-by: Dietmar Eggemann Signed-off-by: Rui Miguel Silva Tested-by: Dietmar Eggemann --- drivers/usb/isp1760/isp1760-udc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.33.0 diff --git a/drivers/usb/isp1760/isp1760-udc.c b/drivers/usb/isp1760/isp1760-udc.c index a78da59d6417..5cafd23345ca 100644 --- a/drivers/usb/isp1760/isp1760-udc.c +++ b/drivers/usb/isp1760/isp1760-udc.c @@ -1363,7 +1363,7 @@ static irqreturn_t isp1760_udc_irq(int irq, void *dev) status = isp1760_udc_irq_get_status(udc); - if (status & DC_IEVBUS) { + if (status & ISP176x_DC_IEVBUS) { dev_dbg(udc->isp->dev, "%s(VBUS)\n", __func__); /* The VBUS interrupt is only triggered when VBUS appears. */ spin_lock(&udc->lock); @@ -1371,7 +1371,7 @@ static irqreturn_t isp1760_udc_irq(int irq, void *dev) spin_unlock(&udc->lock); } - if (status & DC_IEBRST) { + if (status & ISP176x_DC_IEBRST) { dev_dbg(udc->isp->dev, "%s(BRST)\n", __func__); isp1760_udc_reset(udc); @@ -1391,18 +1391,18 @@ static irqreturn_t isp1760_udc_irq(int irq, void *dev) } } - if (status & DC_IEP0SETUP) { + if (status & ISP176x_DC_IEP0SETUP) { dev_dbg(udc->isp->dev, "%s(EP0SETUP)\n", __func__); isp1760_ep0_setup(udc); } - if (status & DC_IERESM) { + if (status & ISP176x_DC_IERESM) { dev_dbg(udc->isp->dev, "%s(RESM)\n", __func__); isp1760_udc_resume(udc); } - if (status & DC_IESUSP) { + if (status & ISP176x_DC_IESUSP) { dev_dbg(udc->isp->dev, "%s(SUSP)\n", __func__); spin_lock(&udc->lock); @@ -1413,7 +1413,7 @@ static irqreturn_t isp1760_udc_irq(int irq, void *dev) spin_unlock(&udc->lock); } - if (status & DC_IEHS_STA) { + if (status & ISP176x_DC_IEHS_STA) { dev_dbg(udc->isp->dev, "%s(HS_STA)\n", __func__); udc->gadget.speed = USB_SPEED_HIGH; }