From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752273AbdLLPHc (ORCPT ); Tue, 12 Dec 2017 10:07:32 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:59734 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751289AbdLLPHa (ORCPT ); Tue, 12 Dec 2017 10:07:30 -0500 Date: Tue, 12 Dec 2017 07:07:26 -0800 From: Christoph Hellwig To: Bjorn Helgaas Cc: Govinda Tatti , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, bhelgaas@google.com, boris.ostrovsky@Oracle.COM, jgross@suse.com, JBeulich@suse.com, roger.pau@citrix.com, konrad.wilk@Oracle.COM Subject: Re: [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface Message-ID: <20171212150726.GA20341@infradead.org> References: <20171207222145.9769-1-Govinda.Tatti@Oracle.COM> <20171207222145.9769-2-Govinda.Tatti@Oracle.COM> <20171208202424.GC12367@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171208202424.GC12367@bhelgaas-glaptop.roam.corp.google.com> User-Agent: Mutt/1.9.1 (2017-09-22) 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 On Fri, Dec 08, 2017 at 02:24:24PM -0600, Bjorn Helgaas wrote: > I'd rather change pcie_flr() so you could *always* call it, and it > would return 0, -ENOTTY, or whatever, based on whether FLR is > supported. Is that feasible? > > I don't like the "Can I do this? Ok, do this" style of interfaces. > It's racy (not really applicable in this case) and seems clunky. I was tempted to change all that for the whole reset sequence but didn't dare to do that because someone probably put some thought into the current scheme. I'd love to get rid of the "can I do this" interfaces entirely, and also change to EOPNOTSUPP for the not supported case.