public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel•org>
To: Denis Efremov <efremov@linux•com>
Cc: Bjorn Helgaas <bjorn.helgaas@gmail•com>,
	Derek Chickles <dchickles@marvell•com>,
	Satanand Burla <sburla@marvell•com>,
	Felix Manlunas <fmanlunas@marvell•com>,
	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
Date: Thu, 8 Aug 2019 13:48:54 -0500	[thread overview]
Message-ID: <20190808184854.GH151852@google.com> (raw)
In-Reply-To: <20190808045753.5474-1-efremov@linux.com>

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 <efremov@linux•com>

Reviewed-by: Bjorn Helgaas <bhelgaas@google•com>

Thanks for doing this, Denis.  When possible it's better to use a PCI
core interface than to fiddle with PCI config space directly from a
driver.

> ---
>  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;
>  
>  	case OCTEON_PF_CHANGED_VF_MACADDR:
> -- 
> 2.21.0
> 

  parent reply	other threads:[~2019-08-08 18:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08  4:57 [PATCH] liquidio: Use pcie_flr() instead of reimplementing it Denis Efremov
2019-08-08  9:25 ` Andrew Murray
2019-08-08 18:48 ` Bjorn Helgaas [this message]
2019-08-09  5:41 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190808184854.GH151852@google.com \
    --to=helgaas@kernel$(echo .)org \
    --cc=bjorn.helgaas@gmail$(echo .)com \
    --cc=dchickles@marvell$(echo .)com \
    --cc=efremov@linux$(echo .)com \
    --cc=fmanlunas@marvell$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-pci@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sburla@marvell$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox