1. 07 Sep, 2021 15 commits
    • Saeed Mahameed's avatar
      net/mlx5: FWTrace, cancel work on alloc pd error flow · dfe6fd72
      Saeed Mahameed authored
      Handle error flow on mlx5_core_alloc_pd() failure,
      read_fw_strings_work must be canceled.
      
      Fixes: c71ad41c ("net/mlx5: FW tracer, events handling")
      Reported-by: default avatarPavel Machek (CIP) <pavel@denx.de>
      Suggested-by: default avatarPavel Machek (CIP) <pavel@denx.de>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      Reviewed-by: default avatarAya Levin <ayal@nvidia.com>
      dfe6fd72
    • Mark Bloch's avatar
      net/mlx5: Lag, don't update lag if lag isn't supported · da8252d5
      Mark Bloch authored
      In NICs that don't support LAG, the LAG control structure won't be
      allocated. If it wasn't allocated it means LAG doesn't exists and can be
      skipped.
      
      Fixes: cac1eb2c ("net/mlx5: Lag, properly lock eswitch if needed")
      Signed-off-by: default avatarMark Bloch <mbloch@nvidia.com>
      Reviewed-by: default avatarMaor Gottlieb <maorg@nvidia.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      da8252d5
    • Parav Pandit's avatar
      net/mlx5: Fix rdma aux device on devlink reload · 897ae4b4
      Parav Pandit authored
      RDMA auxdev parameter registration was skipped for eswitch manager PCI PF.
      Due to this when devlink parameter is read, it reads as false in below
      code flow.
      
      $ devlink dev reload pci/0000:06:00.0
        devlink_reload()
          mlx5_load_one()
            mlx5_attach_device()
              is_ib_enabled()
                devlink_param_driverinit_value_get()
      
      Due to this, is_ib_enabled() returns false for the RDMA auxiliary
      device. This results into a skipping RDMA auxiliary device creation on
      reload.
      
      There is no need to check for eswitch manager capability to support RDMA
      auxiliary device. Hence, fix it by skipping eswitch manager capability.
      
      Fixes: 87158ced ("net/mlx5: Support enable_rdma devlink dev param")
      Signed-off-by: default avatarParav Pandit <parav@nvidia.com>
      Reviewed-by: default avatarShay Drory <shayd@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      897ae4b4
    • Vlad Buslov's avatar
      net/mlx5: Bridge, fix uninitialized variable usage · 8343268e
      Vlad Buslov authored
      In some conditions variable 'err' is not assigned with value in
      mlx5_esw_bridge_port_obj_attr_set() and mlx5_esw_bridge_port_changeupper()
      functions after recent changes to support LAG. Initialize the variable with
      zero value in both cases.
      Reported-by: default avatarColin King <colin.king@canonical.com>
      Reported-by: default avatarTim Gardner <tim.gardner@canonical.com>
      Reported-by: default avatarNaresh Kamboju <naresh.kamboju@linaro.org>
      CC: linux-kernel@vger.kernel.org
      Fixes: ff9b7521 ("net/mlx5: Bridge, support LAG")
      Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
      8343268e
    • Colin Ian King's avatar
      ieee802154: Remove redundant initialization of variable ret · 0f77f2de
      Colin Ian King authored
      The variable ret is being initialized with a value that is never read, it
      is being updated later on. The assignment is redundant and can be removed.
      
      Addresses-Coverity: ("Unused value")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0f77f2de
    • David S. Miller's avatar
      Merge branch 'stmmac-wol-fix' · d1bf7338
      David S. Miller authored
      Joakim Zhang says:
      
      ====================
      net: stmmac: fix WoL issue
      
      This patch set fixes stmmac not working after system resume back with WoL
      active. Thanks a lot for Russell King keeps looking into this issue.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d1bf7338
    • Joakim Zhang's avatar
      net: stmmac: fix MAC not working when system resume back with WoL active · 90702dcd
      Joakim Zhang authored
      We can reproduce this issue with below steps:
      1) enable WoL on the host
      2) host system suspended
      3) remote client send out wakeup packets
      We can see that host system resume back, but can't work, such as ping failed.
      
      After a bit digging, this issue is introduced by the commit 46f69ded
      ("net: stmmac: Use resolved link config in mac_link_up()"), which use
      the finalised link parameters in mac_link_up() rather than the
      parameters in mac_config().
      
      There are two scenarios for MAC suspend/resume in STMMAC driver:
      
      1) MAC suspend with WoL inactive, stmmac_suspend() call
      phylink_mac_change() to notify phylink machine that a change in MAC
      state, then .mac_link_down callback would be invoked. Further, it will
      call phylink_stop() to stop the phylink instance. When MAC resume back,
      firstly phylink_start() is called to start the phylink instance, then
      call phylink_mac_change() which will finally trigger phylink machine to
      invoke .mac_config and .mac_link_up callback. All is fine since
      configuration in these two callbacks will be initialized, that means MAC
      can restore the state.
      
      2) MAC suspend with WoL active, phylink_mac_change() will put link
      down, but there is no phylink_stop() to stop the phylink instance, so it
      will link up again, that means .mac_config and .mac_link_up would be
      invoked before system suspended. After system resume back, it will do
      DMA initialization and SW reset which let MAC lost the hardware setting
      (i.e MAC_Configuration register(offset 0x0) is reset). Since link is up
      before system suspended, so .mac_link_up would not be invoked after
      system resume back, lead to there is no chance to initialize the
      configuration in .mac_link_up callback, as a result, MAC can't work any
      longer.
      
      After discussed with Russell King [1], we confirm that phylink framework
      have not take WoL into consideration yet. This patch calls
      phylink_suspend()/phylink_resume() functions which is newly introduced
      by Russell King to fix this issue.
      
      [1] https://lore.kernel.org/netdev/20210901090228.11308-1-qiangqing.zhang@nxp.com/
      
      Fixes: 46f69ded ("net: stmmac: Use resolved link config in mac_link_up()")
      Signed-off-by: default avatarJoakim Zhang <qiangqing.zhang@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90702dcd
    • Russell King (Oracle)'s avatar
      net: phylink: add suspend/resume support · f9749365
      Russell King (Oracle) authored
      Joakim Zhang reports that Wake-on-Lan with the stmmac ethernet driver broke
      when moving the incorrect handling of mac link state out of mac_config().
      This reason this breaks is because the stmmac's WoL is handled by the MAC
      rather than the PHY, and phylink doesn't cater for that scenario.
      
      This patch adds the necessary phylink code to handle suspend/resume events
      according to whether the MAC still needs a valid link or not. This is the
      barest minimum for this support.
      Reported-by: default avatarJoakim Zhang <qiangqing.zhang@nxp.com>
      Tested-by: default avatarJoakim Zhang <qiangqing.zhang@nxp.com>
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarJoakim Zhang <qiangqing.zhang@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f9749365
    • Yoshihiro Shimoda's avatar
      net: renesas: sh_eth: Fix freeing wrong tx descriptor · 0341d5e3
      Yoshihiro Shimoda authored
      The cur_tx counter must be incremented after TACT bit of
      txdesc->status was set. However, a CPU is possible to reorder
      instructions and/or memory accesses between cur_tx and
      txdesc->status. And then, if TX interrupt happened at such a
      timing, the sh_eth_tx_free() may free the descriptor wrongly.
      So, add wmb() before cur_tx++.
      Otherwise NETDEV WATCHDOG timeout is possible to happen.
      
      Fixes: 86a74ff2 ("net: sh_eth: add support for Renesas SuperH Ethernet")
      Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0341d5e3
    • Colin Ian King's avatar
      bonding: 3ad: pass parameter bond_params by reference · bbef56d8
      Colin Ian King authored
      The parameter bond_params is a relatively large 192 byte sized
      struct so pass it by reference rather than by value to reduce
      copying.
      
      Addresses-Coverity: ("Big parameter passed by value")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bbef56d8
    • David S. Miller's avatar
      Merge tag 'linux-can-fixes-for-5.15-20210907' of... · 1c990729
      David S. Miller authored
      Merge tag 'linux-can-fixes-for-5.15-20210907' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
      
      linux-can-fixes-for-5.15-20210907
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c990729
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-2021-09-07' of... · 8f110f35
      David S. Miller authored
      Merge tag 'wireless-drivers-2021-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
      
      Kalle Valo says:
      
      ====================
      wireless-drivers fixes for v5.15
      
      First set of fixes for v5.15 and only iwlwifi patches this time. Most
      important being support for new hardware and new firmware API.
      
      I had already earlier applied a fix which also Linus applied to this
      tree as commit 1476ff21 ("iwl: fix debug printf format strings"),
      but this doesn't seem to cause any conflicts so I left it there.
      
      iwlwifi
      
      * add support for firmware API 66
      
      * add support for Samsung Galaxy Book Flex2 Alpha
      
      * fix a leak happening every time module is loaded
      
      * fix a printk compiler warning
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f110f35
    • Heiner Kallweit's avatar
      cxgb3: fix oops on module removal · be27a47a
      Heiner Kallweit authored
      When removing the driver module w/o bringing an interface up before
      the error below occurs. Reason seems to be that cancel_work_sync() is
      called in t3_sge_stop() for a queue that hasn't been initialized yet.
      
      [10085.941785] ------------[ cut here ]------------
      [10085.941799] WARNING: CPU: 1 PID: 5850 at kernel/workqueue.c:3074 __flush_work+0x3ff/0x480
      [10085.941819] Modules linked in: vfat snd_hda_codec_hdmi fat snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio led_class ee1004 iTCO_
      wdt intel_tcc_cooling x86_pkg_temp_thermal coretemp aesni_intel crypto_simd cryptd snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hda_core r
      8169 snd_pcm realtek mdio_devres snd_timer snd i2c_i801 i2c_smbus libphy i915 i2c_algo_bit cxgb3(-) intel_gtt ttm mdio drm_kms_helper mei_me s
      yscopyarea sysfillrect sysimgblt mei fb_sys_fops acpi_pad sch_fq_codel crypto_user drm efivarfs ext4 mbcache jbd2 crc32c_intel
      [10085.941944] CPU: 1 PID: 5850 Comm: rmmod Not tainted 5.14.0-rc7-next-20210826+ #6
      [10085.941974] Hardware name: System manufacturer System Product Name/PRIME H310I-PLUS, BIOS 2603 10/21/2019
      [10085.941992] RIP: 0010:__flush_work+0x3ff/0x480
      [10085.942003] Code: c0 74 6b 65 ff 0d d1 bd 78 75 e8 bc 2f 06 00 48 c7 c6 68 b1 88 8a 48 c7 c7 e0 5f b4 8b 45 31 ff e8 e6 66 04 00 e9 4b fe ff ff <0f> 0b 45 31 ff e9 41 fe ff ff e8 72 c1 79 00 85 c0 74 87 80 3d 22
      [10085.942036] RSP: 0018:ffffa1744383fc08 EFLAGS: 00010246
      [10085.942048] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000923
      [10085.942062] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff91c901710a88
      [10085.942076] RBP: ffffa1744383fce8 R08: 0000000000000001 R09: 0000000000000001
      [10085.942090] R10: 00000000000000c2 R11: 0000000000000000 R12: ffff91c901710a88
      [10085.942104] R13: 0000000000000000 R14: ffff91c909a96100 R15: 0000000000000001
      [10085.942118] FS:  00007fe417837740(0000) GS:ffff91c969d00000(0000) knlGS:0000000000000000
      [10085.942134] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [10085.942146] CR2: 000055a8d567ecd8 CR3: 0000000121690003 CR4: 00000000003706e0
      [10085.942160] Call Trace:
      [10085.942166]  ? __lock_acquire+0x3af/0x22e0
      [10085.942177]  ? cancel_work_sync+0xb/0x10
      [10085.942187]  __cancel_work_timer+0x128/0x1b0
      [10085.942197]  ? __pm_runtime_resume+0x5b/0x90
      [10085.942208]  cancel_work_sync+0xb/0x10
      [10085.942217]  t3_sge_stop+0x2f/0x50 [cxgb3]
      [10085.942234]  remove_one+0x26/0x190 [cxgb3]
      [10085.942248]  pci_device_remove+0x39/0xa0
      [10085.942258]  __device_release_driver+0x15e/0x240
      [10085.942269]  driver_detach+0xd9/0x120
      [10085.942278]  bus_remove_driver+0x53/0xd0
      [10085.942288]  driver_unregister+0x2c/0x50
      [10085.942298]  pci_unregister_driver+0x31/0x90
      [10085.942307]  cxgb3_cleanup_module+0x10/0x18c [cxgb3]
      [10085.942324]  __do_sys_delete_module+0x191/0x250
      [10085.942336]  ? syscall_enter_from_user_mode+0x21/0x60
      [10085.942347]  ? trace_hardirqs_on+0x2a/0xe0
      [10085.942357]  __x64_sys_delete_module+0x13/0x20
      [10085.942368]  do_syscall_64+0x40/0x90
      [10085.942377]  entry_SYSCALL_64_after_hwframe+0x44/0xae
      [10085.942389] RIP: 0033:0x7fe41796323b
      
      Fixes: 5e0b8928 ("net:cxgb3: replace tasklets with works")
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      be27a47a
    • Tong Zhang's avatar
      can: c_can: fix null-ptr-deref on ioctl() · 644d0a5b
      Tong Zhang authored
      The pdev maybe not a platform device, e.g. c_can_pci device, in this
      case, calling to_platform_device() would not make sense. Also, per the
      comment in drivers/net/can/c_can/c_can_ethtool.c, @bus_info should
      match dev_name() string, so I am replacing this with dev_name() to fix
      this issue.
      
      [    1.458583] BUG: unable to handle page fault for address: 0000000100000000
      [    1.460921] RIP: 0010:strnlen+0x1a/0x30
      [    1.466336]  ? c_can_get_drvinfo+0x65/0xb0 [c_can]
      [    1.466597]  ethtool_get_drvinfo+0xae/0x360
      [    1.466826]  dev_ethtool+0x10f8/0x2970
      [    1.467880]  sock_ioctl+0xef/0x300
      
      Fixes: 2722ac98 ("can: c_can: add ethtool support")
      Link: https://lore.kernel.org/r/20210906233704.1162666-1-ztong0001@gmail.com
      Cc: stable@vger.kernel.org # 5.14+
      Signed-off-by: default avatarTong Zhang <ztong0001@gmail.com>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      644d0a5b
    • Marc Kleine-Budde's avatar
      can: rcar_canfd: add __maybe_unused annotation to silence warning · 54d7a47a
      Marc Kleine-Budde authored
      Since commit
      
      | dd3bd23e ("can: rcar_canfd: Add Renesas R-Car CAN FD driver")
      
      the rcar_canfd driver can be compile tested on all architectures. On
      non OF enabled archs, or archs where OF is optional (and disabled in
      the .config) the compilation throws the following warning:
      
      | drivers/net/can/rcar/rcar_canfd.c:2020:34: warning: unused variable 'rcar_canfd_of_table' [-Wunused-const-variable]
      | static const struct of_device_id rcar_canfd_of_table[] = {
      |                                  ^
      
      This patch fixes the warning by marking the variable
      rcar_canfd_of_table as __maybe_unused.
      
      Fixes: ac422408 ("can: rcar: Kconfig: Add helper dependency on COMPILE_TEST")
      Fixes: dd3bd23e ("can: rcar_canfd: Add Renesas R-Car CAN FD driver")
      Link: https://lore.kernel.org/all/20210907064537.1054268-1-mkl@pengutronix.de
      Cc: linux-renesas-soc@vger.kernel.org
      Cc: Cai Huoqing <caihuoqing@baidu.com>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      54d7a47a
  2. 06 Sep, 2021 11 commits
  3. 05 Sep, 2021 13 commits
  4. 04 Sep, 2021 1 commit