Unverified Commit e9124fcd authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5204 Upgrade driver for Broadcom NIC BCM57414

Merge Pull Request from: @ci-robot 
 
PR sync from: Baogen Shang <baogen.shang@outlook.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/7LDM73LXMSMBZPBEBUH3AZBANOFAC7VE/ 
From: Dapeng Yu <dapeng.yu@windriver.com>

Upgrade driver for Broadcom NIC BCM57414

Florian Fainelli (2):
  net: bcmgenet: Remove phy_stop() from bcmgenet_netif_stop()
  net: bcmgenet: Restore phy_stop() depending upon suspend/close

Somnath Kotur (2):
  bnxt_en: Query default VLAN before VNIC setup on a VF
  bnxt_en: Implement .set_port / .unset_port UDP tunnel callbacks

Sreekanth Reddy (1):
  bnxt_en: Don't issue AP reset during ethtool's reset operation

Tobias Heider (1):
  Add MODULE_FIRMWARE() for FIRMWARE_TG357766.


-- 
2.43.0
 
https://gitee.com/openeuler/kernel/issues/I8L4MY 
 
Link:https://gitee.com/openeuler/kernel/pulls/5204

 

Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 616de071 2ba9c399
Loading
Loading
Loading
Loading
+21 −7
Original line number Diff line number Diff line
@@ -8336,6 +8336,9 @@ static int bnxt_init_chip(struct bnxt *bp, bool irq_re_init)
		goto err_out;
	}

	if (BNXT_VF(bp))
		bnxt_hwrm_func_qcfg(bp);

	rc = bnxt_setup_vnic(bp, 0);
	if (rc)
		goto err_out;
@@ -12096,26 +12099,37 @@ static void bnxt_cfg_ntp_filters(struct bnxt *bp)

#endif /* CONFIG_RFS_ACCEL */

static int bnxt_udp_tunnel_sync(struct net_device *netdev, unsigned int table)
static int bnxt_udp_tunnel_set_port(struct net_device *netdev, unsigned int table,
				    unsigned int entry, struct udp_tunnel_info *ti)
{
	struct bnxt *bp = netdev_priv(netdev);
	struct udp_tunnel_info ti;
	unsigned int cmd;

	udp_tunnel_nic_get_port(netdev, table, 0, &ti);
	if (ti.type == UDP_TUNNEL_TYPE_VXLAN)
	if (ti->type == UDP_TUNNEL_TYPE_VXLAN)
		cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN;
	else
		cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE;

	if (ti.port)
		return bnxt_hwrm_tunnel_dst_port_alloc(bp, ti.port, cmd);
	return bnxt_hwrm_tunnel_dst_port_alloc(bp, ti->port, cmd);
}

static int bnxt_udp_tunnel_unset_port(struct net_device *netdev, unsigned int table,
				      unsigned int entry, struct udp_tunnel_info *ti)
{
	struct bnxt *bp = netdev_priv(netdev);
	unsigned int cmd;

	if (ti->type == UDP_TUNNEL_TYPE_VXLAN)
		cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN;
	else
		cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE;

	return bnxt_hwrm_tunnel_dst_port_free(bp, cmd);
}

static const struct udp_tunnel_nic_info bnxt_udp_tunnels = {
	.sync_table	= bnxt_udp_tunnel_sync,
	.set_port	= bnxt_udp_tunnel_set_port,
	.unset_port	= bnxt_udp_tunnel_unset_port,
	.flags		= UDP_TUNNEL_NIC_INFO_MAY_SLEEP |
			  UDP_TUNNEL_NIC_INFO_OPEN_ONLY,
	.tables		= {
+1 −1
Original line number Diff line number Diff line
@@ -3446,7 +3446,7 @@ static int bnxt_reset(struct net_device *dev, u32 *flags)
		}
	}

	if (req & BNXT_FW_RESET_AP) {
	if (!BNXT_CHIP_P4_PLUS(bp) && (req & BNXT_FW_RESET_AP)) {
		/* This feature is not supported in older firmware versions */
		if (bp->hwrm_spec_code >= 0x10803) {
			if (!bnxt_firmware_reset_ap(dev)) {
+5 −4
Original line number Diff line number Diff line
@@ -3393,7 +3393,7 @@ static int bcmgenet_open(struct net_device *dev)
	return ret;
}

static void bcmgenet_netif_stop(struct net_device *dev)
static void bcmgenet_netif_stop(struct net_device *dev, bool stop_phy)
{
	struct bcmgenet_priv *priv = netdev_priv(dev);

@@ -3408,6 +3408,7 @@ static void bcmgenet_netif_stop(struct net_device *dev)
	/* Disable MAC transmit. TX DMA disabled must be done before this */
	umac_enable_set(priv, CMD_TX_EN, false);

	if (stop_phy)
		phy_stop(dev->phydev);
	bcmgenet_disable_rx_napi(priv);
	bcmgenet_intr_disable(priv);
@@ -3434,7 +3435,7 @@ static int bcmgenet_close(struct net_device *dev)

	netif_dbg(priv, ifdown, dev, "bcmgenet_close\n");

	bcmgenet_netif_stop(dev);
	bcmgenet_netif_stop(dev, false);

	/* Really kill the PHY state machine and disconnect from it */
	phy_disconnect(dev->phydev);
@@ -4236,7 +4237,7 @@ static int bcmgenet_suspend(struct device *d)

	netif_device_detach(dev);

	bcmgenet_netif_stop(dev);
	bcmgenet_netif_stop(dev, true);

	if (!device_may_wakeup(d))
		phy_suspend(dev->phydev);
+1 −0
Original line number Diff line number Diff line
@@ -224,6 +224,7 @@ MODULE_AUTHOR("David S. Miller (davem@redhat.com) and Jeff Garzik (jgarzik@pobox
MODULE_DESCRIPTION("Broadcom Tigon3 ethernet driver");
MODULE_LICENSE("GPL");
MODULE_FIRMWARE(FIRMWARE_TG3);
MODULE_FIRMWARE(FIRMWARE_TG357766);
MODULE_FIRMWARE(FIRMWARE_TG3TSO);
MODULE_FIRMWARE(FIRMWARE_TG3TSO5);