From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>, davem@davemloft.net
Cc: Don Skidmore <donald.c.skidmore@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
jogreene@redhat.com
Subject: Re: [net-next 6/9] ixgbe: fix X540 Completion timeout
Date: Fri, 07 Nov 2014 17:35:04 +0300 [thread overview]
Message-ID: <545CD898.7060403@cogentembedded.com> (raw)
In-Reply-To: <1415350670-15333-7-git-send-email-jeffrey.t.kirsher@intel.com>
Hello.
On 11/7/2014 11:57 AM, Jeff Kirsher wrote:
> From: Don Skidmore <donald.c.skidmore@intel.com>
> On topologies including few levels of PCIe switching X540 can run into an
> unexpected completion error. We get around this by waiting after enabling
> loopback a sufficient amount of time until Tx Data Fetch is sent. We then
> poll the pending transaction bit to ensure we received the completion. Only
> then do we go on to clear the buffers.
> Signed-of-by: Don Skidmore <donald.c.skidmore@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
> index b5f484b..e314b53 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
[...]
> @@ -3600,6 +3601,24 @@ void ixgbe_clear_tx_pending(struct ixgbe_hw *hw)
> hlreg0 = IXGBE_READ_REG(hw, IXGBE_HLREG0);
> IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0 | IXGBE_HLREG0_LPBK);
>
> + /* wait for a last completion before clearing buffers */
> + IXGBE_WRITE_FLUSH(hw);
> + usleep_range(3000, 6000);
> +
> + /* Before proceeding, make sure that the PCIe block does not have
> + * transactions pending.
> + */
> + poll = ixgbe_pcie_timeout_poll(hw);
> + for (i = 0; i < poll; i++) {
> + usleep_range(100, 200);
> + value = ixgbe_read_pci_cfg_word(hw, IXGBE_PCI_DEVICE_STATUS);
> + if (ixgbe_removed(hw->hw_addr))
> + goto out;
Why not just *break*?
> + if (!(value & IXGBE_PCI_DEVICE_STATUS_TRANSACTION_PENDING))
> + goto out;
Likewise.
> + }
> +
> +out:
> /* initiate cleaning flow for buffers in the PCIe transaction layer */
> gcr_ext = IXGBE_READ_REG(hw, IXGBE_GCR_EXT);
> IXGBE_WRITE_REG(hw, IXGBE_GCR_EXT,
WBR, Sergei
next prev parent reply other threads:[~2014-11-07 14:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 8:57 [net-next 0/9][pull request] Intel Wired LAN Driver Updates 2014-11-07 Jeff Kirsher
2014-11-07 8:57 ` [net-next 1/9] i40e: poll firmware slower Jeff Kirsher
2014-11-07 9:40 ` David Laight
2014-11-07 22:58 ` Jesse Brandeburg
2014-11-07 13:29 ` Or Gerlitz
2014-11-07 23:02 ` Jesse Brandeburg
2014-11-07 8:57 ` [net-next 2/9] i40e: don't do link_status or stats collection on every ARQ Jeff Kirsher
2014-11-07 8:57 ` [net-next 3/9] i40e: clean up throttle rate code Jeff Kirsher
2014-11-07 8:57 ` [net-next 4/9] i40evf: make early init processing more robust Jeff Kirsher
2014-11-07 8:57 ` [net-next 5/9] i40evf: don't use more queues than CPUs Jeff Kirsher
2014-11-07 8:57 ` [net-next 6/9] ixgbe: fix X540 Completion timeout Jeff Kirsher
2014-11-07 14:35 ` Sergei Shtylyov [this message]
2014-11-07 17:06 ` Skidmore, Donald C
2014-11-07 8:57 ` [net-next 7/9] ixgbe: cleanup ixgbe_ndo_set_vf_vlan Jeff Kirsher
2014-11-07 8:57 ` [net-next 8/9] ixgbe: cleanup move setting PFQDE.HIDE_VLAN to support function Jeff Kirsher
2014-11-07 8:57 ` [net-next 9/9] ixgbe: Add new support for X550 MAC's Jeff Kirsher
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=545CD898.7060403@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--cc=donald.c.skidmore@intel.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jogreene@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=sassmann@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.