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, ...@@ -346,7 +346,8 @@ static void lan966x_mac_irq_process(struct lan966x *lan966x, u32 row,
lan966x_mac_process_raw_entry(&raw_entries[column], lan966x_mac_process_raw_entry(&raw_entries[column],
mac, &vid, &dest_idx); 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 /* If the entry in SW is found, then there is nothing
* to do * to do
...@@ -392,7 +393,8 @@ static void lan966x_mac_irq_process(struct lan966x *lan966x, u32 row, ...@@ -392,7 +393,8 @@ static void lan966x_mac_irq_process(struct lan966x *lan966x, u32 row,
lan966x_mac_process_raw_entry(&raw_entries[column], lan966x_mac_process_raw_entry(&raw_entries[column],
mac, &vid, &dest_idx); 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); mac_entry = lan966x_mac_alloc_entry(mac, vid, dest_idx);
if (!mac_entry) if (!mac_entry)
......
...@@ -446,6 +446,12 @@ static bool lan966x_hw_offload(struct lan966x *lan966x, u32 port, ...@@ -446,6 +446,12 @@ static bool lan966x_hw_offload(struct lan966x *lan966x, u32 port,
ANA_CPU_FWD_CFG_MLD_REDIR_ENA))) ANA_CPU_FWD_CFG_MLD_REDIR_ENA)))
return true; 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) && if (skb->protocol == htons(ETH_P_IP) &&
ip_hdr(skb)->protocol == IPPROTO_IGMP) ip_hdr(skb)->protocol == IPPROTO_IGMP)
return false; return false;
......
...@@ -29,10 +29,10 @@ enum { ...@@ -29,10 +29,10 @@ enum {
static u64 lan966x_ptp_get_nominal_value(void) static u64 lan966x_ptp_get_nominal_value(void)
{ {
u64 res = 0x304d2df1; /* This is the default value that for each system clock, the time of day
* is increased. It has the format 5.59 nanosecond.
res <<= 32; */
return res; return 0x304d4873ecade305;
} }
int lan966x_ptp_hwtstamp_set(struct lan966x_port *port, struct ifreq *ifr) 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, ...@@ -322,8 +322,7 @@ static int lan966x_port_prechangeupper(struct net_device *dev,
if (netif_is_bridge_master(info->upper_dev) && !info->linking) if (netif_is_bridge_master(info->upper_dev) && !info->linking)
switchdev_bridge_port_unoffload(port->dev, port, switchdev_bridge_port_unoffload(port->dev, port,
&lan966x_switchdev_nb, NULL, NULL);
&lan966x_switchdev_blocking_nb);
return NOTIFY_DONE; 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