All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Beilei Xing <beilei.xing@intel.com>, helin.zhang@intel.com
Cc: dev@dpdk.org
Subject: Re: [PATCH 18/29] ixgbe/base: update swfw semaphore function
Date: Mon, 13 Jun 2016 17:28:23 +0100	[thread overview]
Message-ID: <575EDF27.4090305@intel.com> (raw)
In-Reply-To: <1462514861-29419-19-git-send-email-beilei.xing@intel.com>

On 5/6/2016 7:07 AM, Beilei Xing wrote:
> For X540 and forward it is possible if a system reset occur at the
> right time to leave the SWFW semaphore high. This new function will
> attempt to grab and release the semaphore. If the grab times out it
> will still release the semaphore placing it in a known good state.
> The idea is to call this when you know no one should be holding the
> semaphore (i.e. probe time)
> This patch alse fixes possible race issue between ports when issuing
> host interface command by acquiring/releasing the management host
> interface semaphore in ixgbe_host_interface_command.
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> ---
Does it make sense to separate this patch into two.

...

> +/**
> + *  ixgbe_init_swfw_semaphore - Clean up SWFW semaphore
> + *  @hw: pointer to hardware structure
> + *
> + *  Attempts to acquire the SWFW semaphore through SW_FW_SYNC register.
> + *  Regardless of whether is succeeds or not it then release the semaphore.
> + *  This is function is called to recover from catastrophic failures that
> + *  may have left the semaphore locked.
> + **/
> +void ixgbe_init_swfw_semaphore(struct ixgbe_hw *hw)
> +{
> +	if (hw->mac.ops.init_swfw_sync)
> +		hw->mac.ops.init_swfw_sync(hw);
> +}
One add ixgbe_init_swfw_semaphore related code (init_swfw_sync,
ixgbe_init_swfw_sync_X540)

...

> @@ -4390,6 +4392,12 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
>  		DEBUGOUT1("Buffer length failure buffersize=%d.\n", length);
>  		return IXGBE_ERR_HOST_INTERFACE_COMMAND;
>  	}
> +	/* Take management host interface semaphore */
> +	status = hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_SW_MNG_SM);
> +
> +	if (status)
> +		return status;
> +
Second is fix in ixgbe_host_interface_command, they are unrelated as far
as I can see.

>  	/* Set bit 9 of FWSTS clearing FW reset indication */
>  	fwsts = IXGBE_READ_REG(hw, IXGBE_FWSTS);
>  	IXGBE_WRITE_REG(hw, IXGBE_FWSTS, fwsts | IXGBE_FWSTS_FWRI);
...

  parent reply	other threads:[~2016-06-13 16:28 UTC|newest]

