Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f18f0d4d authored by Peng Li's avatar Peng Li Committed by David S. Miller
Browse files

net: hns3: fix endian issue when PF get mbx message flag



This patch fixes the endian issue when PF get mbx message flag.

Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 090e3b53
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -333,11 +333,11 @@ void hclge_mbx_handler(struct hclge_dev *hdev)
	struct hclge_mbx_vf_to_pf_cmd *req;
	struct hclge_vport *vport;
	struct hclge_desc *desc;
	int ret;
	int ret, flag;

	flag = le16_to_cpu(crq->desc[crq->next_to_use].flag);
	/* handle all the mailbox requests in the queue */
	while (hnae_get_bit(crq->desc[crq->next_to_use].flag,
			    HCLGE_CMDQ_RX_OUTVLD_B)) {
	while (hnae_get_bit(flag, HCLGE_CMDQ_RX_OUTVLD_B)) {
		desc = &crq->desc[crq->next_to_use];
		req = (struct hclge_mbx_vf_to_pf_cmd *)desc->data;

@@ -412,6 +412,7 @@ void hclge_mbx_handler(struct hclge_dev *hdev)
		}
		crq->desc[crq->next_to_use].flag = 0;
		hclge_mbx_ring_ptr_move_crq(crq);
		flag = le16_to_cpu(crq->desc[crq->next_to_use].flag);
	}

	/* Write back CMDQ_RQ header pointer, M7 need this pointer */