From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67344C433C1 for ; Fri, 26 Mar 2021 21:56:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D60F61A0D for ; Fri, 26 Mar 2021 21:56:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230043AbhCZVzg (ORCPT ); Fri, 26 Mar 2021 17:55:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:45170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230316AbhCZVzS (ORCPT ); Fri, 26 Mar 2021 17:55:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C511A61A28; Fri, 26 Mar 2021 21:55:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616795718; bh=ThOTtOeCaalPjDMF552REQ8hQV0MTtvPsHurWmKDojI=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=VHBWue9AqowGvGaqNHQVQjjTSM3sRba/Tp8NCZ1pilQpjtMFuqerC1clg9u0IjTBc xFQvm8dTY4pn2sTLcPnNgpOPSy8vERd/0Uv2qvz9OAbwVr76hoCqeP+4yXpn5Yzs/u rJHD0xUEWxzYBXhkC9B968yauVcSnKVLqBxvnZMo2y0zOTrnSEerzoT980r7DoXImv rGUiDaLG4Jr8HNgN+UrqSHkF1z/uvlXtMVi0DtxjeC/g7PVQ6/C/XN3dVIz3iCp5WR UF+ptOuEmkiwwaciNER6iQ9/G+8ddcrIxKkV1JOA+ZDXGkHlKYObKv3pkLKSdkxTUJ tOteo3S5Tz+gw== Date: Fri, 26 Mar 2021 16:55:16 -0500 From: Bjorn Helgaas To: Andy Shevchenko Cc: Heiner Kallweit , Bjorn Helgaas , Jonathan Corbet , Jens Axboe , Viresh Kumar , Dan Williams , Vinod Koul , David Miller , Lee Jones , Ion Badulescu , Jakub Kicinski , Lino Sanfilippo , Christian Lamparter , Kalle Valo , Luis Chamberlain , Adam Radford , "James E.J. Bottomley" , "Martin K. Petersen" , James Smart , Dick Kennedy , Nilesh Javali , GR-QLogic-Storage-Upstream@marvell.com, Greg Kroah-Hartman , Jiri Slaby , Peter Chen , Felipe Balbi , "linux-pci@vger.kernel.org" , linux-doc@vger.kernel.org, Linux Kernel Mailing List , linux-ide@vger.kernel.org, dmaengine@vger.kernel.org, "netdev@vger.kernel.org" , linux-parisc@vger.kernel.org, linux-wireless , SCSI development list , linux-serial@vger.kernel.org, Linux USB Mailing List , Randy Dunlap , Andrew Morton Subject: Re: [PATCH] PCI: Remove pci_try_set_mwi Message-ID: <20210326215516.GA916324@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org On Fri, Mar 26, 2021 at 11:42:46PM +0200, Andy Shevchenko wrote: > On Fri, Mar 26, 2021 at 04:26:55PM -0500, Bjorn Helgaas wrote: > > [+cc Randy, Andrew (though I'm sure you have zero interest in this > > ancient question :))] > > > > On Wed, Dec 09, 2020 at 09:31:21AM +0100, Heiner Kallweit wrote: > > > pci_set_mwi() and pci_try_set_mwi() do exactly the same, just that the > > > former one is declared as __must_check. However also some callers of > > > pci_set_mwi() have a comment that it's an optional feature. I don't > > > think there's much sense in this separation and the use of > > > __must_check. Therefore remove pci_try_set_mwi() and remove the > > > __must_check attribute from pci_set_mwi(). > > > I don't expect either function to be used in new code anyway. > > > > There's not much I like better than removing things. But some > > significant thought went into adding pci_try_set_mwi() in the first > > place, so I need a little more convincing about why it's safe to > > remove it. > > > > The argument should cite the discussion about adding it. I think one > > of the earliest conversations is here: > > https://lore.kernel.org/linux-ide/20070404213704.224128ec.randy.dunlap@oracle.com/ > > It's solely PCI feature which is absent on PCIe. > > So, if there is a guarantee that the driver never services a device connected > to old PCI bus, it's okay to remove the call (it's no-op on PCIe anyway). Yes, I'm aware that MWI is a no-op on PCIe. If we want to argue that we don't need to support Conventional PCI devices, that should be explicit, and we could remove pci_set_mwi() completely. But I don't think we're ready to drop Conventional PCI support. > OTOH, PCI core may try MWI itself for every device (but this is an opposite, > what should we do on broken devices that do change their state based on that > bit while violating specification). > > In any case > > Acked-by: Andy Shevchenko Thanks! Bjorn