Skip to content

Commit 00207c7

Browse files
committed
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 <[email protected]>
2 parents db7c691 + 472497d commit 00207c7

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,8 @@ static int hns3_nic_net_stop(struct net_device *netdev)
575575
if (h->ae_algo->ops->set_timer_task)
576576
h->ae_algo->ops->set_timer_task(priv->ae_handle, false);
577577

578-
netif_tx_stop_all_queues(netdev);
579578
netif_carrier_off(netdev);
579+
netif_tx_disable(netdev);
580580

581581
hns3_nic_net_down(netdev);
582582

@@ -824,7 +824,7 @@ static int hns3_get_l4_protocol(struct sk_buff *skb, u8 *ol4_proto,
824824
* and it is udp packet, which has a dest port as the IANA assigned.
825825
* the hardware is expected to do the checksum offload, but the
826826
* hardware will not do the checksum offload when udp dest port is
827-
* 4789 or 6081.
827+
* 4789, 4790 or 6081.
828828
*/
829829
static bool hns3_tunnel_csum_bug(struct sk_buff *skb)
830830
{
@@ -842,7 +842,8 @@ static bool hns3_tunnel_csum_bug(struct sk_buff *skb)
842842

843843
if (!(!skb->encapsulation &&
844844
(l4.udp->dest == htons(IANA_VXLAN_UDP_PORT) ||
845-
l4.udp->dest == htons(GENEVE_UDP_PORT))))
845+
l4.udp->dest == htons(GENEVE_UDP_PORT) ||
846+
l4.udp->dest == htons(4790))))
846847
return false;
847848

848849
skb_checksum_help(skb);

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3978,6 +3978,12 @@ static void hclge_update_reset_level(struct hclge_dev *hdev)
39783978
struct hnae3_ae_dev *ae_dev = pci_get_drvdata(hdev->pdev);
39793979
enum hnae3_reset_type reset_level;
39803980

3981+
/* reset request will not be set during reset, so clear
3982+
* pending reset request to avoid unnecessary reset
3983+
* caused by the same reason.
3984+
*/
3985+
hclge_get_reset_level(ae_dev, &hdev->reset_request);
3986+
39813987
/* if default_reset_request has a higher level reset request,
39823988
* it should be handled as soon as possible. since some errors
39833989
* need this kind of reset to fix.

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ void hclge_mac_start_phy(struct hclge_dev *hdev)
255255
if (!phydev)
256256
return;
257257

258+
phy_loopback(phydev, false);
259+
258260
phy_start(phydev);
259261
}
260262

0 commit comments

Comments
 (0)