Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp305508pxb; Wed, 27 Oct 2021 03:25:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrVSWJ4CNmZsGXTMpQm77WTkhzmcs2NualxlbQGy713IJifw9N8GZLKj5kG8GFZCQunLU4 X-Received: by 2002:a17:906:d196:: with SMTP id c22mr37090064ejz.231.1635330331894; Wed, 27 Oct 2021 03:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635330331; cv=none; d=google.com; s=arc-20160816; b=b4BXOPwQEooCC511/rBzLLcDooP+tPAGTIeX2Q6/wTLAy1n8fyRLGyVSTPaaswKF/U wBzBYQxd+fjWSJ+X/VJ8XsrAG1vGaGH3B/VrozrF0/68T8e7CtQSt3iUJbbtFc0phY/d 4pOXYHdBTjhiqrJ7jZGxIdrH7joSdjtfx88eb+7pLUr3FRDMDlkHtS4o9KAWC/eTmNug R4iuOSAkVlsngaZV0kEeuh4DvGoBBXhf3rU6meNmB7ADt2tEzGdlvbzajN/jPEMuLvuo DpNs8Cz2Zfw9iNf0NNw1A7r/6Px7/xvUojPk2sPfVaD0kn9Xjo9k8C9926IeGhY+9Mbc Zeuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:sender:dkim-signature; bh=voIqEXStO2bmGabwFowsT3t9DeTHiN7x8iO2F0Skzmw=; b=XzKiAneJ1BAqZ8Y+7qQvcQjNUyr6GEgt+Smz4KJuiZwvk/Py9I1VfDFh1otMAONvOL XZ7D0MNducFPb0pylHUIg/kCsMxyTZ5zeQX2mUD/VjcfSoZ5C2tV5ViRQc4a9UhNl8Ku 9qMPrxnDceDxxLtdarXBcI4beGGOJ3LNofOQ3ajxhT2NlJR2qoAt0euXoHdfkpfLDQcT HzVw+FElWBfJ0bMWhTDrF4MFjvgEQ1bhbQPSc5G+mnDtsamixEYATgEkk3L6ysTNfqaA KUEscqeMzDN348oMzsOpi/KTOFwUW9dyEmkV8TO8U+7gFPRwfR9xwzIriw7PxCT1vm7Y U9VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=g9ubPdUD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sg12si6954300ejc.729.2021.10.27.03.25.08; Wed, 27 Oct 2021 03:25:31 -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=@gmail.com header.s=20210112 header.b=g9ubPdUD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239294AbhJZUue (ORCPT + 99 others); Tue, 26 Oct 2021 16:50:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239292AbhJZUu3 (ORCPT ); Tue, 26 Oct 2021 16:50:29 -0400 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3005C061570 for ; Tue, 26 Oct 2021 13:48:04 -0700 (PDT) Received: by mail-qk1-x735.google.com with SMTP id bk35so387075qkb.6 for ; Tue, 26 Oct 2021 13:48:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:reply-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=voIqEXStO2bmGabwFowsT3t9DeTHiN7x8iO2F0Skzmw=; b=g9ubPdUDessLkR2PqedKr0pQ4aUQgAtx5gvLK8WOaxAAt3BQQw1PKZulTbmK5V/+/e fzk1NlrhQ/URYFzgoz99AOYHOMuj4YtEFT+MIe7ypVaarEafXgGJFNkkE0czBug+8wSc 9o5w1C6CVS0hWkqYcmxSrL+scz0NsmfOwkjJ2h+uaMLv4Qq0gVdmdiNWQuJv3QZ3bkL+ 0fCHEBtlLtg1ppZ5V+lVzGpllJ93tsKCG8s48fS9rMY/LUsWw6CZ/hy1OldlMStjthnP oVS4e2v0BZSubq3Hg1Dvsf/2fr7RZF1rZ14KGlW8oT1OGA2GOO81D9M9jFVZPfTkmlOy 3X5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :reply-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=voIqEXStO2bmGabwFowsT3t9DeTHiN7x8iO2F0Skzmw=; b=bNaujLLx8+p0GDkzSXqtlVL85T6dX53pbJGDCFsqf0BJcf4qRPDWmF9vBKxN52nEx9 SQZ3v7yUVuxW0MI+eG6ppWOVr++8rrD4Y4Zm8EBirzxIx2dTNOQvPIGga5OWwqq8SW0m ibJw0dckJCfedulUQwhbKkwfBMTX0VOBUyN/4tbZ7UPxC0cx86pGpuIYqMEFKREQ1rkW Q7StQOU2T5HoVdP3/sQLjGsSWG/bEiR+21LysukY7PXClqWhoo1CGoUfhj6rrwanMOYX i7uLIg4Iij5C8iOdTj92YYmuyg4mP7bjT9vuGKdrsncF4f/Th9SGazPb4UHQfPVs491j bddg== X-Gm-Message-State: AOAM53130IbdkObrZLGFwn6XQaPNVHvJ+tMXduUaJGjG0mCuBHJqrxUz SzHNwC0wObUOZa15RSvdE2TKwZF4hA== X-Received: by 2002:a37:a050:: with SMTP id j77mr21608934qke.337.1635281283839; Tue, 26 Oct 2021 13:48:03 -0700 (PDT) Received: from serve.minyard.net ([47.184.156.158]) by smtp.gmail.com with ESMTPSA id o14sm12565768qtv.91.2021.10.26.13.48.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 13:48:03 -0700 (PDT) Sender: Corey Minyard Received: from minyard.net (unknown [IPv6:2001:470:b8f6:1b:ece2:c5c7:8266:ec0b]) by serve.minyard.net (Postfix) with ESMTPSA id EE5191800B9; Tue, 26 Oct 2021 20:48:01 +0000 (UTC) Date: Tue, 26 Oct 2021 15:48:00 -0500 From: Corey Minyard To: Kunkun Li Cc: openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [Openipmi-developer] [PATCH] ipmi: ssif: Add msleep in multipart test Message-ID: <20211026204800.GE2744412@minyard.net> Reply-To: minyard@acm.org References: <20211026025834.82766-1-likunkun@bytedance.com> <20211026165009.GD2744412@minyard.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211026165009.GD2744412@minyard.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 26, 2021 at 11:50:09AM -0500, Corey Minyard wrote: > On Tue, Oct 26, 2021 at 10:58:34AM +0800, Kunkun Li wrote: > > During multipart test, cmd(6,7,8) or cmd(6,7,7) will > > be sent continuously. > > This is not useful information, we don't have access to your tests, so > this is meaningless to us. I realized what you meant above. The "multipart test" is what the ssif driver does to detect multipart message support. My suggestion would be to use the results of get device id (manufacturer and product id) and compare it against a list of of BMCs that behave badly when the multipart test is done against them. Then just skip that test for those BMCs. I know that adding 40ms to the detection doesn't seem like much, but every little bit matters here. It doesn't take a lot of those to really add up. -corey > > > > > The pressure test found some BMC systems cannot process > > messages in time, resulting in read_response continues to receive > > error messages from i2c. > > Retry mechanism will takes 10s, and finally set not support > > multipart transmit. > > > > So, to work around this,add msleep after sending cmd 6 and > > cmd 7 respectively. The problem did not appear again in > > pressure test. > > No, you can't slow down everyone because you have one dodgy BMC. You > need to detect that this is a BMC that has the problem and only do it > for those BMCs. > > -corey > > > > > Signed-off-by: Kunkun Li > > --- > > drivers/char/ipmi/ipmi_ssif.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c > > index 20d5af92966d..65841798fafe 100644 > > --- a/drivers/char/ipmi/ipmi_ssif.c > > +++ b/drivers/char/ipmi/ipmi_ssif.c > > @@ -1453,6 +1453,7 @@ static int start_multipart_test(struct i2c_client *client, > > ret = i2c_smbus_write_block_data(client, > > SSIF_IPMI_MULTI_PART_REQUEST_START, > > 32, msg); > > + msleep(SSIF_MSG_MSEC); > > if (ret) { > > retry_cnt--; > > if (retry_cnt > 0) > > @@ -1467,6 +1468,7 @@ static int start_multipart_test(struct i2c_client *client, > > ret = i2c_smbus_write_block_data(client, > > SSIF_IPMI_MULTI_PART_REQUEST_MIDDLE, > > 32, msg + 32); > > + msleep(SSIF_MSG_MSEC); > > if (ret) { > > dev_err(&client->dev, "Could not write multi-part middle, though the BMC said it could handle it. Just limit sends to one part.\n"); > > return ret; > > -- > > 2.11.0 > > > > > _______________________________________________ > Openipmi-developer mailing list > Openipmi-developer@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openipmi-developer