Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2249160imm; Thu, 27 Sep 2018 09:40:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV63itWOjApiW3g+LeqPFCRpLRHnOPIXwUOAahYhtjTU1AEIbP6PsXQSlx8S+t43EjWtjDDy0 X-Received: by 2002:a62:6781:: with SMTP id t1-v6mr12337571pfj.200.1538066433338; Thu, 27 Sep 2018 09:40:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538066433; cv=none; d=google.com; s=arc-20160816; b=DGxfsgHclxtI8EUDklnVbplJsIO7gmde/11R08Gr0zQ6SW98GmghpBjZ4GArRBOEEl 9sgsK/jt6vMHl/1uQOMmV8tZGmgKLbobE6LCcAOeTCyxyj1n2NabwCIVYxTaPyRdhW7V a/82e2vsC06aVSeE1Wx+Bi2/kLnLmfmbSWcgSLhbrhlXUuoqHpugGvW0s9SLIvh6OnSv 0A5nR+BcMhH033XUA+59Jkkce+mGqCNb8Y2fyJZzxkLSauypqGHakxPpACpDO1/OQeGD 4gG2sau4HdfkF0TojvKqZPL/0rjLJqIStu79CmtqGsxvtTq0dVLVygs+YEla9YukNNNu sa1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to; bh=VGaifxKrgv89hMXMpYVlkhInHiZXaI9+KNK3ds+Y4YI=; b=n40YA3gmbpVUepirPabDjb5HSwMwUjzb9oljk7RsOSXXVW/lFTkn9KYz1K0D7gYLYr GNIaNroum1nErThxjrhaYH68RQH6ezFQTrFJRSiciR5iaVFiXxIoCx8eJHVidrMbZrvI 5wm+yrxca0lSzUHOsQc5SUdAOrW/M8YJmnT3c02miCOHTpNw4IY5QEbllEdlQ9EmgvhY UUwDpnaCkn2j4Rze30nmVIl/0ewjtbNK/e4TBNtQMTU/+cxqB23wcJwghVzw92Z110l8 Gf0Isp4W/Yw1uZrYJvBdmc5eJTcMhduqFMeZw0Y8YrabhmmwDcl1A/t/gJm+kb6mq6ua CGCQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h69-v6si2337480pfc.121.2018.09.27.09.40.17; Thu, 27 Sep 2018 09:40:33 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728268AbeI0W5g (ORCPT + 99 others); Thu, 27 Sep 2018 18:57:36 -0400 Received: from ale.deltatee.com ([207.54.116.67]:58172 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727320AbeI0W5g (ORCPT ); Thu, 27 Sep 2018 18:57:36 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1g5ZJ7-0003WJ-1O; Thu, 27 Sep 2018 10:38:29 -0600 To: Wesley.Sheng@microchip.com, kurt.schwemmer@microsemi.com, bhelgaas@google.com, corbet@lwn.net Cc: linux-pci@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com References: From: Logan Gunthorpe Message-ID: <2164850f-0772-026e-19a0-73747d03aa93@deltatee.com> Date: Thu, 27 Sep 2018 10:38:27 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, corbet@lwn.net, bhelgaas@google.com, kurt.schwemmer@microsemi.com, Wesley.Sheng@microchip.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH v2] NTB: switchtec_ntb: Update switchtec documentation with pre-requisites for NTB X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-09-27 12:36 a.m., Wesley.Sheng@microchip.com wrote: > Update switchtec documentation > 1.add pre-requisites for NTB driver > 2.misc updates > change NTB hardware driver name to ntb_hw_switchtec > update the description of 2 partitions limit > add reference to Linux Documentation/ntb.txt > add use of term 'Command ID' > add use of term 'Command Return Value' > add a missing ')' You need a better commit message. It needs to describe, in plain English, why the maintainers should merge this, not itemize the individual changes (that's what the patch body tells us). > * A write must consist of at least 4 bytes and no more than 1028 bytes. > - The first four bytes will be interpreted as the command to run and > - the remainder will be used as the input data. A write will send the > + The first 4 bytes will be interpreted as the Command ID and the > + remainder will be used as the input data. A write will send the > command to the firmware to begin processing. You still have some broken white space in this patch. Notice the spacing before "remainder" compared to the previous line. > * Each write must be followed by exactly one read. Any double write will > @@ -45,9 +45,9 @@ The char device has the following semantics: > produce an error. > > * A read will block until the firmware completes the command and return > - the four bytes of status plus up to 1024 bytes of output data. (The > - length will be specified by the size parameter of the read call -- > - reading less than 4 bytes will produce an error. > + the 4-byte Command Return Value plus up to 1024 bytes of output > + data. (The length will be specified by the size parameter of the read > + call -- reading less than 4 bytes will produce an error.) Here too. > * The poll call will also be supported for userspace applications that > need to do other things while waiting for the command to complete. > @@ -83,10 +83,20 @@ The following IOCTLs are also supported by the device: > Non-Transparent Bridge (NTB) Driver > =================================== > > -An NTB driver is provided for the switchtec hardware in switchtec_ntb. > -Currently, it only supports switches configured with exactly 2 > -partitions. It also requires the following configuration settings: > +An NTB hardware driver is provided for the Switchtec hardware in > +ntb_hw_switchtec. Currently, it only supports switches configured with > +exactly 2 NT partitions and zero or more non-NT partitions. It also > +requires the following configuration settings: > > -* Both partitions must be able to access each other's GAS spaces. > +* Both NT partitions must be able to access each other's GAS spaces. > Thus, the bits in the GAS Access Vector under Management Settings > must be set to support this. > +* Kernel configuration MUST include support for NTB (CONFIG_NTB needs > + to be set) > + > +NT EP BAR 2 will be dynamically configured as a Direct Window, and the > +configuration file does not need to configure it explicitly. > + > +Please refer to Documentation/ntb.txt in Linux source tree for an > +overall understanding of the Linux NTB stack. ntb_hw_switchtec works as > +an NTB Hardware Driver in this stack. >