Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp311255pxu; Fri, 23 Oct 2020 01:02:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtA6Vrz+1JoA40ADoOza6Rta2kun0UeVnrhkUU7Gs+tdnWwNAqI0X7AoidZulXR9jV18vl X-Received: by 2002:a50:f316:: with SMTP id p22mr1033450edm.201.1603440137875; Fri, 23 Oct 2020 01:02:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603440137; cv=none; d=google.com; s=arc-20160816; b=T6hJHo68cDo0RfWfbSDpZKZEALDyc8F4TFxeLrwbppFPgFZDqwHjgViHrgU6F9paUD GjdkcwVAKSd218YA1sWka84yclHOU01v4AG/Cf0Ul3r3tar61JjMXq7V5KdQ80exBOVi Qv7KrUiaDkCbtAkKTYBpYfsWAKdTRpclSGQOwtcWf3OnmQq2CLEPqW9w6vgDn1od7O2F YXKSYRhQDFLSJKzMQnitJmrIYIA6JQOC2Tmb/lPTOcq/ATe/F5dfqhxV+30DHUEJulK1 11Zaa9KZA686/OhDdkL0Fp24kyRwVR2GwkpAZw8kLr7+11ooPSh5b37vH8ZLVcXYUQFt 43WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=dq2fjLQ5brf2jYsKHtQAvxj5QdzpCQVFngPp7l8F9So=; b=RVnZS0jfOvPQJ1biYMP//2FtRSUvagSkO/2Xi2COhvN1LL+Z/d9QuCmXv43L/HJPsd QzYCDkPZGrPX2rzX2hlMv82woNHXJS8pjmyCWKd5CVhtpPfQK3PD11u+dyhO3+Y0tdR8 FseoiZ9az8dFzijJ0J3TrL7GjkRRG9mv4iCfAmZX0A251XTVotkNWG6hqoPI+rt4FeSu pTSEryNwiv46qPirP+SkFtW5dOX77TyExlVJFoXrZxZsxTu15umrQx174iQBeNqzw2wn mqaUtDelG48NUpUMlVYFcyU4I6K5/6DfYnVs845DkTpz+8x+whHbN8zTnrWnGHv70EI4 Xe/g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w15si294471eds.448.2020.10.23.01.01.55; Fri, 23 Oct 2020 01:02:17 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S369618AbgJWG1Q (ORCPT + 99 others); Fri, 23 Oct 2020 02:27:16 -0400 Received: from mga14.intel.com ([192.55.52.115]:50330 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2898454AbgJWG1Q (ORCPT ); Fri, 23 Oct 2020 02:27:16 -0400 IronPort-SDR: l71xQqnb88U4fJATYdTLndqUZiyK0cHBRPlGLAHrU71l5MWoEBfhokI7m1GtcSavJuU8ZhtXSP Bsraln7AVyHA== X-IronPort-AV: E=McAfee;i="6000,8403,9782"; a="166850854" X-IronPort-AV: E=Sophos;i="5.77,407,1596524400"; d="scan'208";a="166850854" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2020 23:27:09 -0700 IronPort-SDR: iEcDPwK14VKvyoX2Rqv4SPxJGglj4BDc4Q2l0Up16jowqUgvMpSPWSPUP8/Cwh/H0VJW4C+H4K +/vuScI1dfEA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,407,1596524400"; d="scan'208";a="466961410" Received: from mylly.fi.intel.com (HELO [10.237.72.73]) ([10.237.72.73]) by orsmga004.jf.intel.com with ESMTP; 22 Oct 2020 23:27:08 -0700 Subject: Re: [PATCH v3] i2c: designware: call i2c_dw_read_clear_intrbits_slave() once To: Michael Wu , Andy Shevchenko , Mika Westerberg , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Morgan Chang References: <20201023054027.13540-1-michael.wu@vatics.com> From: Jarkko Nikula Message-ID: Date: Fri, 23 Oct 2020 09:27:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201023054027.13540-1-michael.wu@vatics.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/23/20 8:40 AM, Michael Wu wrote: > If some bits were cleared by i2c_dw_read_clear_intrbits_slave() in > i2c_dw_isr_slave() and not handled immediately, those cleared bits would > not be shown again by later i2c_dw_read_clear_intrbits_slave(). They > therefore were forgotten to be handled. > > i2c_dw_read_clear_intrbits_slave() should be called once in an ISR and take > its returned state for all later handlings. > > Signed-off-by: Michael Wu > --- > > Change in v3: > - revert deleted braces of 'else' branch in v2 > > Change in v2: > - revert moving I2C_SLAVE_WRITE_REQUESTED reporting in v1 > > drivers/i2c/busses/i2c-designware-slave.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > Acked-by: Jarkko Nikula