Patch "net: hns3: fix VF wrong speed and duplex issue" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: hns3: fix VF wrong speed and duplex issue

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-hns3-fix-vf-wrong-speed-and-duplex-issue.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9292159a35211a7f01725febc94d147c6e604811
Author: Jijie Shao <shaojijie@xxxxxxxxxx>
Date:   Fri Nov 10 17:37:13 2023 +0800

    net: hns3: fix VF wrong speed and duplex issue
    
    [ Upstream commit dff655e82faffc287d4a72a59f66fa120bf904e4 ]
    
    If PF is down, firmware will returns 10 Mbit/s rate and half-duplex mode
    when PF queries the port information from firmware.
    
    After imp reset command is executed, PF status changes to down,
    and PF will query link status and updates port information
    from firmware in a periodic scheduled task.
    
    However, there is a low probability that port information is updated
    when PF is down, and then PF link status changes to up.
    In this case, PF synchronizes incorrect rate and duplex mode to VF.
    
    This patch fixes it by updating port information before
    PF synchronizes the rate and duplex to the VF
    when PF changes to up.
    
    Fixes: 18b6e31f8bf4 ("net: hns3: PF add support for pushing link status to VFs")
    Signed-off-by: Jijie Shao <shaojijie@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index af8a3e6429a75..a61d9fd732b96 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -61,6 +61,7 @@ static void hclge_sync_fd_table(struct hclge_dev *hdev);
 static void hclge_update_fec_stats(struct hclge_dev *hdev);
 static int hclge_mac_link_status_wait(struct hclge_dev *hdev, int link_ret,
 				      int wait_cnt);
+static int hclge_update_port_info(struct hclge_dev *hdev);
 
 static struct hnae3_ae_algo ae_algo;
 
@@ -3043,6 +3044,9 @@ static void hclge_update_link_status(struct hclge_dev *hdev)
 
 	if (state != hdev->hw.mac.link) {
 		hdev->hw.mac.link = state;
+		if (state == HCLGE_LINK_STATUS_UP)
+			hclge_update_port_info(hdev);
+
 		client->ops->link_status_change(handle, state);
 		hclge_config_mac_tnl_int(hdev, state);
 		if (rclient && rclient->ops->link_status_change)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux