Commit ad8064a7 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'net-lan966x-lan966x-fixes'

Horatiu Vultur says:

====================
net: lan966x: lan966x fixes

This contains different fixes for lan966x in different areas like PTP, MAC,
Switchdev and IGMP processing.
====================

Link: https://lore.kernel.org/r/20220409184143.1204786-1-horatiu.vultur@microchip.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 8467dda0 26921932
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -346,7 +346,8 @@ static void lan966x_mac_irq_process(struct lan966x *lan966x, u32 row,

			lan966x_mac_process_raw_entry(&raw_entries[column],
						      mac, &vid, &dest_idx);
			WARN_ON(dest_idx > lan966x->num_phys_ports);
			if (WARN_ON(dest_idx > lan966x->num_phys_ports))
				continue;

			/* If the entry in SW is found, then there is nothing
			 * to do
@@ -392,7 +393,8 @@ static void lan966x_mac_irq_process(struct lan966x *lan966x, u32 row,

		lan966x_mac_process_raw_entry(&raw_entries[column],
					      mac, &vid, &dest_idx);
		WARN_ON(dest_idx > lan966x->num_phys_ports);
		if (WARN_ON(dest_idx > lan966x->num_phys_ports))
			continue;

		mac_entry = lan966x_mac_alloc_entry(mac, vid, dest_idx);
		if (!mac_entry)
+6 −0
Original line number Diff line number Diff line
@@ -446,6 +446,12 @@ static bool lan966x_hw_offload(struct lan966x *lan966x, u32 port,
		     ANA_CPU_FWD_CFG_MLD_REDIR_ENA)))
		return true;

	if (eth_type_vlan(skb->protocol)) {
		skb = skb_vlan_untag(skb);
		if (unlikely(!skb))
			return false;
	}

	if (skb->protocol == htons(ETH_P_IP) &&
	    ip_hdr(skb)->protocol == IPPROTO_IGMP)
		return false;
+4 −4
Original line number Diff line number Diff line
@@ -29,10 +29,10 @@ enum {

static u64 lan966x_ptp_get_nominal_value(void)
{
	u64 res = 0x304d2df1;

	res <<= 32;
	return res;
	/* This is the default value that for each system clock, the time of day
	 * is increased. It has the format 5.59 nanosecond.
	 */
	return 0x304d4873ecade305;
}

int lan966x_ptp_hwtstamp_set(struct lan966x_port *port, struct ifreq *ifr)
+1 −2
Original line number Diff line number Diff line
@@ -322,8 +322,7 @@ static int lan966x_port_prechangeupper(struct net_device *dev,

	if (netif_is_bridge_master(info->upper_dev) && !info->linking)
		switchdev_bridge_port_unoffload(port->dev, port,
						&lan966x_switchdev_nb,
						&lan966x_switchdev_blocking_nb);
						NULL, NULL);

	return NOTIFY_DONE;
}