Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4524756imw; Tue, 19 Jul 2022 08:12:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1scc+T1cdzpBg3/W8+wCgwN0diJli+A4u7I7YzPZkdAdoET/o2rR9EVa9SBervFexwrqAIq X-Received: by 2002:a05:622a:14a:b0:31e:d36a:5c57 with SMTP id v10-20020a05622a014a00b0031ed36a5c57mr19422683qtw.567.1658243522780; Tue, 19 Jul 2022 08:12:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658243522; cv=none; d=google.com; s=arc-20160816; b=LTKVcjIqvbrDrxSlO4JT2TinYZdIC2V1sxAk1t9fzah+t84SMU9gHK+EnlxCY+FuEO orDkaROf3FuBOitmeD9detuuOdxQkkGHdxyD5pGQyT4urctX0ztbor6Y8a3lkc1zUWd3 FZ0kmIR7CDUw8TN2plJjnrxzlpqryBgCOr1qG3RPJOj/enThFZHWZTnGaU4fLJOYr0Y1 vWLDCdGmP1x7XHwXJszVcjBZ3Fl5L5Mjz6t6sVFkB75u0pNVACsjoEh64E5ZMVt41GWh 4d3CFeYFCfa7jxVNvabNyz3xN+FMfeDM9tGDNpd6dNVM/Ug+WUgETNQ1AXgTY6/lNrEL MBWQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=0/h1+fCQ9IYqXvYpnn8K34LiExJ7t3nA0qcVVSpLLOw=; b=cmZRbt4xaFVb4IM2ykcv24APFckWPzX4TH6RvRrPZRo1nsWLkHexJZLFofxPiAymbK i3QpcUXqoBwXxR97IVZOOEUJrYdNxCIP+PG0Rw8taWjt5dApKoFjoiNva2RWIbp/1bTC oLkSFLEb4mzCPvguPmlH/NJm6qW26aDUcTE9SK0WLaV+pAjS6boUAddoau47MuKOBtM9 p3nQq2eKYLguGqCJWSoZ8wALi+IqD+TJTputa1fg4HdAewVEtMbdlo0oBJtTDAoXIZcW Pa3IgBn3Pwy4z7n7cheQBRRUPCJ9dWpifPGaXsFIdCCI1/sNIhbaQdZIilSWJGiO2xZe 9x5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a37f60d000000b006b5e56f1c9bsi2571673qkj.98.2022.07.19.08.11.47; Tue, 19 Jul 2022 08:12:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237364AbiGSPHX convert rfc822-to-8bit (ORCPT + 99 others); Tue, 19 Jul 2022 11:07:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233614AbiGSPHU (ORCPT ); Tue, 19 Jul 2022 11:07:20 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 000AD5005C; Tue, 19 Jul 2022 08:07:16 -0700 (PDT) Received: from fraeml712-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LnMWl0Fm3z67ykV; Tue, 19 Jul 2022 23:02:43 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml712-chm.china.huawei.com (10.206.15.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 19 Jul 2022 17:07:14 +0200 Received: from localhost (10.81.209.49) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 19 Jul 2022 16:07:13 +0100 Date: Tue, 19 Jul 2022 16:07:11 +0100 From: Jonathan Cameron To: Dan Williams CC: , Bjorn Helgaas , Ben Widawsky , Alison Schofield , "Lukas Wunner" , Vishal Verma , Dave Jiang , , , Subject: Re: [PATCH V13 8/9] cxl/port: Retry reading CDAT on failure Message-ID: <20220719160711.000078f9@Huawei.com> In-Reply-To: <62d043d8bd04c_16fb9729422@dwillia2-xfh.jf.intel.com.notmuch> References: <20220705154932.2141021-1-ira.weiny@intel.com> <20220705154932.2141021-9-ira.weiny@intel.com> <62d043d8bd04c_16fb9729422@dwillia2-xfh.jf.intel.com.notmuch> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Originating-IP: [10.81.209.49] X-ClientProxiedBy: lhreml749-chm.china.huawei.com (10.201.108.199) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 14 Jul 2022 09:27:04 -0700 Dan Williams wrote: > ira.weiny@ wrote: > > From: Ira Weiny > > > > The CDAT read may fail for a number of reasons but mainly it is possible > > to get different parts of a valid state. The checksum in the CDAT table > > protects against this. > > I don't know what "different parts of a valid state" means. The CDAT > should not be changing as it is being read unless someone is issuing a > set-partition while the DOE operation is happening. Unfortunately not true. The device is allowed to change it with no input from OS software at all. From CDAT spec "For Revision=1, the following changes are permitted during the runtime • Changes to the latency and bandwidth fields in DSLBIS • Changes to the latency and bandwidth fields in SSLBIS • Changes to the number of DSEMTS instances and their contents The changes to latency and bandwidth may represent events such as failover or degradation that are internal to a component." > Rather than > arbitrary retries, block out set-partition while CDAT is being read. Blocking that out is still useful even though we probably still need retries. > > You can use {set,clear}_exclusive_cxl_commands() to temporarily lock out > set-partition while the CDAT read is happening. > > ...and since this series is only for enabling