Skip to content

Commit ad8064a

Browse files
committed
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: Jakub Kicinski <kuba@kernel.org>
2 parents 8467dda + 2692193 commit ad8064a

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

drivers/net/ethernet/microchip/lan966x/lan966x_mac.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,8 @@ static void lan966x_mac_irq_process(struct lan966x *lan966x, u32 row,
346346

347347
lan966x_mac_process_raw_entry(&raw_entries[column],
348348
mac, &vid, &dest_idx);
349-
WARN_ON(dest_idx > lan966x->num_phys_ports);
349+
if (WARN_ON(dest_idx > lan966x->num_phys_ports))
350+
continue;
350351

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

393394
lan966x_mac_process_raw_entry(&raw_entries[column],
394395
mac, &vid, &dest_idx);
395-
WARN_ON(dest_idx > lan966x->num_phys_ports);
396+
if (WARN_ON(dest_idx > lan966x->num_phys_ports))
397+
continue;
396398

397399
mac_entry = lan966x_mac_alloc_entry(mac, vid, dest_idx);
398400
if (!mac_entry)

drivers/net/ethernet/microchip/lan966x/lan966x_main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,12 @@ static bool lan966x_hw_offload(struct lan966x *lan966x, u32 port,
446446
ANA_CPU_FWD_CFG_MLD_REDIR_ENA)))
447447
return true;
448448

449+
if (eth_type_vlan(skb->protocol)) {
450+
skb = skb_vlan_untag(skb);
451+
if (unlikely(!skb))
452+
return false;
453+
}
454+
449455
if (skb->protocol == htons(ETH_P_IP) &&
450456
ip_hdr(skb)->protocol == IPPROTO_IGMP)
451457
return false;

drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ enum {
2929

3030
static u64 lan966x_ptp_get_nominal_value(void)
3131
{
32-
u64 res = 0x304d2df1;
33-
34-
res <<= 32;
35-
return res;
32+
/* This is the default value that for each system clock, the time of day
33+
* is increased. It has the format 5.59 nanosecond.
34+
*/
35+
return 0x304d4873ecade305;
3636
}
3737

3838
int lan966x_ptp_hwtstamp_set(struct lan966x_port *port, struct ifreq *ifr)

drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,7 @@ static int lan966x_port_prechangeupper(struct net_device *dev,
322322

323323
if (netif_is_bridge_master(info->upper_dev) && !info->linking)
324324
switchdev_bridge_port_unoffload(port->dev, port,
325-
&lan966x_switchdev_nb,
326-
&lan966x_switchdev_blocking_nb);
325+
NULL, NULL);
327326

328327
return NOTIFY_DONE;
329328
}

0 commit comments

Comments
 (0)