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

Commit 75e7fb0a authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'hns-fixes'



Huazhong Tan says:

====================
net: hns: Bugfixes for HNS driver

This patchset includes bugfixes for the HNS ethernet controller driver.

Every patch is independent.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents cff1e01f bb989501
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -147,12 +147,10 @@ static void hns_ae_put_handle(struct hnae_handle *handle)
	struct hnae_vf_cb *vf_cb = hns_ae_get_vf_cb(handle);
	int i;

	vf_cb->mac_cb	 = NULL;

	kfree(vf_cb);

	for (i = 0; i < handle->q_num; i++)
		hns_ae_get_ring_pair(handle->qs[i])->used_by_vf = 0;

	kfree(vf_cb);
}

static int hns_ae_wait_flow_down(struct hnae_handle *handle)
+7 −10
Original line number Diff line number Diff line
@@ -1170,6 +1170,13 @@ int hns_nic_init_phy(struct net_device *ndev, struct hnae_handle *h)
	if (!h->phy_dev)
		return 0;

	ethtool_convert_legacy_u32_to_link_mode(supported, h->if_support);
	linkmode_and(phy_dev->supported, phy_dev->supported, supported);
	linkmode_copy(phy_dev->advertising, phy_dev->supported);

	if (h->phy_if == PHY_INTERFACE_MODE_XGMII)
		phy_dev->autoneg = false;

	if (h->phy_if != PHY_INTERFACE_MODE_XGMII) {
		phy_dev->dev_flags = 0;

@@ -1181,16 +1188,6 @@ int hns_nic_init_phy(struct net_device *ndev, struct hnae_handle *h)
	if (unlikely(ret))
		return -ENODEV;

	ethtool_convert_legacy_u32_to_link_mode(supported, h->if_support);
	linkmode_and(phy_dev->supported, phy_dev->supported, supported);
	linkmode_copy(phy_dev->advertising, phy_dev->supported);

	if (h->phy_if == PHY_INTERFACE_MODE_XGMII)
		phy_dev->autoneg = false;

	if (h->phy_if == PHY_INTERFACE_MODE_SGMII)
		phy_stop(phy_dev);

	return 0;
}