Commit ad8064a7 authored by Jakub Kicinski's avatar Jakub Kicinski

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.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 8467dda0 26921932
......@@ -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)
......
......@@ -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;
......
......@@ -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)
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment