From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934767AbdBQRPL (ORCPT ); Fri, 17 Feb 2017 12:15:11 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:43449 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934122AbdBQRPJ (ORCPT ); Fri, 17 Feb 2017 12:15:09 -0500 Date: Fri, 17 Feb 2017 09:15:06 -0800 From: Christoph Hellwig To: Kishon Vijay Abraham I Cc: Bjorn Helgaas , Jingoo Han , Joao Pinto , linux-pci@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, nsekhar@ti.com Subject: Re: [PATCH v2 04/22] Documentation: PCI: Guide to use pci endpoint configfs Message-ID: <20170217171506.GB15276@infradead.org> References: <1487325042-28227-1-git-send-email-kishon@ti.com> <1487325042-28227-5-git-send-email-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1487325042-28227-5-git-send-email-kishon@ti.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I'm commenting on the configfs layout here instead of the patch with the code as the issues are easier to explain that way. I think the layout is a bit confusing and could be cleaner by making use of pre-created entries and symlinks. Here is my suggestion: /sys/kernel/config/pci_ep/functions/ .. test/ # a directory for each function driver ... user-specified-name1/ ... user-specified-name2 .. nvme/ ... user-specified-name42/ Each directory under /sys/kernel/config/pci_ep/functions/ is owned by a function drivers. Under that function driver's directory you can create a directory for each instance of a function driver. The configfs layout is controlled by the function driver. E.g. your current EPF fields would move into the test function driver, while the nvme function would expose totally different fields. /sys/kernel/config/pci_ep/controllers/ ... dwc-0/ ... function ... dwc-1/ ... function ... vhost-0/ ... function Here you have a directory for each controller that can be bound to a function. The directories are pre-created for each controller port that is EP capable. Function is a symlink to the function instance above. Additional parameters might also be present depending on the EPC driver. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH v2 04/22] Documentation: PCI: Guide to use pci endpoint configfs Date: Fri, 17 Feb 2017 09:15:06 -0800 Message-ID: <20170217171506.GB15276@infradead.org> References: <1487325042-28227-1-git-send-email-kishon@ti.com> <1487325042-28227-5-git-send-email-kishon@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1487325042-28227-5-git-send-email-kishon-l0cyMroinI0@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Kishon Vijay Abraham I Cc: Bjorn Helgaas , Jingoo Han , Joao Pinto , linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, nsekhar-l0cyMroinI0@public.gmane.org List-Id: devicetree@vger.kernel.org I'm commenting on the configfs layout here instead of the patch with the code as the issues are easier to explain that way. I think the layout is a bit confusing and could be cleaner by making use of pre-created entries and symlinks. Here is my suggestion: /sys/kernel/config/pci_ep/functions/ .. test/ # a directory for each function driver ... user-specified-name1/ ... user-specified-name2 .. nvme/ ... user-specified-name42/ Each directory under /sys/kernel/config/pci_ep/functions/ is owned by a function drivers. Under that function driver's directory you can create a directory for each instance of a function driver. The configfs layout is controlled by the function driver. E.g. your current EPF fields would move into the test function driver, while the nvme function would expose totally different fields. /sys/kernel/config/pci_ep/controllers/ ... dwc-0/ ... function ... dwc-1/ ... function ... vhost-0/ ... function Here you have a directory for each controller that can be bound to a function. The directories are pre-created for each controller port that is EP capable. Function is a symlink to the function instance above. Additional parameters might also be present depending on the EPC driver. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Fri, 17 Feb 2017 09:15:06 -0800 From: Christoph Hellwig To: Kishon Vijay Abraham I Subject: Re: [PATCH v2 04/22] Documentation: PCI: Guide to use pci endpoint configfs Message-ID: <20170217171506.GB15276@infradead.org> References: <1487325042-28227-1-git-send-email-kishon@ti.com> <1487325042-28227-5-git-send-email-kishon@ti.com> MIME-Version: 1.0 In-Reply-To: <1487325042-28227-5-git-send-email-kishon@ti.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Joao Pinto , linux-doc@vger.kernel.org, Jingoo Han , nsekhar@ti.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Bjorn Helgaas , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+bjorn=helgaas.com@lists.infradead.org List-ID: I'm commenting on the configfs layout here instead of the patch with the code as the issues are easier to explain that way. I think the layout is a bit confusing and could be cleaner by making use of pre-created entries and symlinks. Here is my suggestion: /sys/kernel/config/pci_ep/functions/ .. test/ # a directory for each function driver ... user-specified-name1/ ... user-specified-name2 .. nvme/ ... user-specified-name42/ Each directory under /sys/kernel/config/pci_ep/functions/ is owned by a function drivers. Under that function driver's directory you can create a directory for each instance of a function driver. The configfs layout is controlled by the function driver. E.g. your current EPF fields would move into the test function driver, while the nvme function would expose totally different fields. /sys/kernel/config/pci_ep/controllers/ ... dwc-0/ ... function ... dwc-1/ ... function ... vhost-0/ ... function Here you have a directory for each controller that can be bound to a function. The directories are pre-created for each controller port that is EP capable. Function is a symlink to the function instance above. Additional parameters might also be present depending on the EPC driver. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 From: hch@infradead.org (Christoph Hellwig) Date: Fri, 17 Feb 2017 09:15:06 -0800 Subject: [PATCH v2 04/22] Documentation: PCI: Guide to use pci endpoint configfs In-Reply-To: <1487325042-28227-5-git-send-email-kishon@ti.com> References: <1487325042-28227-1-git-send-email-kishon@ti.com> <1487325042-28227-5-git-send-email-kishon@ti.com> Message-ID: <20170217171506.GB15276@infradead.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org I'm commenting on the configfs layout here instead of the patch with the code as the issues are easier to explain that way. I think the layout is a bit confusing and could be cleaner by making use of pre-created entries and symlinks. Here is my suggestion: /sys/kernel/config/pci_ep/functions/ .. test/ # a directory for each function driver ... user-specified-name1/ ... user-specified-name2 .. nvme/ ... user-specified-name42/ Each directory under /sys/kernel/config/pci_ep/functions/ is owned by a function drivers. Under that function driver's directory you can create a directory for each instance of a function driver. The configfs layout is controlled by the function driver. E.g. your current EPF fields would move into the test function driver, while the nvme function would expose totally different fields. /sys/kernel/config/pci_ep/controllers/ ... dwc-0/ ... function ... dwc-1/ ... function ... vhost-0/ ... function Here you have a directory for each controller that can be bound to a function. The directories are pre-created for each controller port that is EP capable. Function is a symlink to the function instance above. Additional parameters might also be present depending on the EPC driver.