Thread overview: 142+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06  6:07 [PATCH 00/29] ixgbe/base: update base driver Beilei Xing
2016-05-06  6:07 ` [PATCH 01/29] ixgbe/base: add new VF requests for mailbox API Beilei Xing
2016-05-19  7:41   ` Gu, YongjieX
2016-05-06  6:07 ` [PATCH 02/29] ixgbe/base: add sgmii link for X550 Beilei Xing
2016-06-13 16:27   ` Ferruh Yigit
2016-05-06  6:07 ` [PATCH 03/29] ixgbe/base: fix problematic return value Beilei Xing
2016-05-06  6:07 ` [PATCH 04/29] ixgbe/base: add mac link setup for x550a SFP Beilei Xing
2016-05-06  6:07 ` [PATCH 05/29] ixgbe/base: fix checksum error of checking PHY token Beilei Xing
2016-05-06  6:07 ` [PATCH 06/29] ixgbe/base: refactor eee setup for x550 Beilei Xing
2016-05-06  6:07 ` [PATCH 07/29] ixgbe/base: change access method Beilei Xing
2016-05-06  6:07 ` [PATCH 08/29] ixgbe/base: add KR support for X550EM_A devices Beilei Xing
2016-05-06  6:07 ` [PATCH 09/29] ixgbe/base: add link mac setup for x550a SFP+ Beilei Xing
2016-05-06  6:07 ` [PATCH 10/29] ixgbe/base: clear stale pool mappings Beilei Xing
2016-05-06  6:07 ` [PATCH 11/29] ixgbe/base: rename macro of TDL Beilei Xing
2016-05-06  6:07 ` [PATCH 12/29] ixgbe/base: fix error path to release lock Beilei Xing
2016-05-06  6:07 ` [PATCH 13/29] ixgbe/base: refactor NW management interface ops Beilei Xing
2016-05-06  6:07 ` [PATCH 14/29] ixgbe/base: fix for code style Beilei Xing
2016-05-06  6:07 ` [PATCH 15/29] ixgbe/base: fix firmware commands on x550em_a Beilei Xing
2016-05-06  6:07 ` [PATCH 16/29] ixgbe/base: add new phy definitions Beilei Xing
2016-05-06  6:07 ` [PATCH 17/29] ixgbe/base: change device IDs Beilei Xing
2016-05-06  6:07 ` [PATCH 18/29] ixgbe/base: update swfw semaphore function Beilei Xing
2016-06-13 16:26   ` Ferruh Yigit
2016-06-13 16:28   ` Ferruh Yigit [this message]
2016-05-06  6:07 ` [PATCH 19/29] ixgbe/base: fix register access error Beilei Xing
2016-05-06  6:07 ` [PATCH 20/29] ixgbe/base: limit PHY token accessing to MDIO only Beilei Xing
2016-05-06  6:07 ` [PATCH 21/29] ixgbe/base: smplify add/remove VLANs Beilei Xing
2016-06-13 16:26   ` Ferruh Yigit
2016-05-06  6:07 ` [PATCH 22/29] ixgbe/base: add bypassing VLVF Beilei Xing
2016-06-13 14:46   ` Ferruh Yigit
2016-05-06  6:07 ` [PATCH 23/29] ixgbe/base: unify coding style Beilei Xing
2016-05-06  6:07 ` [PATCH 24/29] ixgbe/base: use u8 to replace u16 for a variable Beilei Xing
2016-05-06  6:07 ` [PATCH 25/29] ixgbe/base: fix endianness issues Beilei Xing
2016-05-06  6:07 ` [PATCH 26/29] ixgbe/base: allow setting mac anti spoofing per vf Beilei Xing
2016-05-06  6:07 ` [PATCH 27/29] ixgbe/base: add flow control autoneg for x550a Beilei Xing
2016-05-06  6:07 ` [PATCH 28/29] ixgbe/base: define if enable crosstalk work around Beilei Xing
2016-06-13 16:27   ` Ferruh Yigit
2016-05-06  6:07 ` [PATCH 29/29] ixgbe/base: update README Beilei Xing
2016-06-13 16:28   ` Ferruh Yigit
2016-06-14  1:00     ` Xing, Beilei
2016-06-06  1:24 ` [PATCH 00/29] ixgbe/base: update base driver Zhang, Helin
2016-06-14  6:59 ` [PATCH v2 00/30] " Beilei Xing
2016-06-14  6:59   ` [PATCH v2 01/30] ixgbe/base: add new VF requests for mailbox API Beilei Xing
2016-06-14  6:59   ` [PATCH v2 02/30] ixgbe/base: add sgmii link for X550 Beilei Xing
2016-06-14  6:59   ` [PATCH v2 03/30] ixgbe/base: fix problematic return value Beilei Xing
2016-06-14  6:59   ` [PATCH v2 04/30] ixgbe/base: add mac link setup for x550a SFP Beilei Xing
2016-06-14  6:59   ` [PATCH v2 05/30] ixgbe/base: fix checksum error of checking PHY token Beilei Xing
2016-06-14  6:59   ` [PATCH v2 06/30] ixgbe/base: refactor eee setup for x550 Beilei Xing
2016-06-14  6:59   ` [PATCH v2 07/30] ixgbe/base: change access method Beilei Xing
2016-06-14  6:59   ` [PATCH v2 08/30] ixgbe/base: add KR support for X550EM_A devices Beilei Xing
2016-06-14  6:59   ` [PATCH v2 09/30] ixgbe/base: add link mac setup for x550a SFP+ Beilei Xing
2016-06-14  6:59   ` [PATCH v2 10/30] ixgbe/base: clear stale pool mappings Beilei Xing
2016-06-14  6:59   ` [PATCH v2 11/30] ixgbe/base: rename macro of TDL Beilei Xing
2016-06-14  6:59   ` [PATCH v2 12/30] ixgbe/base: fix error path to release lock Beilei Xing
2016-06-14  6:59   ` [PATCH v2 13/30] ixgbe/base: fix for code style Beilei Xing
2016-06-14  6:59   ` [PATCH v2 14/30] ixgbe/base: fix firmware commands on x550em_a Beilei Xing
2016-06-14  6:59   ` [PATCH v2 15/30] ixgbe/base: refactor NW management interface ops Beilei Xing
2016-06-14  6:59   ` [PATCH v2 16/30] ixgbe/base: add new phy definitions Beilei Xing
2016-06-14  6:59   ` [PATCH v2 17/30] ixgbe/base: change device IDs Beilei Xing
2016-06-14  6:59   ` [PATCH v2 18/30] ixgbe/base: add function to reset swfw semaphore Beilei Xing
2016-06-14  6:59   ` [PATCH v2 19/30] ixgbe/base: fix possible race issue Beilei Xing
2016-06-14  6:59   ` [PATCH v2 20/30] ixgbe/base: fix register access error Beilei Xing
2016-06-14  6:59   ` [PATCH v2 21/30] ixgbe/base: limit PHY token accessing to MDIO only Beilei Xing
2016-06-14  6:59   ` [PATCH v2 22/30] ixgbe/base: simplify add/remove VLANs Beilei Xing
2016-06-14  6:59   ` [PATCH v2 23/30] ixgbe/base: add bypassing VLVF Beilei Xing
2016-06-14  6:59   ` [PATCH v2 24/30] ixgbe/base: unify coding style Beilei Xing
2016-06-14  6:59   ` [PATCH v2 25/30] ixgbe/base: use u8 to replace u16 for a variable Beilei Xing
2016-06-14  6:59   ` [PATCH v2 26/30] ixgbe/base: fix endianness issues Beilei Xing
2016-06-14  6:59   ` [PATCH v2 27/30] ixgbe/base: allow setting mac anti spoofing per vf Beilei Xing
2016-06-14  6:59   ` [PATCH v2 28/30] ixgbe/base: add flow control autoneg for x550a Beilei Xing
2016-06-14  6:59   ` [PATCH v2 29/30] ixgbe/base: define if enable crosstalk work around Beilei Xing
2016-06-14  6:59   ` [PATCH v2 30/30] ixgbe/base: update README Beilei Xing
2016-06-14 10:36   ` [PATCH v2 00/30] ixgbe/base: update base driver Ferruh Yigit
2016-06-14 10:54     ` Ferruh Yigit
2016-06-15  2:56       ` Xing, Beilei
2016-06-15  8:07         ` Thomas Monjalon
2016-06-15  7:53   ` [PATCH v3 00/30] Beilei Xing
2016-06-15  7:53     ` [PATCH v3 01/30] ixgbe/base: add new VF requests for mailbox API Beilei Xing
2016-06-21 14:39       ` Bruce Richardson
2016-06-15  7:53     ` [PATCH v3 02/30] ixgbe/base: add sgmii link for X550 Beilei Xing
2016-06-21 14:40       ` Bruce Richardson
2016-06-15  7:53     ` [PATCH v3 03/30] ixgbe/base: fix problematic return value Beilei Xing
2016-06-15  7:53     ` [PATCH v3 04/30] ixgbe/base: add MAC link setup for X550a SFP Beilei Xing
2016-06-15  7:53     ` [PATCH v3 05/30] ixgbe/base: fix checksum error of checking PHY token Beilei Xing
2016-06-21 14:35       ` Bruce Richardson
2016-06-15  7:53     ` [PATCH v3 06/30] ixgbe/base: refactor eee setup for X550 Beilei Xing
2016-06-15  7:53     ` [PATCH v3 07/30] ixgbe/base: change access method Beilei Xing
2016-06-15  7:53     ` [PATCH v3 08/30] ixgbe/base: add KR support for X550em_a devices Beilei Xing
2016-06-21 14:53       ` Bruce Richardson
2016-06-15  7:53     ` [PATCH v3 09/30] ixgbe/base: add link MAC setup for X550a SFP+ Beilei Xing
2016-06-15  7:53     ` [PATCH v3 10/30] ixgbe/base: clear stale pool mappings Beilei Xing
2016-06-15  7:53     ` [PATCH v3 11/30] ixgbe/base: rename macro of TDL Beilei Xing
2016-06-15  7:53     ` [PATCH v3 12/30] ixgbe/base: fix error path to release lock Beilei Xing
2016-06-15  7:53     ` [PATCH v3 13/30] ixgbe/base: fix for code style Beilei Xing
2016-06-15  7:53     ` [PATCH v3 14/30] ixgbe/base: fix firmware commands on X550em_a Beilei Xing
2016-06-15  7:53     ` [PATCH v3 15/30] ixgbe/base: refactor NW management interface ops Beilei Xing
2016-06-21 16:19       ` Bruce Richardson
2016-06-15  7:53     ` [PATCH v3 16/30] ixgbe/base: add new phy definitions Beilei Xing
2016-06-15  7:53     ` [PATCH v3 17/30] ixgbe/base: change device IDs Beilei Xing
2016-06-15  7:53     ` [PATCH v3 18/30] ixgbe/base: add function to reset swfw semaphore Beilei Xing
2016-06-15  7:53     ` [PATCH v3 19/30] ixgbe/base: fix possible race issue Beilei Xing
2016-06-15  7:53     ` [PATCH v3 20/30] ixgbe/base: fix register access error Beilei Xing
2016-06-15  7:53     ` [PATCH v3 21/30] ixgbe/base: limit PHY token accessing to MDIO only Beilei Xing
2016-06-15  7:53     ` [PATCH v3 22/30] ixgbe/base: simplify add/remove VLANs Beilei Xing
2016-06-15  7:53     ` [PATCH v3 23/30] ixgbe/base: add bypassing VLVF Beilei Xing
2016-06-15  7:53     ` [PATCH v3 24/30] ixgbe/base: unify coding style Beilei Xing
2016-06-15  7:53     ` [PATCH v3 25/30] ixgbe/base: use u8 to replace u16 for a variable Beilei Xing
2016-06-15  7:53     ` [PATCH v3 26/30] ixgbe/base: fix endianness issues Beilei Xing
2016-06-15  7:53     ` [PATCH v3 27/30] ixgbe/base: allow setting MAC anti spoofing per VF Beilei Xing
2016-06-15  7:53     ` [PATCH v3 28/30] ixgbe/base: add flow control autoneg for X550a Beilei Xing
2016-06-15  7:53     ` [PATCH v3 29/30] ixgbe/base: define if enable crosstalk work around Beilei Xing
2016-06-15  7:53     ` [PATCH v3 30/30] ixgbe/base: update README Beilei Xing
2016-06-23  7:22     ` [PATCH v4 00/29] ixgbe/base: update base driver Beilei Xing
2016-06-23  7:22       ` [PATCH v4 01/29] ixgbe/base: add new VF requests for mailbox API Beilei Xing
2016-06-23  7:22       ` [PATCH v4 02/29] ixgbe/base: add sgmii link for X550 Beilei Xing
2016-06-23  7:22       ` [PATCH v4 03/29] ixgbe/base: fix problematic return value Beilei Xing
2016-06-23  7:22       ` [PATCH v4 04/29] ixgbe/base: add MAC link setup for X550a SFP Beilei Xing
2016-06-23  7:22       ` [PATCH v4 05/29] ixgbe/base: fix firmware command checksum error Beilei Xing
2016-06-23  7:22       ` [PATCH v4 06/29] ixgbe/base: refactor eee setup for X550 Beilei Xing
2016-06-23  7:22       ` [PATCH v4 07/29] ixgbe/base: add KR support for X550em_a devices Beilei Xing
2016-06-23  7:22       ` [PATCH v4 08/29] ixgbe/base: change access method Beilei Xing
2016-06-23  7:22       ` [PATCH v4 09/29] ixgbe/base: add link MAC setup for X550a SFP+ Beilei Xing
2016-06-23  7:22       ` [PATCH v4 10/29] ixgbe/base: clear stale pool mappings Beilei Xing
2016-06-23  7:22       ` [PATCH v4 11/29] ixgbe/base: rename macro of TDL Beilei Xing
2016-06-23  7:22       ` [PATCH v4 12/29] ixgbe/base: fix error path to release lock Beilei Xing
2016-06-23  7:22       ` [PATCH v4 13/29] ixgbe/base: fix for code style Beilei Xing
2016-06-23  7:22       ` [PATCH v4 14/29] ixgbe/base: optimize internal PHY mode determination Beilei Xing
2016-06-23  7:22       ` [PATCH v4 15/29] ixgbe/base: add new phy definitions Beilei Xing
2016-06-23  7:22       ` [PATCH v4 16/29] ixgbe/base: change device IDs Beilei Xing
2016-06-23  7:22       ` [PATCH v4 17/29] ixgbe/base: add function to reset swfw semaphore Beilei Xing
2016-06-23  7:22       ` [PATCH v4 18/29] ixgbe/base: fix possible race issue Beilei Xing
2016-06-23  7:22       ` [PATCH v4 19/29] ixgbe/base: fix register access error Beilei Xing
2016-06-23  7:22       ` [PATCH v4 20/29] ixgbe/base: limit PHY token accessing to MDIO only Beilei Xing
2016-06-23  7:22       ` [PATCH v4 21/29] ixgbe/base: simplify add/remove VLANs Beilei Xing
2016-06-23  7:22       ` [PATCH v4 22/29] ixgbe/base: add bypassing VLVF Beilei Xing
2016-06-23  7:22       ` [PATCH v4 23/29] ixgbe/base: unify coding style Beilei Xing
2016-06-23  7:22       ` [PATCH v4 24/29] ixgbe/base: use u8 to replace u16 for a variable Beilei Xing
2016-06-23  7:22       ` [PATCH v4 25/29] ixgbe/base: fix endianness issues Beilei Xing
2016-06-23  7:22       ` [PATCH v4 26/29] ixgbe/base: allow setting MAC anti spoofing per VF Beilei Xing
2016-06-23  7:22       ` [PATCH v4 27/29] ixgbe/base: add flow control autoneg for X550a Beilei Xing
2016-06-23  7:22       ` [PATCH v4 28/29] ixgbe/base: define if enable crosstalk work around Beilei Xing
2016-06-23  7:22       ` [PATCH v4 29/29] ixgbe/base: update README Beilei Xing
2016-06-27 14:20       ` [PATCH v4 00/29] ixgbe/base: update base driver Bruce Richardson

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=575EDF27.4090305@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.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.