Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp735436pxu; Fri, 23 Oct 2020 11:58:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKACSJuEGJsqHO/SJclBNoxH3i0RUdccPXOXWlww7R2Vtn4nuMosRVyW2SVNJXFblrzref X-Received: by 2002:a05:6402:31af:: with SMTP id dj15mr3513363edb.275.1603479523911; Fri, 23 Oct 2020 11:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603479523; cv=none; d=google.com; s=arc-20160816; b=j2bwWXMP6fAPycHnA2hSvxUnDjITTrK8h1Jhvaxyf0waj1Xii8aJ7xXBo/JK09u9yj OP2gRhxC3H6D7KNRn97dOuwlk3Ie9E6yMpH5Th/w+izsLvwDMwm2Oi+Z4lHNwWzLkT22 KKO3VipW0MMUgarmj6uXT7CEYdRiHi9TVqVOOcUakQbQxN9zqwlZJcJ4sV8oakruvwA3 Xz+X2cVRmneALr3gjwkH2SIo/zG91umT8+AkWO+yDyA78L46WrXPc5ExXWSUR1db1sIE wcZ5LENv7t1iGV/0topN2ln47UZTbfdSfVW+vci2zlDo2pso83SR25bbUSaoUpZiiJpv S+Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=8o/kqPvWg8qN380rg9QJGAAYmTN0aOeMABr8x6wTpS4=; b=Cg1lfFYijNQUXohIPc9ec4nDFXTiBwcDotwfAjddxqA4fqlPggA/bTw5AFJOuB5AYO 3owPyP45L5VQ7GjsmhE7FthB5K64K1DrBtOkhq7CBvRz8EJVvlgztrPzjIM+xwIXh9MR MVP3Kw5CMOXlS11Wcgi8UYhxKpi+sEAw+KhRvUyKQKT1cDWiz+lD81AV8beJpFBEA17Y te/8Kw9kOVG7jfhtCn692CbcN2Vd8JdC4u7jp8sGiqDs5dAU31mtFSXh2sIiPDICHBJL eVCBGt+FszFqdN0eLIfVYT9LvMhsmPQ/+Heohfj477su2YzPLmwz9QqupeYpctz8Bd+C FhfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=gHgrYgg2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq2si1435183edb.529.2020.10.23.11.58.21; Fri, 23 Oct 2020 11:58:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@broadcom.com header.s=google header.b=gHgrYgg2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753278AbgJWRSb (ORCPT + 99 others); Fri, 23 Oct 2020 13:18:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S465753AbgJWRSb (ORCPT ); Fri, 23 Oct 2020 13:18:31 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EAB3C0613CE for ; Fri, 23 Oct 2020 10:18:31 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id t14so1769542pgg.1 for ; Fri, 23 Oct 2020 10:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=8o/kqPvWg8qN380rg9QJGAAYmTN0aOeMABr8x6wTpS4=; b=gHgrYgg2Csq4UwrqjNp8tB7P228UhzBzbOu/mCk/lPEls1Iso/voHrinGSKSqB629G qVm/pYp9yL8MgH6FAJjZRSxBFdF9JYTtH7+XFhT0Iz0w9jXtMHOjwMwS3uGMlSmLzMni uiWF/7L7QbZLfS/VYkYbUD0f405jCCIVPNN8k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=8o/kqPvWg8qN380rg9QJGAAYmTN0aOeMABr8x6wTpS4=; b=BSPFYdqHzpb0qLLujZZnBlwzqYIoXT7MFbkXBQNno3fKWATwDx9RvaBz97pAtk6AFQ tTl3MdAdOa/1xjKBLQ7H3pPp4ZavE37U9nKE2JOSZTgYcoNpki/eiP//f9z2HzWQgv3V MgnzRJDzl3nkkJ4dg6W/7XrPqLyqTeZvtKX9ICTQj3huK8udKdrb0sNAFS/vzhrwFsMs kuRmGzupDWjRjeg5Kz9G5UvlVeKaBZ3J4GFmvmTwsyLgRaqRaq7btJD5EfEH4tYhPjyV r7+tRuOdcXqyPzX6TY+EFvzXSGmWkolDkm0KFcX9sALflp5cDdWolbvu7txhhFUEWHyc Kedw== X-Gm-Message-State: AOAM530tDB8F05I8OkpEJqXo8tXSNBmfLXHcpcQnL4Z5X7/eNKyZYZfb aCYxq89OFKE7ZEvxd7ey6JXauJAxIDXHUWbA+vDwdpISgEDeCR+UfuqtiER8DagUYWHI4iD9DDz dlTGznCaN/QPF8uISGN82FAh4OLWbfod+TJzmOw0KjEM0d651RdLBrBWLEmtwLM6PRzF/74wOAJ VdODU= X-Received: by 2002:a62:ed11:0:b029:155:4bd9:6ade with SMTP id u17-20020a62ed110000b02901554bd96ademr232842pfh.6.1603473510403; Fri, 23 Oct 2020 10:18:30 -0700 (PDT) Received: from [10.230.182.181] ([192.19.224.250]) by smtp.gmail.com with ESMTPSA id j23sm2478591pgm.76.2020.10.23.10.18.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Oct 2020 10:18:29 -0700 (PDT) Subject: Re: [PATCH v1 2/6] i2c: iproc: handle only slave interrupts which are enabled To: Rayagonda Kokatanur , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Wolfram Sang , Florian Fainelli , Brendan Higgins , Andy Shevchenko , Lori Hikichi , Dhananjay Phadke , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20201011182254.17776-1-rayagonda.kokatanur@broadcom.com> <20201011182254.17776-3-rayagonda.kokatanur@broadcom.com> From: Ray Jui Message-ID: Date: Fri, 23 Oct 2020 10:18:23 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20201011182254.17776-3-rayagonda.kokatanur@broadcom.com> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000000857fd05b259c557" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0000000000000857fd05b259c557 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 10/11/2020 11:22 AM, Rayagonda Kokatanur wrote: > Handle only slave interrupts which are enabled. > > The IS_OFFSET register contains the interrupt status bits which will be > set regardless of the enabling of the corresponding interrupt condition. > One must therefore look at both IS_OFFSET and IE_OFFSET to determine > whether an interrupt condition is set and enabled. > > Fixes: c245d94ed106 ("i2c: iproc: Add multi byte read-write support for slave mode") > Signed-off-by: Rayagonda Kokatanur > --- > drivers/i2c/busses/i2c-bcm-iproc.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c > index 834a98caeada..b54f5130d246 100644 > --- a/drivers/i2c/busses/i2c-bcm-iproc.c > +++ b/drivers/i2c/busses/i2c-bcm-iproc.c > @@ -507,12 +507,17 @@ static void bcm_iproc_i2c_process_m_event(struct bcm_iproc_i2c_dev *iproc_i2c, > static irqreturn_t bcm_iproc_i2c_isr(int irq, void *data) > { > struct bcm_iproc_i2c_dev *iproc_i2c = data; > - u32 status = iproc_i2c_rd_reg(iproc_i2c, IS_OFFSET); > + u32 slave_status; > + u32 status; > bool ret; > - u32 sl_status = status & ISR_MASK_SLAVE; > > - if (sl_status) { > - ret = bcm_iproc_i2c_slave_isr(iproc_i2c, sl_status); > + status = iproc_i2c_rd_reg(iproc_i2c, IS_OFFSET); > + /* process only slave interrupt which are enabled */ > + slave_status = status & iproc_i2c_rd_reg(iproc_i2c, IE_OFFSET) & > + ISR_MASK_SLAVE; > + > + if (slave_status) { > + ret = bcm_iproc_i2c_slave_isr(iproc_i2c, slave_status); > if (ret) > return IRQ_HANDLED; > else > Acked-by: Ray Jui --0000000000000857fd05b259c557 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQMwYJKoZIhvcNAQcCoIIQJDCCECACAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg2IMIIE6DCCA9CgAwIBAgIOSBtqCRO9gCTKXSLwFPMwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UE CxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMT Ckdsb2JhbFNpZ24wHhcNMTYwNjE1MDAwMDAwWhcNMjQwNjE1MDAwMDAwWjBdMQswCQYDVQQGEwJC RTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEzMDEGA1UEAxMqR2xvYmFsU2lnbiBQZXJzb25h bFNpZ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