Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4633237imm; Tue, 11 Sep 2018 15:19:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaMkFxZZjxi5funn3Uj3m0WuhYxytyJXNTkHfLisz0J1Ckofo+iHFCGNg+ziYAbjs6OB8ny X-Received: by 2002:aa7:86cb:: with SMTP id h11-v6mr31512428pfo.58.1536704346781; Tue, 11 Sep 2018 15:19:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536704346; cv=none; d=google.com; s=arc-20160816; b=cUxX0L3weWcWcFHBaODhJLnU2frgCm9pXqUMKoR9ITMpvof/idiG+XgCTREa27IZkq 6Wt8sFQXVyW4Wlqq1lVnMYYnjFXRvkFVpw+6rHyyETIe9Z8COLityAvO6eQiH0U0n8mp sZKPDRVW694OWoz2q3XaElEAh6R8RPE7Zu/SNzfu3f9dW2sq701ofAgVMGyAvYkKo7A2 Bs/+bOoEwYU1g9xCp35DuVPu7s6nOQX7I+/YImkFWGI+9RgvLpJF9QkSg8VJPhhCiNEZ uGeJx022RmlSGYzvre3sNXcKcdGQ3NotFWqvM+2bc0WOyca0AiAFeV6b7LiS+nOfl6dP 7hWQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=HScosUld4NaQr7nTc8/QbFUsVJOP8fZaLgQYCjhzY3E=; b=pqjD7u3ojw7WIBS/a/HpjjxgInp7OIZAoK6yVn4oVAhQAyIaxZox9ybHI1R7qRZ0pK hosByld4cInVAFXvMMjRJ0QsaTVA1CIjy+5JKWOYJEQ1B4N51V88wQIYi0P0CNO68tc9 4FjLlHO7pnzORilp3EP7qcGsYeUCu267BfmO9Y1aEDOmtT3NxDydOJL5adoIXYH1wbfi UYgdwlVY2KjR4O0CzBUsvdq0cHed5DR9ziriheDUwayjGSySxo6VEm6wqbXKkeYYxAAU 1moKUqDBmRjIscENGnCrueGbyh5s0COVEcw2vresm3gEWqw5KOs1EGzXz1GinflFHC12 0b1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si21552477pfx.293.2018.09.11.15.18.51; Tue, 11 Sep 2018 15:19:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727369AbeILDUF (ORCPT + 99 others); Tue, 11 Sep 2018 23:20:05 -0400 Received: from mga04.intel.com ([192.55.52.120]:35543 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726885AbeILDUF (ORCPT ); Tue, 11 Sep 2018 23:20:05 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Sep 2018 15:18:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,362,1531810800"; d="scan'208";a="82705870" Received: from yoojae-mobl1.amr.corp.intel.com (HELO [10.7.153.143]) ([10.7.153.143]) by orsmga003.jf.intel.com with ESMTP; 11 Sep 2018 15:18:27 -0700 Subject: Re: [PATCH i2c-next v6] i2c: aspeed: Handle master/slave combined irq events properly To: Guenter Roeck Cc: linux-aspeed@lists.ozlabs.org, James Feist , Andrew Jeffery , openbmc@lists.ozlabs.org, Brendan Higgins , linux-kernel@vger.kernel.org, Jarkko Nikula , Vernon Mauery , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org References: <20180823225731.19063-1-jae.hyun.yoo@linux.intel.com> <20180911183734.GA21976@roeck-us.net> <1f34fe8c-69ef-5f2d-25dc-d5f6037cc558@linux.intel.com> <20180911204107.GA26017@roeck-us.net> From: Jae Hyun Yoo Message-ID: Date: Tue, 11 Sep 2018 15:18:27 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180911204107.GA26017@roeck-us.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/11/2018 1:41 PM, Guenter Roeck wrote: > On Tue, Sep 11, 2018 at 01:30:41PM -0700, Jae Hyun Yoo wrote: >> On 9/11/2018 11:37 AM, Guenter Roeck wrote: >>> Hi, >>> >>> On Thu, Aug 23, 2018 at 03:57:31PM -0700, Jae Hyun Yoo wrote: >>>> In most of cases, interrupt bits are set one by one but there are >>>> also a lot of other cases that Aspeed I2C IP sends multiple >>>> interrupt bits with combining master and slave events using a >>>> single interrupt call. It happens much more in multi-master >>>> environment than single-master. For an example, when master is >>>> waiting for a NORMAL_STOP interrupt in its MASTER_STOP state, >>>> SLAVE_MATCH and RX_DONE interrupts could come along with the >>>> NORMAL_STOP in case of an another master immediately sends data >>>> just after acquiring the bus. In this case, the NORMAL_STOP >>>> interrupt should be handled by master_irq and the SLAVE_MATCH and >>>> RX_DONE interrupts should be handled by slave_irq. This commit >>>> modifies irq hadling logic to handle the master/slave combined >>>> events properly. >>>> >>>> Signed-off-by: Jae Hyun Yoo >>>> Reviewed-by: Brendan Higgins >>> >>> This patch causes a boot stall when booting witherspoon-bmc with >>> qemu v3.0, and all i2c device probes fail with error -110 (timeout). >>> Bisect log is attached for reference. >>> >>> With the same kernel configuration (aspeed_g5_defconfig), >>> ast2500-evb and romulus-bmc are still able to boot. >>> palmetto-bmc with aspeed_g4_defconfig also appears to work. >>> >>> Is this a problem with qemu ? Should I drop the qemu test >>> for witherspoon-bmc starting with the next kernel release ? >>> >>> Thanks, >>> Guenter >>> >> >> Hi Guenter, >> >> Thanks for your report. >> >> I checked this patch again but it doesn't have any change that could >> affect to the probing flow. I'll debug the issue on qemu 3.0 environment >> and will share if I find something. >> > The problem may be that qemu and the new code disagree how interrupts > should be generated and handled, and the new code does not handle the > interrupts it receives from the simulated hardware. This will result > in i2c device probe failure, which in turn can cause all kinds of > problems. > Yes, that makes sense. Looks like it should be reverted until the issue is fixed. Will submit a patch to revert it. Thanks, Jae