1. 21 Jul, 2020 5 commits
    • Zhang Changzhong's avatar
      net: fs_enet: remove redundant null check · cebd2cac
      Zhang Changzhong authored
      Because clk_prepare_enable and clk_disable_unprepare already
      checked NULL clock parameter, so the additional checks are
      unnecessary, just remove them.
      Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cebd2cac
    • David S. Miller's avatar
      Merge branch 'net-macb-Wake-on-Lan-magic-packet-GEM-and-MACB-handling' · 87c831ce
      David S. Miller authored
      Nicolas Ferre says:
      
      ====================
      net: macb: Wake-on-Lan magic packet GEM and MACB handling
      
      Here is the second part of support for WoL magic-packet on the current macb
      driver. This one
      is addressing the bulk of the feature and is based on current net-next/master.
      
      MACB and GEM code must co-exist and as they don't share exactly the same
      register layout, I had to specialize a bit the suspend/resume paths and plug a
      specific IRQ handler in order to avoid overloading the "normal" IRQ hot path.
      
      These changes were tested on both sam9x60 which embeds a MACB+FIFO controller
      and sama5d2 which has a GEM+packet buffer type of controller.
      
      Best regards,
        Nicolas
      
      Changes in v7:
      - Release the spinlock before exiting macb_suspend/resume in case of error
        changing IRQ handler
      
      Changes in v6:
      - rebase on net-next/master now that the "fixes" patches of the series are
        merged in both net and net-next.
      - GEM addition and MACB update to finish the support of WoL magic-packet on the
        two revisions of the controller.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      87c831ce
    • Nicolas Ferre's avatar
      net: macb: Add WoL interrupt support for MACB type of Ethernet controller · 9d45c8e8
      Nicolas Ferre authored
      Handle the Wake-on-Lan interrupt for the Cadence MACB Ethernet
      controller.
      As we do for the GEM version, we handle of WoL interrupt in a
      specialized interrupt handler for MACB version that is positionned
      just between suspend() and resume() calls.
      
      Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
      Cc: Harini Katakam <harini.katakam@xilinx.com>
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9d45c8e8
    • Nicolas Ferre's avatar
      net: macb: WoL support for GEM type of Ethernet controller · 558e35cc
      Nicolas Ferre authored
      Adapt the Wake-on-Lan feature to the Cadence GEM Ethernet controller.
      This controller has different register layout and cannot be handled by
      previous code.
      We disable completely interrupts on all the queues but the queue 0.
      Handling of WoL interrupt is done in another interrupt handler
      positioned depending on the controller version used, just between
      suspend() and resume() calls.
      It allows to lower pressure on the generic interrupt hot path by
      removing the need to handle 2 tests for each IRQ: the first figuring out
      the controller revision, the second for actually knowing if the WoL bit
      is set.
      
      Queue management in suspend()/resume() functions inspired from RFC patch
      by Harini Katakam <harinik@xilinx.com>, thanks!
      
      Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
      Cc: Harini Katakam <harini.katakam@xilinx.com>
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      558e35cc
    • Jiri Pirko's avatar
      sched: sch_api: add missing rcu read lock to silence the warning · a8b7b2d0
      Jiri Pirko authored
      In case the qdisc_match_from_root function() is called from non-rcu path
      with rtnl mutex held, a suspiciout rcu usage warning appears:
      
      [  241.504354] =============================
      [  241.504358] WARNING: suspicious RCU usage
      [  241.504366] 5.8.0-rc4-custom-01521-g72a7c7d549c3 #32 Not tainted
      [  241.504370] -----------------------------
      [  241.504378] net/sched/sch_api.c:270 RCU-list traversed in non-reader section!!
      [  241.504382]
                     other info that might help us debug this:
      [  241.504388]
                     rcu_scheduler_active = 2, debug_locks = 1
      [  241.504394] 1 lock held by tc/1391:
      [  241.504398]  #0: ffffffff85a27850 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x49a/0xbd0
      [  241.504431]
                     stack backtrace:
      [  241.504440] CPU: 0 PID: 1391 Comm: tc Not tainted 5.8.0-rc4-custom-01521-g72a7c7d549c3 #32
      [  241.504446] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-2.fc32 04/01/2014
      [  241.504453] Call Trace:
      [  241.504465]  dump_stack+0x100/0x184
      [  241.504482]  lockdep_rcu_suspicious+0x153/0x15d
      [  241.504499]  qdisc_match_from_root+0x293/0x350
      
      Fix this by passing the rtnl held lockdep condition down to
      hlist_for_each_entry_rcu()
      Reported-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a8b7b2d0
  2. 20 Jul, 2020 35 commits