[dpdk-dev] [PATCH v3 05/30] ixgbe/base: fix checksum error of checking PHY token

2016-06-21 Thread Bruce Richardson
On Wed, Jun 15, 2016 at 03:53:15PM +0800, Beilei Xing wrote:
> This patch sets the Host Interface PHY token command
> checksum to the checksum default of 0xFF, therefore
> the checksum is not checked by the firmware. Otherwise
> the command fails with a checksum failed error.
> 

I think this needs a fuller explanation. Why does the command need a checksum,
and why is the checksum failing? I see in patch 14 makes a similar fix in the
same file, so I think perhaps those two patches should be merged - especially
since patch 14 just claims to fix firmware commands generically.

/Bruce

> Fixes: 86b8fb293fdf ("ixgbe/base: add sw-firmware sync for resource sharing 
> on X550em_a")
> 
> Signed-off-by: Beilei Xing 
> ---
>  drivers/net/ixgbe/base/ixgbe_x550.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c 
> b/drivers/net/ixgbe/base/ixgbe_x550.c
> index 8a5b1dc..36df3c3 100644
> --- a/drivers/net/ixgbe/base/ixgbe_x550.c
> +++ b/drivers/net/ixgbe/base/ixgbe_x550.c
> @@ -1041,6 +1041,7 @@ s32 ixgbe_get_phy_token(struct ixgbe_hw *hw)
>   token_cmd.hdr.cmd = FW_PHY_TOKEN_REQ_CMD;
>   token_cmd.hdr.buf_len = FW_PHY_TOKEN_REQ_LEN;
>   token_cmd.hdr.cmd_or_resp.cmd_resv = 0;
> + token_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM;
>   token_cmd.port_number = hw->bus.lan_id;
>   token_cmd.command_type = FW_PHY_TOKEN_REQ;
>   token_cmd.pad = 0;
> @@ -1071,6 +1072,7 @@ s32 ixgbe_put_phy_token(struct ixgbe_hw *hw)
>   token_cmd.hdr.cmd = FW_PHY_TOKEN_REQ_CMD;
>   token_cmd.hdr.buf_len = FW_PHY_TOKEN_REQ_LEN;
>   token_cmd.hdr.cmd_or_resp.cmd_resv = 0;
> + token_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM;
>   token_cmd.port_number = hw->bus.lan_id;
>   token_cmd.command_type = FW_PHY_TOKEN_REL;
>   token_cmd.pad = 0;
> -- 
> 2.5.0
> 


[dpdk-dev] [PATCH v3 05/30] ixgbe/base: fix checksum error of checking PHY token

2016-06-15 Thread Beilei Xing
This patch sets the Host Interface PHY token command
checksum to the checksum default of 0xFF, therefore
the checksum is not checked by the firmware. Otherwise
the command fails with a checksum failed error.

Fixes: 86b8fb293fdf ("ixgbe/base: add sw-firmware sync for resource sharing on 
X550em_a")

Signed-off-by: Beilei Xing 
---
 drivers/net/ixgbe/base/ixgbe_x550.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c 
b/drivers/net/ixgbe/base/ixgbe_x550.c
index 8a5b1dc..36df3c3 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -1041,6 +1041,7 @@ s32 ixgbe_get_phy_token(struct ixgbe_hw *hw)
token_cmd.hdr.cmd = FW_PHY_TOKEN_REQ_CMD;
token_cmd.hdr.buf_len = FW_PHY_TOKEN_REQ_LEN;
token_cmd.hdr.cmd_or_resp.cmd_resv = 0;
+   token_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM;
token_cmd.port_number = hw->bus.lan_id;
token_cmd.command_type = FW_PHY_TOKEN_REQ;
token_cmd.pad = 0;
@@ -1071,6 +1072,7 @@ s32 ixgbe_put_phy_token(struct ixgbe_hw *hw)
token_cmd.hdr.cmd = FW_PHY_TOKEN_REQ_CMD;
token_cmd.hdr.buf_len = FW_PHY_TOKEN_REQ_LEN;
token_cmd.hdr.cmd_or_resp.cmd_resv = 0;
+   token_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM;
token_cmd.port_number = hw->bus.lan_id;
token_cmd.command_type = FW_PHY_TOKEN_REL;
token_cmd.pad = 0;
-- 
2.5.0