mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
net: hns3: restore user pause configure when disable autoneg
[ Upstream commit 15159ec0c8 ]
Restore the mac pause state to user configuration when autoneg is disabled
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peiyang Wang <wangpeiyang1@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20230807113452.474224-2-shaojijie@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c61d104612
commit
f20bee49dc
@@ -10936,9 +10936,12 @@ int hclge_cfg_flowctrl(struct hclge_dev *hdev)
|
|||||||
u32 rx_pause, tx_pause;
|
u32 rx_pause, tx_pause;
|
||||||
u8 flowctl;
|
u8 flowctl;
|
||||||
|
|
||||||
if (!phydev->link || !phydev->autoneg)
|
if (!phydev->link)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (!phydev->autoneg)
|
||||||
|
return hclge_mac_pause_setup_hw(hdev);
|
||||||
|
|
||||||
local_advertising = linkmode_adv_to_lcl_adv_t(phydev->advertising);
|
local_advertising = linkmode_adv_to_lcl_adv_t(phydev->advertising);
|
||||||
|
|
||||||
if (phydev->pause)
|
if (phydev->pause)
|
||||||
|
|||||||
@@ -1549,7 +1549,7 @@ static int hclge_bp_setup_hw(struct hclge_dev *hdev, u8 tc)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hclge_mac_pause_setup_hw(struct hclge_dev *hdev)
|
int hclge_mac_pause_setup_hw(struct hclge_dev *hdev)
|
||||||
{
|
{
|
||||||
bool tx_en, rx_en;
|
bool tx_en, rx_en;
|
||||||
|
|
||||||
|
|||||||
@@ -242,6 +242,7 @@ int hclge_pfc_pause_en_cfg(struct hclge_dev *hdev, u8 tx_rx_bitmap,
|
|||||||
u8 pfc_bitmap);
|
u8 pfc_bitmap);
|
||||||
int hclge_mac_pause_en_cfg(struct hclge_dev *hdev, bool tx, bool rx);
|
int hclge_mac_pause_en_cfg(struct hclge_dev *hdev, bool tx, bool rx);
|
||||||
int hclge_pause_addr_cfg(struct hclge_dev *hdev, const u8 *mac_addr);
|
int hclge_pause_addr_cfg(struct hclge_dev *hdev, const u8 *mac_addr);
|
||||||
|
int hclge_mac_pause_setup_hw(struct hclge_dev *hdev);
|
||||||
void hclge_pfc_rx_stats_get(struct hclge_dev *hdev, u64 *stats);
|
void hclge_pfc_rx_stats_get(struct hclge_dev *hdev, u64 *stats);
|
||||||
void hclge_pfc_tx_stats_get(struct hclge_dev *hdev, u64 *stats);
|
void hclge_pfc_tx_stats_get(struct hclge_dev *hdev, u64 *stats);
|
||||||
int hclge_tm_qs_shaper_cfg(struct hclge_vport *vport, int max_tx_rate);
|
int hclge_tm_qs_shaper_cfg(struct hclge_vport *vport, int max_tx_rate);
|
||||||
|
|||||||
Reference in New Issue
Block a user