Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6580946ybh; Thu, 8 Aug 2019 02:27:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkbOm5l5zv/xtq2fj1RYRZFcTbA8UQqKrTsZj1rh9ipwZIBbmlKVuLT8r4qNSymcSUjp4t X-Received: by 2002:a17:902:5a46:: with SMTP id f6mr11915597plm.319.1565256421544; Thu, 08 Aug 2019 02:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565256421; cv=none; d=google.com; s=arc-20160816; b=FqyBXdE4ZCQljKvcE+symHhVw3pNiWUQpkLXN1kgqEQqC6E3wnWr9alw7tf7LiX3TA uKW7zBLpYbOK4i3t9Bw4bf4IXqWfPYlV9qgwbiZZb69KVYq4zE3EHar2KML73KQFSQGw pCXGPiWxPN4pvZanZzEosc/4CWgVbvFetR6SXGV7gRD1IVkFVnHzbxSd1vTjXNcOoxlN 6acvuJurvYYuvGzLO3YAbMAsBnQX8Z/ieyFtvUVpJ2YFOvhdj8ak6epDBAtSeeLUi1Dw RwdGFH+9d38H9dwBoa5p67qUajMIUyeJcrqWxG5NibMs8nySGLQVO1SKhpCF9lK5TmcN bq9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=60CIUmAfRuD4UW90Q+tKGF7By9ZmJPA3htCE9sSEH4k=; b=qC60LSviYRztyWDi1KY4TWx7EPpSnE3+/YAjuxo9IUfCQawdRjlozG/ErjcWHjpyuL G5mcJSfr76JK3Vrhb7ALO//ht6YtDxHC88WfozsKJxjSn+hy70gkUtrvMpmlCCAVE4Xo ofIMDsnqxN6Rv8P1cdzt1wGGXyCuCKyfLIC48ecMuilr+JYATqLQBm9PTO0hKjmu+VsD cC+hP7YG7s97BlMktx8CqdL1EH0LdtEuOFSCWK/MkBGJ39lqxc/kEdL6JZigQ531G2le Y7jZNjcMy+nT0tJ12h1P8ZtE2aBdJWP7CbqWDzmsKuUbPAd9CtoSQhz+jiBcK0ergcFY 8+Fw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si46276444plk.388.2019.08.08.02.26.45; Thu, 08 Aug 2019 02:27:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732214AbfHHJZY (ORCPT + 99 others); Thu, 8 Aug 2019 05:25:24 -0400 Received: from foss.arm.com ([217.140.110.172]:58772 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730678AbfHHJZY (ORCPT ); Thu, 8 Aug 2019 05:25:24 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7BE571596; Thu, 8 Aug 2019 02:25:23 -0700 (PDT) Received: from localhost (unknown [10.37.6.20]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EDCCF3F73D; Thu, 8 Aug 2019 02:25:22 -0700 (PDT) Date: Thu, 8 Aug 2019 10:25:21 +0100 From: Andrew Murray To: Denis Efremov Cc: Bjorn Helgaas , Derek Chickles , Satanand Burla , Felix Manlunas , netdev@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] liquidio: Use pcie_flr() instead of reimplementing it Message-ID: <20190808092520.GR56241@e119886-lin.cambridge.arm.com> References: <20190808045753.5474-1-efremov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190808045753.5474-1-efremov@linux.com> User-Agent: Mutt/1.10.1+81 (426a6c1) (2018-08-26) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 08, 2019 at 07:57:53AM +0300, Denis Efremov wrote: > octeon_mbox_process_cmd() directly writes the PCI_EXP_DEVCTL_BCR_FLR > bit, which bypasses timing requirements imposed by the PCIe spec. > This patch fixes the function to use the pcie_flr() interface instead. > > Signed-off-by: Denis Efremov > --- > drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c b/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c > index 021d99cd1665..614d07be7181 100644 > --- a/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c > +++ b/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c > @@ -260,9 +260,7 @@ static int octeon_mbox_process_cmd(struct octeon_mbox *mbox, > dev_info(&oct->pci_dev->dev, > "got a request for FLR from VF that owns DPI ring %u\n", > mbox->q_no); > - pcie_capability_set_word( > - oct->sriov_info.dpiring_to_vfpcidev_lut[mbox->q_no], > - PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR); > + pcie_flr(oct->sriov_info.dpiring_to_vfpcidev_lut[mbox->q_no]); > break; It's possible for pcie_flr to fail if the device doesn't become ready soon enough after reset in which case it returns ENOTTY. I think it's OK not to test the return value here though, as pci_dev_wait will print a warning anyway, and I'm not sure what you'd do with it anyway. Reviewed-by: Andrew Murray > > case OCTEON_PF_CHANGED_VF_MACADDR: > -- > 2.21.0 >