Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3496342pxj; Mon, 24 May 2021 08:03:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0vjKLNut2EiKz1oIYnD57tFe0haFMn9xNRfjLKu7PDHNV3h3q03n0Udhfq3RlvPNs6tZ0 X-Received: by 2002:a17:907:20a7:: with SMTP id pw7mr24078298ejb.39.1621868610510; Mon, 24 May 2021 08:03:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621868610; cv=none; d=google.com; s=arc-20160816; b=UZU56zJ8pPmERmGV/LcfC8F4m0b2cstDbFuCcS4TZAK9n/g3UG0be+lWTX5HxnaHMm 8qQs3yWqlZSBWyaTROmqgfPBYzHQ5sPyRg2q1wPGBiTbSCiirME4ZaLkPE5kOSyBXDZa HUeENzC+yniXCrzQsXc/z//mg3kvYvEXs0G473f1yCsXrtyixAWdPEzNRq8uNm8bCuyO 0ynFSNwP+3TA7EDIt+4tLeMa+GeZpYvBpg5D4ScKf/YJ5SA3xrIFcCnUChGBlS5qvnQT rqjG7k4At7hNBchK5gWaxPvfKpnadZSL9APkqLeriAdp0DJ2+Jn/dbBVcn6e2RGim+bD 2g3A== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/E/GBFdOj5M6LsY2db/Ym7zO7WOVjl/+cOln0wcJzT4=; b=SeiCjJ+AzdWDTeP4rIkJXT2mRdWiusnDuUY3OwgK/yKHUfvISdrXs9A98LoRaDDusH bXUIrxvMn8fF1JYXtjbrzHTILcljGwYgwSNXuEDoP2jZAbZaZpdx96vW5vcMRkqVC6W6 n+Gn9vVJVbXgG8krZfxQ0m1UIa6NLjoV6BcdMw57GR0iGCjvQTGGngp+UPljvPa+Io2W 5nD/eZ8evvYNQurNgsVSggAnBgYG8SNBLl7sDOtWNv/sU2k+2tFNRuDEyiU3Yjk3s7si gHfvKokyQ6s54MK2yxxPbpNlY4MvOMukvUdC9rPhdqjznvi7vZ6T+csRtoovndvrNilK FFig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l0Ijf3GN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w20si12412181edx.293.2021.05.24.08.03.06; Mon, 24 May 2021 08:03:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l0Ijf3GN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233076AbhEXPD2 (ORCPT + 99 others); Mon, 24 May 2021 11:03:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234156AbhEXO47 (ORCPT ); Mon, 24 May 2021 10:56:59 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFC4DC061248; Mon, 24 May 2021 07:48:17 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id ep16-20020a17090ae650b029015d00f578a8so11271561pjb.2; Mon, 24 May 2021 07:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=/E/GBFdOj5M6LsY2db/Ym7zO7WOVjl/+cOln0wcJzT4=; b=l0Ijf3GN8zzspFB/KjYUO1CbD5kmnXPNH/rU1F3wRmOvMo7hwu/wusEipB/hGn8oPy 8/tp3WJ2aRiyENiNvREV/0LMtp9DAcPVhyclEGS5kHHkW8w2AeXd24X+8PBgk8qP8Jax 17+NUx0ARBwfjz0e5SUpn65TyM0zgTyEqvYXXrBAV5bwz4QaWoSQoW5gDsQFTtLiy4en s6sY3lZCUqbpjaUhymlMszvQSO49/5fi6rm65Mw/L+DmO1RGYR6n5kWTILbvNbfLEyJs h7vZD/WtydR4oHpLFxfH0l4RQFXQyZ49AoAWMeqJMzRlaRnjvT5tHnVJRn/3t6Z3W4Ms ZoGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=/E/GBFdOj5M6LsY2db/Ym7zO7WOVjl/+cOln0wcJzT4=; b=RZ0JLC3iRptrR8E3SLFLQJprnUzm35qCEw8PLeVWa7cjsVqf+8Fj6B6w9UgkMEYKCj c9reo9We6F6VUvR3Z/eOvDkVD+COtGG13fM4f9AfRzbKxLfGH8C1mM/3tg2SlNd2ZOZL GNpdjbUUgW9MrF1ekuVOe38vVutdNJBd81WhT/ZlWh3ju5goEWT/SrWTydELn0C6VSGw 4s/0boneHLRsk8AoN1QtsX58SoMDCm7H7cxhb6yHv0vqZ/oHF8d7sk/M2X/4Q9VRCuaD 6pMpvdXo7aVZ+Z3E1NygBXdSgrfriXQJZpUM5fcARKdKDv+hpqHn4dRcDaNjMzCRbIid M48A== X-Gm-Message-State: AOAM53160hU0Cm5ZX+FXmdsGaIhyPyTW2xnYe7sSpFR3g/KaRFFg0nQI cj67BWY+wG825QyA5l9iyF4CZP8GkxqWwpJY X-Received: by 2002:a17:90a:dc82:: with SMTP id j2mr25686023pjv.138.1621867696948; Mon, 24 May 2021 07:48:16 -0700 (PDT) Received: from localhost ([103.248.31.164]) by smtp.gmail.com with ESMTPSA id j16sm11953309pfi.92.2021.05.24.07.48.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 07:48:16 -0700 (PDT) Date: Mon, 24 May 2021 20:18:14 +0530 From: Amey Narkhede To: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= Cc: Bjorn Helgaas , alex.williamson@redhat.com, raphael.norwitz@nutanix.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND v2 2/7] PCI: Add pcie_reset_flr to follow calling convention of other reset methods Message-ID: <20210524144814.rqgvbaawdxbdwio4@archlinux> References: <20210519235426.99728-1-ameynarkhede03@gmail.com> <20210519235426.99728-3-ameynarkhede03@gmail.com> <20210520150526.GB641812@rocinante.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210520150526.GB641812@rocinante.localdomain> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/05/20 05:05PM, Krzysztof WilczyƄski wrote: > Hi Amey, > > [...] > > +int pcie_reset_flr(struct pci_dev *dev, int probe) > > +{ > > + u32 cap; > > + > > + if (dev->dev_flags & PCI_DEV_FLAGS_NO_FLR_RESET) > > + return -ENOTTY; > > + > > + pcie_capability_read_dword(dev, PCI_EXP_DEVCAP, &cap); > > + if (!(cap & PCI_EXP_DEVCAP_FLR)) > > + return -ENOTTY; > > + > > + if (probe) > > + return 0; > > + > > + return pcie_flr(dev); > > +} > > Similarly to my suggestion in the first patch in the series, perhaps > using a boolean here would be an option. > > Having said that, the following existing functions aren't doing it, so > for the sake of keeping things consistent it might not be the best > option, as per: > > static int pci_af_flr(struct pci_dev *dev, int probe) > int nvme_disable_and_flr(struct pci_dev *dev, int probe) > > Krzysztof All the functions which implement different types of resets including quirks have ...reset(struct pci_dev *dev, int probe) signature. Should I modify all of them? Thanks, Amey