Unverified Commit f5b5878c authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5845 [OLK 5.10] bugfixes of vf id of mailbox and port duplex configure

Merge Pull Request from: @ZachXue 
 
| Commit id                                | Description                                  |
|------------------------------------------|----------------------------------------------|
| 4e2969a0d6a7549bc0bc1ebc990588b622c4443d (mainline v6.9-rc1) | net: hns3: add checking for vf id of mailbox |
| 11d80f79dd9f871a52feba4bf24b5ac39f448eb7 (mainline v6.9-rc1)| net: hns3: fix port duplex configure error in IMP reset| 
 
Link:https://gitee.com/openeuler/kernel/pulls/5845

 

Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents dd1b2b2e a3a35987
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2911,7 +2911,10 @@ static int hclge_mac_init(struct hclge_dev *hdev)
	hclge_roh_convert_mac_addr(hdev);

	hdev->support_sfp_query = true;

	if (!test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state))
		hdev->hw.mac.duplex = HCLGE_MAC_FULL;

	ret = hclge_cfg_mac_speed_dup_hw(hdev, hdev->hw.mac.speed,
					 hdev->hw.mac.duplex,
					 hdev->hw.mac.lane_num);
+4 −3
Original line number Diff line number Diff line
@@ -1217,10 +1217,11 @@ void hclge_mbx_handler(struct hclge_dev *hdev)
		req = (struct hclge_mbx_vf_to_pf_cmd *)desc->data;

		flag = le16_to_cpu(crq->desc[crq->next_to_use].flag);
		if (unlikely(!hnae3_get_bit(flag, HCLGE_CMDQ_RX_OUTVLD_B))) {
		if (unlikely(!hnae3_get_bit(flag, HCLGE_CMDQ_RX_OUTVLD_B) ||
			     req->mbx_src_vfid > hdev->num_req_vfs)) {
			dev_warn(&hdev->pdev->dev,
				 "dropped invalid mailbox message, code = %u\n",
				 req->msg.code);
				 "dropped invalid mailbox message, code = %u, vfid = %u\n",
				 req->msg.code, req->mbx_src_vfid);

			/* dropping/not processing this invalid message */
			crq->desc[crq->next_to_use].flag = 0;