1. 15 Aug, 2023 2 commits
    • Michal Schmidt's avatar
      octeon_ep: fix timeout value for waiting on mbox response · 519b2279
      Michal Schmidt authored
      The intention was to wait up to 500 ms for the mbox response.
      The third argument to wait_event_interruptible_timeout() is supposed to
      be the timeout duration. The driver mistakenly passed absolute time
      instead.
      
      Fixes: 577f0d1b ("octeon_ep: add separate mailbox command and response queues")
      Signed-off-by: default avatarMichal Schmidt <mschmidt@redhat.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/20230810150114.107765-2-mschmidt@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      519b2279
    • Radhey Shyam Pandey's avatar
      net: macb: In ZynqMP resume always configure PS GTR for non-wakeup source · 6c461e39
      Radhey Shyam Pandey authored
      On Zynq UltraScale+ MPSoC ubuntu platform when systemctl issues suspend,
      network manager bring down the interface and goes into suspend. When it
      wakes up it again enables the interface.
      
      This leads to xilinx-psgtr "PLL lock timeout" on interface bringup, as
      the power management controller power down the entire FPD (including
      SERDES) if none of the FPD devices are in use and serdes is not
      initialized on resume.
      
      $ sudo rtcwake -m no -s 120 -v
      $ sudo systemctl suspend  <this does ifconfig eth1 down>
      $ ifconfig eth1 up
      xilinx-psgtr fd400000.phy: lane 0 (type 10, protocol 5): PLL lock timeout
      phy phy-fd400000.phy.0: phy poweron failed --> -110
      
      macb driver is called in this way:
      1. macb_close: Stop network interface. In this function, it
         reset MACB IP and disables PHY and network interface.
      
      2. macb_suspend: It is called in kernel suspend flow. But because
         network interface has been disabled(netif_running(ndev) is
         false), it does nothing and returns directly;
      
      3. System goes into suspend state. Some time later, system is
         waken up by RTC wakeup device;
      
      4. macb_resume: It does nothing because network interface has
         been disabled;
      
      5. macb_open: It is called to enable network interface again. ethernet
         interface is initialized in this API but serdes which is power-off
         by PMUFW during FPD-off suspend is not initialized again and so
         we hit GT PLL lock issue on open.
      
      To resolve this PLL timeout issue always do PS GTR initialization
      when ethernet device is configured as non-wakeup source.
      
      Fixes: f22bd29b ("net: macb: Fix ZynqMP SGMII non-wakeup source resume failure")
      Fixes: 8b73fa3a ("net: macb: Added ZynqMP-specific initialization")
      Signed-off-by: default avatarRadhey Shyam Pandey <radhey.shyam.pandey@amd.com>
      Link: https://lore.kernel.org/r/1691414091-2260697-1-git-send-email-radhey.shyam.pandey@amd.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6c461e39
  2. 14 Aug, 2023 2 commits
  3. 13 Aug, 2023 1 commit
    • Russell King (Oracle)'s avatar
      net: phy: fix IRQ-based wake-on-lan over hibernate / power off · cc941e54
      Russell King (Oracle) authored
      Uwe reports:
      "Most PHYs signal WoL using an interrupt. So disabling interrupts [at
      shutdown] breaks WoL at least on PHYs covered by the marvell driver."
      
      Discussing with Ioana, the problem which was trying to be solved was:
      "The board in question is a LS1021ATSN which has two AR8031 PHYs that
      share an interrupt line. In case only one of the PHYs is probed and
      there are pending interrupts on the PHY#2 an IRQ storm will happen
      since there is no entity to clear the interrupt from PHY#2's registers.
      PHY#1's driver will get stuck in .handle_interrupt() indefinitely."
      
      Further confirmation that "the two AR8031 PHYs are on the same MDIO
      bus."
      
      With WoL using interrupts to wake the system, in such a case, the
      system will begin booting with an asserted interrupt. Thus, we need to
      cope with an interrupt asserted during boot.
      
      Solve this instead by disabling interrupts during PHY probe. This will
      ensure in Ioana's situation that both PHYs of the same type sharing an
      interrupt line on a common MDIO bus will have their interrupt outputs
      disabled when the driver probes the device, but before we hook in any
      interrupt handlers - thus avoiding the interrupt storm.
      
      A better fix would be for platform firmware to disable the interrupting
      devices at source during boot, before control is handed to the kernel.
      
      Fixes: e2f016cf ("net: phy: add a shutdown procedure")
      Link: 20230804071757.383971-1-u.kleine-koenig@pengutronix.de
      Reported-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc941e54
  4. 11 Aug, 2023 3 commits
  5. 10 Aug, 2023 31 commits
  6. 09 Aug, 2023 1 commit
    • Maciej Żenczykowski's avatar
      ipv6: adjust ndisc_is_useropt() to also return true for PIO · 048c796b
      Maciej Żenczykowski authored
      The upcoming (and nearly finalized):
        https://datatracker.ietf.org/doc/draft-collink-6man-pio-pflag/
      will update the IPv6 RA to include a new flag in the PIO field,
      which will serve as a hint to perform DHCPv6-PD.
      
      As we don't want DHCPv6 related logic inside the kernel, this piece of
      information needs to be exposed to userspace.  The simplest option is to
      simply expose the entire PIO through the already existing mechanism.
      
      Even without this new flag, the already existing PIO R (router address)
      flag (from RFC6275) cannot AFAICT be handled entirely in kernel,
      and provides useful information that should be exposed to userspace
      (the router's global address, for use by Mobile IPv6).
      
      Also cc'ing stable@ for inclusion in LTS, as while technically this is
      not quite a bugfix, and instead more of a feature, it is absolutely
      trivial and the alternative is manually cherrypicking into all Android
      Common Kernel trees - and I know Greg will ask for it to be sent in via
      LTS instead...
      
      Cc: Jen Linkova <furry@google.com>
      Cc: Lorenzo Colitti <lorenzo@google.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
      Link: https://lore.kernel.org/r/20230807102533.1147559-1-maze@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      048c796b