mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
Merge branch 'hns3-fixes'
Huazhong Tan says: ==================== net: hns3: fixes for -net This series adds some bugfixes for the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
00207c7d12
3 changed files with 12 additions and 3 deletions
|
@ -575,8 +575,8 @@ static int hns3_nic_net_stop(struct net_device *netdev)
|
||||||
if (h->ae_algo->ops->set_timer_task)
|
if (h->ae_algo->ops->set_timer_task)
|
||||||
h->ae_algo->ops->set_timer_task(priv->ae_handle, false);
|
h->ae_algo->ops->set_timer_task(priv->ae_handle, false);
|
||||||
|
|
||||||
netif_tx_stop_all_queues(netdev);
|
|
||||||
netif_carrier_off(netdev);
|
netif_carrier_off(netdev);
|
||||||
|
netif_tx_disable(netdev);
|
||||||
|
|
||||||
hns3_nic_net_down(netdev);
|
hns3_nic_net_down(netdev);
|
||||||
|
|
||||||
|
@ -824,7 +824,7 @@ static int hns3_get_l4_protocol(struct sk_buff *skb, u8 *ol4_proto,
|
||||||
* and it is udp packet, which has a dest port as the IANA assigned.
|
* and it is udp packet, which has a dest port as the IANA assigned.
|
||||||
* the hardware is expected to do the checksum offload, but the
|
* the hardware is expected to do the checksum offload, but the
|
||||||
* hardware will not do the checksum offload when udp dest port is
|
* hardware will not do the checksum offload when udp dest port is
|
||||||
* 4789 or 6081.
|
* 4789, 4790 or 6081.
|
||||||
*/
|
*/
|
||||||
static bool hns3_tunnel_csum_bug(struct sk_buff *skb)
|
static bool hns3_tunnel_csum_bug(struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
|
@ -842,7 +842,8 @@ static bool hns3_tunnel_csum_bug(struct sk_buff *skb)
|
||||||
|
|
||||||
if (!(!skb->encapsulation &&
|
if (!(!skb->encapsulation &&
|
||||||
(l4.udp->dest == htons(IANA_VXLAN_UDP_PORT) ||
|
(l4.udp->dest == htons(IANA_VXLAN_UDP_PORT) ||
|
||||||
l4.udp->dest == htons(GENEVE_UDP_PORT))))
|
l4.udp->dest == htons(GENEVE_UDP_PORT) ||
|
||||||
|
l4.udp->dest == htons(4790))))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
skb_checksum_help(skb);
|
skb_checksum_help(skb);
|
||||||
|
|
|
@ -3978,6 +3978,12 @@ static void hclge_update_reset_level(struct hclge_dev *hdev)
|
||||||
struct hnae3_ae_dev *ae_dev = pci_get_drvdata(hdev->pdev);
|
struct hnae3_ae_dev *ae_dev = pci_get_drvdata(hdev->pdev);
|
||||||
enum hnae3_reset_type reset_level;
|
enum hnae3_reset_type reset_level;
|
||||||
|
|
||||||
|
/* reset request will not be set during reset, so clear
|
||||||
|
* pending reset request to avoid unnecessary reset
|
||||||
|
* caused by the same reason.
|
||||||
|
*/
|
||||||
|
hclge_get_reset_level(ae_dev, &hdev->reset_request);
|
||||||
|
|
||||||
/* if default_reset_request has a higher level reset request,
|
/* if default_reset_request has a higher level reset request,
|
||||||
* it should be handled as soon as possible. since some errors
|
* it should be handled as soon as possible. since some errors
|
||||||
* need this kind of reset to fix.
|
* need this kind of reset to fix.
|
||||||
|
|
|
@ -255,6 +255,8 @@ void hclge_mac_start_phy(struct hclge_dev *hdev)
|
||||||
if (!phydev)
|
if (!phydev)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
phy_loopback(phydev, false);
|
||||||
|
|
||||||
phy_start(phydev);
|
phy_start(phydev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue