Commit cf4103c6 authored by Fuyun Liang's avatar Fuyun Liang Committed by David S. Miller

net: hns3: Fix for using wrong mask and shift in hclge_get_ring_chain_from_mbx

HCLGE_INT_GL_IDX_M and HCLGE_INT_GL_IDX_S are used to set fireware
cmd. When getting int_gl value from mailbox message, we should use
HNAE3_RING_GL_IDX_M and HNAE3_RING_GL_IDX_S.

Fixes: 79eee410 ("net: hns3: add int_gl_idx setup for VF")
Signed-off-by: default avatarFuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 82b53214
...@@ -131,8 +131,8 @@ static int hclge_get_ring_chain_from_mbx( ...@@ -131,8 +131,8 @@ static int hclge_get_ring_chain_from_mbx(
hnae3_set_bit(ring_chain->flag, HNAE3_RING_TYPE_B, req->msg[3]); hnae3_set_bit(ring_chain->flag, HNAE3_RING_TYPE_B, req->msg[3]);
ring_chain->tqp_index = ring_chain->tqp_index =
hclge_get_queue_id(vport->nic.kinfo.tqp[req->msg[4]]); hclge_get_queue_id(vport->nic.kinfo.tqp[req->msg[4]]);
hnae3_set_field(ring_chain->int_gl_idx, HCLGE_INT_GL_IDX_M, hnae3_set_field(ring_chain->int_gl_idx, HNAE3_RING_GL_IDX_M,
HCLGE_INT_GL_IDX_S, HNAE3_RING_GL_IDX_S,
req->msg[5]); req->msg[5]);
cur_chain = ring_chain; cur_chain = ring_chain;
...@@ -151,8 +151,8 @@ static int hclge_get_ring_chain_from_mbx( ...@@ -151,8 +151,8 @@ static int hclge_get_ring_chain_from_mbx(
[req->msg[HCLGE_MBX_RING_NODE_VARIABLE_NUM * i + [req->msg[HCLGE_MBX_RING_NODE_VARIABLE_NUM * i +
HCLGE_MBX_RING_MAP_BASIC_MSG_NUM + 1]]); HCLGE_MBX_RING_MAP_BASIC_MSG_NUM + 1]]);
hnae3_set_field(new_chain->int_gl_idx, HCLGE_INT_GL_IDX_M, hnae3_set_field(new_chain->int_gl_idx, HNAE3_RING_GL_IDX_M,
HCLGE_INT_GL_IDX_S, HNAE3_RING_GL_IDX_S,
req->msg[HCLGE_MBX_RING_NODE_VARIABLE_NUM * i + req->msg[HCLGE_MBX_RING_NODE_VARIABLE_NUM * i +
HCLGE_MBX_RING_MAP_BASIC_MSG_NUM + 2]); HCLGE_MBX_RING_MAP_BASIC_MSG_NUM + 2]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment