Commit 598ab4b1 authored by Paolo Abeni's avatar Paolo Abeni

Merge branch 'net-hns3-this-series-bugfix-for-the-hns3-ethernet-driver'

Hao Lan says:

====================
net: hns3: This series bugfix for the HNS3 ethernet driver.

This series includes some bugfix for the HNS3 ethernet driver.
Patch 1# fix incorrect hw rss hash type of rx packet.
Fixes: 79664077 ("net: hns3: support RXD advanced layout")
Fixes: 232fc64b ("net: hns3: Add HW RSS hash information to RX skb")
Fixes: ea485867 ("net: hns3: handle the BD info on the last BD of the packet")

Patch 2# fix return value check bug of rx copybreak.
Fixes: e74a726d ("net: hns3: refactor hns3_nic_reuse_page()")
Fixes: 99f6b5fb ("net: hns3: use bounce buffer when rx page can not be reused")

Patch 3# net: hns3: fix setting incorrect phy link ksettings
 for firmware in resetting process
Fixes: f5f2b3e4 ("net: hns3: add support for imp-controlled PHYs")
Fixes: c5ef83cb ("net: hns3: fix for phy_addr error in hclge_mac_mdio_config")
Fixes: 2312e050 ("net: hns3: Fix for deadlock problem occurring when unregistering ae_algo")
====================

Link: https://lore.kernel.org/r/20221114082048.49450-1-lanhao@huawei.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents 18c532e4 510d7b6a
......@@ -819,7 +819,6 @@ struct hnae3_knic_private_info {
const struct hnae3_dcb_ops *dcb_ops;
u16 int_rl_setting;
enum pkt_hash_types rss_type;
void __iomem *io_base;
};
......
......@@ -191,23 +191,6 @@ u32 hclge_comm_get_rss_key_size(struct hnae3_handle *handle)
return HCLGE_COMM_RSS_KEY_SIZE;
}
void hclge_comm_get_rss_type(struct hnae3_handle *nic,
struct hclge_comm_rss_tuple_cfg *rss_tuple_sets)
{
if (rss_tuple_sets->ipv4_tcp_en ||
rss_tuple_sets->ipv4_udp_en ||
rss_tuple_sets->ipv4_sctp_en ||
rss_tuple_sets->ipv6_tcp_en ||
rss_tuple_sets->ipv6_udp_en ||
rss_tuple_sets->ipv6_sctp_en)
nic->kinfo.rss_type = PKT_HASH_TYPE_L4;
else if (rss_tuple_sets->ipv4_fragment_en ||
rss_tuple_sets->ipv6_fragment_en)
nic->kinfo.rss_type = PKT_HASH_TYPE_L3;
else
nic->kinfo.rss_type = PKT_HASH_TYPE_NONE;
}
int hclge_comm_parse_rss_hfunc(struct hclge_comm_rss_cfg *rss_cfg,
const u8 hfunc, u8 *hash_algo)
{
......@@ -344,9 +327,6 @@ int hclge_comm_set_rss_input_tuple(struct hnae3_handle *nic,
req->ipv6_sctp_en = rss_cfg->rss_tuple_sets.ipv6_sctp_en;
req->ipv6_fragment_en = rss_cfg->rss_tuple_sets.ipv6_fragment_en;
if (is_pf)
hclge_comm_get_rss_type(nic, &rss_cfg->rss_tuple_sets);
ret = hclge_comm_cmd_send(hw, &desc, 1);
if (ret)
dev_err(&hw->cmq.csq.pdev->dev,
......
......@@ -95,8 +95,6 @@ struct hclge_comm_rss_tc_mode_cmd {
};
u32 hclge_comm_get_rss_key_size(struct hnae3_handle *handle);
void hclge_comm_get_rss_type(struct hnae3_handle *nic,
struct hclge_comm_rss_tuple_cfg *rss_tuple_sets);
void hclge_comm_rss_indir_init_cfg(struct hnae3_ae_dev *ae_dev,
struct hclge_comm_rss_cfg *rss_cfg);
int hclge_comm_get_rss_tuple(struct hclge_comm_rss_cfg *rss_cfg, int flow_type,
......
......@@ -404,6 +404,7 @@ struct hns3_rx_ptype {
u32 ip_summed : 2;
u32 l3_type : 4;
u32 valid : 1;
u32 hash_type: 3;
};
struct ring_stats {
......
......@@ -3443,6 +3443,7 @@ static int hclge_update_tp_port_info(struct hclge_dev *hdev)
hdev->hw.mac.autoneg = cmd.base.autoneg;
hdev->hw.mac.speed = cmd.base.speed;
hdev->hw.mac.duplex = cmd.base.duplex;
linkmode_copy(hdev->hw.mac.advertising, cmd.link_modes.advertising);
return 0;
}
......@@ -4859,7 +4860,6 @@ static int hclge_set_rss_tuple(struct hnae3_handle *handle,
return ret;
}
hclge_comm_get_rss_type(&vport->nic, &hdev->rss_cfg.rss_tuple_sets);
return 0;
}
......@@ -11587,9 +11587,12 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev)
if (ret)
goto err_msi_irq_uninit;
if (hdev->hw.mac.media_type == HNAE3_MEDIA_TYPE_COPPER &&
!hnae3_dev_phy_imp_supported(hdev)) {
ret = hclge_mac_mdio_config(hdev);
if (hdev->hw.mac.media_type == HNAE3_MEDIA_TYPE_COPPER) {
if (hnae3_dev_phy_imp_supported(hdev))
ret = hclge_update_tp_port_info(hdev);
else
ret = hclge_mac_mdio_config(hdev);
if (ret)
goto err_msi_irq_uninit;
}
......
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