Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3921832imw; Thu, 7 Jul 2022 09:37:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v/GxWWu7kxsm0FYhYOFW7hWAywxuxL2jz3ZSqg6RpQrsq4duh4fzG/e8iXak3gi8cboiT6 X-Received: by 2002:a05:6402:1e88:b0:435:bf05:f0f with SMTP id f8-20020a0564021e8800b00435bf050f0fmr63407836edf.2.1657211878462; Thu, 07 Jul 2022 09:37:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657211878; cv=none; d=google.com; s=arc-20160816; b=TBTyLrNjWxn0Qy2zZ5F1t3NuI8xhi882aka/6YvRnqAVynT4Ov6+HZb7WYeQxvttVL 05aEJHC31sGhMMyzViR0cb/iW1fdhnSLTrM7wJyzuZan1Nsx3ij+hqS9wbZZU5ckpAgk jQ2TUlrKL0kyLvgUn0pmirqhGeV+SjXhEqFZLIv3/xXU8orFZHvuBfNbeoTMoixDK/Ml U6MWvVl+dI3KeQyq9AdhA0q68+qAc1dnSIqQvf9h+THkkCX4HRFHOidArjCxAI/sW6s5 5jjrvq5wZh+twVYONm2sml59xfM7Dp4OC1QVe6X2YhBrGfQg3fmkZhOrIZ52klx0aDrU qS/g== 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-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=Jq4XS0loCC+iH4D5RTI052l9hR6k/RMzAvQLoRqNgMA=; b=kXlzGPToy0OsYHmMxLKOwZ4MtUK2E2zeiSUTre9ot40g8g+Eio9+HawFLCWTE6hY06 BrPvVMG5Or/JTSLb1qn19FeDNJQ3nPZIJ3RmfUZiGj3uTurqfhQEq/hLUIs7UWhI0lZs BGEqb3d7TclJnzLfDnfKUM75QybBhZDeRezGzORoJbXQVP5hXZBrdtuwHeTlDTpeosMx Ou6iOxZJ/8jRCK5Ay7V4/FgTRcQgyZZAUpFMb7eG0YnKqUeBm4C7uaww/OdfO58/6Exq gIrlpgFmp+keDCQAdziXj0bOVKbSURYbpfRi+y+SL9NCu2LFpwzkrcOpj6amEHi0sqPA 3nhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IMvF4f6c; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd34-20020a17090796a200b0072af8809a85si6139313ejc.332.2022.07.07.09.37.33; Thu, 07 Jul 2022 09:37:58 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IMvF4f6c; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236314AbiGGQWd (ORCPT + 99 others); Thu, 7 Jul 2022 12:22:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236182AbiGGQW1 (ORCPT ); Thu, 7 Jul 2022 12:22:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BD232CC84; Thu, 7 Jul 2022 09:22:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EA08F623C7; Thu, 7 Jul 2022 16:22:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 291E3C3411E; Thu, 7 Jul 2022 16:22:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657210945; bh=HN6yvGVfevEjt75PnG4J8rUpc7xjiTvUZmOyG5gVKtA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=IMvF4f6cwmSSL2YUBBg7x2oJf9s+3uFnEP9GoviCcwUOdrzANU1J2xHC7pguJLCv1 nRwjeXWdTUIyoPIgPzHd06b6+T7/cAPje5o+ei9+XZrlQeW1ktEeK4lMK4KHYJ0oHN nD+Pz7HuoxwZmeAFW0zsLaEnqDBNdhMLDRXcX5rP4V4KtsMiauY+Uh2Q58Vdc1Bh3L gIt2IdYa3P3XaNH94nIayGi/ISeINGl+rYHvKx8kJR6HToTGoVIUwpqQObB4ZgMXfR /RuM8ZPgmINLAVgz7Asn7DY/BgBuubRQk2C7XEX3PhYVxqOz8BlT8G5ZUVyNq4Rdmj QGFRYaVgVysrw== Date: Thu, 7 Jul 2022 11:22:23 -0500 From: Bjorn Helgaas To: ira.weiny@intel.com Cc: Dan Williams , Bjorn Helgaas , Jonathan Cameron , "Li, Ming" , Lukas Wunner , Alison Schofield , Vishal Verma , Dave Jiang , Ben Widawsky , linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH V13 3/9] PCI: Create PCIe library functions in support of DOE mailboxes. Message-ID: <20220707162223.GA307520@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220705154932.2141021-4-ira.weiny@intel.com> X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Tue, Jul 05, 2022 at 08:49:26AM -0700, ira.weiny@intel.com wrote: > From: Jonathan Cameron Possible subject: PCI/DOE: Add DOE mailbox support functions (no trailing period required) > Introduced in a PCIe r6.0, sec 6.30, DOE provides a config space based > mailbox with standard protocol discovery. Each mailbox is accessed > through a DOE Extended Capability. > > Each DOE mailbox must support the DOE discovery protocol in addition to > any number of additional protocols. > > Define core PCIe functionality to manage a single PCIe DOE mailbox at a > defined config space offset. Functionality includes iterating, > creating, query of supported protocol, and task submission. Destruction > of the mailboxes is device managed. > > Cc: "Li, Ming" > Cc: Bjorn Helgaas > Signed-off-by: Jonathan Cameron > Co-developed-by: Ira Weiny > Signed-off-by: Ira Weiny Whenever the CXL folks are happy with this: Acked-by: Bjorn Helgaas > +static int pci_doe_recv_resp(struct pci_doe_mb *doe_mb, struct pci_doe_task *task) > ... > + pci_err(pdev, > + "[%x] expected [VID, Protocol] = [%04x, %02x], got [%04x, %02x]\n", Since the string already wraps, I think there's no benefit to starting it on its own line. Joining with "pci_err(pdev, "[%x] ..." improves greppability slightly. > + pci_err(pdev, > + "[%x] busy detected; another entity is sending conflicting requests\n", > + offset); Ditto. > + * pci_doe_submit_task() - Submit a task to be processed by the state machine > ... > + * RETURNS: 0 when task has been successful queued, -ERRNO on error successfully > +int pci_doe_submit_task(struct pci_doe_mb *doe_mb, struct pci_doe_task *task) > ... > + * DOE requests must be a whole number of DW > + * and the response needs to be big enough for at least 1 DW Rewrap to fill 78 columns or so.