1. 25 6月, 2020 5 次提交
    • J
      net: phy: make phy_disable_interrupts() non-static · 3dd4ef1b
      Jisheng Zhang 提交于
      We face an issue with rtl8211f, a pin is shared between INTB and PMEB,
      and the PHY Register Accessible Interrupt is enabled by default, so
      the INTB/PMEB pin is always active in polling mode case.
      
      As Heiner pointed out "I was thinking about calling
      phy_disable_interrupts() in phy_init_hw(), to have a defined init
      state as we don't know in which state the PHY is if the PHY driver is
      loaded. We shouldn't assume that it's the chip power-on defaults, BIOS
      or boot loader could have changed this. Or in case of dual-boot
      systems the other OS could leave the PHY in whatever state."
      
      Make phy_disable_interrupts() non-static so that it could be used in
      phy_init_hw() to have a defined init state.
      Suggested-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NJisheng Zhang <Jisheng.Zhang@synaptics.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3dd4ef1b
    • S
      net: ethernet: mvneta: Add back interface mode validation · 41c2b6b4
      Sascha Hauer 提交于
      When writing the serdes configuration register was moved to
      mvneta_config_interface() the whole code block was removed from
      mvneta_port_power_up() in the assumption that its only purpose was to
      write the serdes configuration register. As mentioned by Russell King
      its purpose was also to check for valid interface modes early so that
      later in the driver we do not have to care for unexpected interface
      modes.
      Add back the test to let the driver bail out early on unhandled
      interface modes.
      
      Fixes: b4748553 ("net: ethernet: mvneta: Fix Serdes configuration for SoCs without comphy")
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Reviewed-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41c2b6b4
    • S
      net: ethernet: mvneta: Do not error out in non serdes modes · d3d239dc
      Sascha Hauer 提交于
      In mvneta_config_interface() the RGMII modes are catched by the default
      case which is an error return. The RGMII modes are valid modes for the
      driver, so instead of returning an error add a break statement to return
      successfully.
      
      This avoids this warning for non comphy SoCs which use RGMII, like
      SolidRun Clearfog:
      
      WARNING: CPU: 0 PID: 268 at drivers/net/ethernet/marvell/mvneta.c:3512 mvneta_start_dev+0x220/0x23c
      
      Fixes: b4748553 ("net: ethernet: mvneta: Fix Serdes configuration for SoCs without comphy")
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Reviewed-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d3d239dc
    • D
      dsa: Allow forwarding of redirected IGMP traffic · 1ed9ec9b
      Daniel Mack 提交于
      The driver for Marvell switches puts all ports in IGMP snooping mode
      which results in all IGMP/MLD frames that ingress on the ports to be
      forwarded to the CPU only.
      
      The bridge code in the kernel can then interpret these frames and act
      upon them, for instance by updating the mdb in the switch to reflect
      multicast memberships of stations connected to the ports. However,
      the IGMP/MLD frames must then also be forwarded to other ports of the
      bridge so external IGMP queriers can track membership reports, and
      external multicast clients can receive query reports from foreign IGMP
      queriers.
      
      Currently, this is impossible as the EDSA tagger sets offload_fwd_mark
      on the skb when it unwraps the tagged frames, and that will make the
      switchdev layer prevent the skb from egressing on any other port of
      the same switch.
      
      To fix that, look at the To_CPU code in the DSA header and make
      forwarding of the frame possible for trapped IGMP packets.
      
      Introduce some #defines for the frame types to make the code a bit more
      comprehensive.
      
      This was tested on a Marvell 88E6352 variant.
      Signed-off-by: NDaniel Mack <daniel@zonque.org>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Tested-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ed9ec9b
    • L
      openvswitch: take into account de-fragmentation/gso_size in execute_check_pkt_len · 17843655
      Lorenzo Bianconi 提交于
      ovs connection tracking module performs de-fragmentation on incoming
      fragmented traffic. Take info account if traffic has been de-fragmented
      in execute_check_pkt_len action otherwise we will perform the wrong
      nested action considering the original packet size. This issue typically
      occurs if ovs-vswitchd adds a rule in the pipeline that requires connection
      tracking (e.g. OVN stateful ACLs) before execute_check_pkt_len action.
      Moreover take into account GSO fragment size for GSO packet in
      execute_check_pkt_len routine
      
      Fixes: 4d5ec89f ("net: openvswitch: Add a new action check_pkt_len")
      Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      17843655
  2. 24 6月, 2020 35 次提交