1. 30 4月, 2022 5 次提交
  2. 29 4月, 2022 21 次提交
  3. 28 4月, 2022 7 次提交
    • D
      net: mdio: add reset control for Aspeed MDIO · 15853622
      Dylan Hung 提交于
      Add reset assertion/deassertion for Aspeed MDIO.  There are 4 MDIO
      controllers embedded in Aspeed AST2600 SOC and share one reset control
      register SCU50[3].  To work with old DT blobs which don't have the reset
      property, devm_reset_control_get_optional_shared is used in this change.
      Signed-off-by: NDylan Hung <dylan_hung@aspeedtech.com>
      Reviewed-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NAndrew Jeffery <andrew@aj.id.au>
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      15853622
    • Y
      net: fec: add missing of_node_put() in fec_enet_init_stop_mode() · d2b52ec0
      Yang Yingliang 提交于
      Put device node in error path in fec_enet_init_stop_mode().
      
      Fixes: 8a448bf8 ("net: ethernet: fec: move GPR register offset and bit into DT")
      Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
      Link: https://lore.kernel.org/r/20220426125231.375688-1-yangyingliang@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      d2b52ec0
    • M
      bnx2x: fix napi API usage sequence · af68656d
      Manish Chopra 提交于
      While handling PCI errors (AER flow) driver tries to
      disable NAPI [napi_disable()] after NAPI is deleted
      [__netif_napi_del()] which causes unexpected system
      hang/crash.
      
      System message log shows the following:
      =======================================
      [ 3222.537510] EEH: Detected PCI bus error on PHB#384-PE#800000 [ 3222.537511] EEH: This PCI device has failed 2 times in the last hour and will be permanently disabled after 5 failures.
      [ 3222.537512] EEH: Notify device drivers to shutdown [ 3222.537513] EEH: Beginning: 'error_detected(IO frozen)'
      [ 3222.537514] EEH: PE#800000 (PCI 0384:80:00.0): Invoking
      bnx2x->error_detected(IO frozen)
      [ 3222.537516] bnx2x: [bnx2x_io_error_detected:14236(eth14)]IO error detected [ 3222.537650] EEH: PE#800000 (PCI 0384:80:00.0): bnx2x driver reports:
      'need reset'
      [ 3222.537651] EEH: PE#800000 (PCI 0384:80:00.1): Invoking
      bnx2x->error_detected(IO frozen)
      [ 3222.537651] bnx2x: [bnx2x_io_error_detected:14236(eth13)]IO error detected [ 3222.537729] EEH: PE#800000 (PCI 0384:80:00.1): bnx2x driver reports:
      'need reset'
      [ 3222.537729] EEH: Finished:'error_detected(IO frozen)' with aggregate recovery state:'need reset'
      [ 3222.537890] EEH: Collect temporary log [ 3222.583481] EEH: of node=0384:80:00.0 [ 3222.583519] EEH: PCI device/vendor: 168e14e4 [ 3222.583557] EEH: PCI cmd/status register: 00100140 [ 3222.583557] EEH: PCI-E capabilities and status follow:
      [ 3222.583744] EEH: PCI-E 00: 00020010 012c8da2 00095d5e 00455c82 [ 3222.583892] EEH: PCI-E 10: 10820000 00000000 00000000 00000000 [ 3222.583893] EEH: PCI-E 20: 00000000 [ 3222.583893] EEH: PCI-E AER capability register set follows:
      [ 3222.584079] EEH: PCI-E AER 00: 13c10001 00000000 00000000 00062030 [ 3222.584230] EEH: PCI-E AER 10: 00002000 000031c0 000001e0 00000000 [ 3222.584378] EEH: PCI-E AER 20: 00000000 00000000 00000000 00000000 [ 3222.584416] EEH: PCI-E AER 30: 00000000 00000000 [ 3222.584416] EEH: of node=0384:80:00.1 [ 3222.584454] EEH: PCI device/vendor: 168e14e4 [ 3222.584491] EEH: PCI cmd/status register: 00100140 [ 3222.584492] EEH: PCI-E capabilities and status follow:
      [ 3222.584677] EEH: PCI-E 00: 00020010 012c8da2 00095d5e 00455c82 [ 3222.584825] EEH: PCI-E 10: 10820000 00000000 00000000 00000000 [ 3222.584826] EEH: PCI-E 20: 00000000 [ 3222.584826] EEH: PCI-E AER capability register set follows:
      [ 3222.585011] EEH: PCI-E AER 00: 13c10001 00000000 00000000 00062030 [ 3222.585160] EEH: PCI-E AER 10: 00002000 000031c0 000001e0 00000000 [ 3222.585309] EEH: PCI-E AER 20: 00000000 00000000 00000000 00000000 [ 3222.585347] EEH: PCI-E AER 30: 00000000 00000000 [ 3222.586872] RTAS: event: 5, Type: Platform Error (224), Severity: 2 [ 3222.586873] EEH: Reset without hotplug activity [ 3224.762767] EEH: Beginning: 'slot_reset'
      [ 3224.762770] EEH: PE#800000 (PCI 0384:80:00.0): Invoking
      bnx2x->slot_reset()
      [ 3224.762771] bnx2x: [bnx2x_io_slot_reset:14271(eth14)]IO slot reset initializing...
      [ 3224.762887] bnx2x 0384:80:00.0: enabling device (0140 -> 0142) [ 3224.768157] bnx2x: [bnx2x_io_slot_reset:14287(eth14)]IO slot reset
      --> driver unload
      
      Uninterruptible tasks
      =====================
      crash> ps | grep UN
           213      2  11  c000000004c89e00  UN   0.0       0      0  [eehd]
           215      2   0  c000000004c80000  UN   0.0       0      0
      [kworker/0:2]
          2196      1  28  c000000004504f00  UN   0.1   15936  11136  wickedd
          4287      1   9  c00000020d076800  UN   0.0    4032   3008  agetty
          4289      1  20  c00000020d056680  UN   0.0    7232   3840  agetty
         32423      2  26  c00000020038c580  UN   0.0       0      0
      [kworker/26:3]
         32871   4241  27  c0000002609ddd00  UN   0.1   18624  11648  sshd
         32920  10130  16  c00000027284a100  UN   0.1   48512  12608  sendmail
         33092  32987   0  c000000205218b00  UN   0.1   48512  12608  sendmail
         33154   4567  16  c000000260e51780  UN   0.1   48832  12864  pickup
         33209   4241  36  c000000270cb6500  UN   0.1   18624  11712  sshd
         33473  33283   0  c000000205211480  UN   0.1   48512  12672  sendmail
         33531   4241  37  c00000023c902780  UN   0.1   18624  11648  sshd
      
      EEH handler hung while bnx2x sleeping and holding RTNL lock
      ===========================================================
      crash> bt 213
      PID: 213    TASK: c000000004c89e00  CPU: 11  COMMAND: "eehd"
        #0 [c000000004d477e0] __schedule at c000000000c70808
        #1 [c000000004d478b0] schedule at c000000000c70ee0
        #2 [c000000004d478e0] schedule_timeout at c000000000c76dec
        #3 [c000000004d479c0] msleep at c0000000002120cc
        #4 [c000000004d479f0] napi_disable at c000000000a06448
                                              ^^^^^^^^^^^^^^^^
        #5 [c000000004d47a30] bnx2x_netif_stop at c0080000018dba94 [bnx2x]
        #6 [c000000004d47a60] bnx2x_io_slot_reset at c0080000018a551c [bnx2x]
        #7 [c000000004d47b20] eeh_report_reset at c00000000004c9bc
        #8 [c000000004d47b90] eeh_pe_report at c00000000004d1a8
        #9 [c000000004d47c40] eeh_handle_normal_event at c00000000004da64
      
      And the sleeping source code
      ============================
      crash> dis -ls c000000000a06448
      FILE: ../net/core/dev.c
      LINE: 6702
      
         6697  {
         6698          might_sleep();
         6699          set_bit(NAPI_STATE_DISABLE, &n->state);
         6700
         6701          while (test_and_set_bit(NAPI_STATE_SCHED, &n->state))
      * 6702                  msleep(1);
         6703          while (test_and_set_bit(NAPI_STATE_NPSVC, &n->state))
         6704                  msleep(1);
         6705
         6706          hrtimer_cancel(&n->timer);
         6707
         6708          clear_bit(NAPI_STATE_DISABLE, &n->state);
         6709  }
      
      EEH calls into bnx2x twice based on the system log above, first through
      bnx2x_io_error_detected() and then bnx2x_io_slot_reset(), and executes
      the following call chains:
      
      bnx2x_io_error_detected()
        +-> bnx2x_eeh_nic_unload()
             +-> bnx2x_del_all_napi()
                  +-> __netif_napi_del()
      
      bnx2x_io_slot_reset()
        +-> bnx2x_netif_stop()
             +-> bnx2x_napi_disable()
                  +->napi_disable()
      
      Fix this by correcting the sequence of NAPI APIs usage,
      that is delete the NAPI after disabling it.
      
      Fixes: 7fa6f340 ("bnx2x: AER revised")
      Reported-by: NDavid Christensen <drc@linux.vnet.ibm.com>
      Tested-by: NDavid Christensen <drc@linux.vnet.ibm.com>
      Signed-off-by: NManish Chopra <manishc@marvell.com>
      Signed-off-by: NAriel Elior <aelior@marvell.com>
      Link: https://lore.kernel.org/r/20220426153913.6966-1-manishc@marvell.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      af68656d
    • A
      net: dsa: ksz9477: move get_stats64 to ksz_common.c · c6101dd7
      Arun Ramadoss 提交于
      The mib counters for the ksz9477 is same for the ksz9477 switch and
      LAN937x switch. Hence moving it to ksz_common.c file in order to have it
      generic function. The DSA hook get_stats64 now can call ksz_get_stats64.
      Signed-off-by: NArun Ramadoss <arun.ramadoss@microchip.com>
      Reviewed-by: NOleksij Rempel <o.rempel@pengutronix.de>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: NVladimir Oltean <olteanv@gmail.com>
      Link: https://lore.kernel.org/r/20220426091048.9311-1-arun.ramadoss@microchip.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      c6101dd7
    • A
      intel_idle: Fix SPR C6 optimization · 7eac3bd3
      Artem Bityutskiy 提交于
      The Sapphire Rapids (SPR) C6 optimization was added to the end of the
      'spr_idle_state_table_update()' function. However, the function has a
      'return' which may happen before the optimization has a chance to run.
      And this may prevent the optimization from happening.
      
      This is an unlikely scenario, but possible if user boots with, say,
      the 'intel_idle.preferred_cstates=6' kernel boot option.
      
      This patch fixes the issue by eliminating the problematic 'return'
      statement.
      
      Fixes: 3a9cf77b ("intel_idle: add core C6 optimization for SPR")
      Suggested-by: NJan Beulich <jbeulich@suse.com>
      Reported-by: NJan Beulich <jbeulich@suse.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      [ rjw: Minor changelog edits ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7eac3bd3
    • A
      intel_idle: Fix the 'preferred_cstates' module parameter · 39c184a6
      Artem Bityutskiy 提交于
      Problem description.
      
      When user boots kernel up with the 'intel_idle.preferred_cstates=4' option,
      we enable C1E and disable C1 states on Sapphire Rapids Xeon (SPR). In order
      for C1E to work on SPR, we have to enable the C1E promotion bit on all
      CPUs.  However, we enable it only on one CPU.
      
      Fix description.
      
      The 'intel_idle' driver already has the infrastructure for disabling C1E
      promotion on every CPU. This patch uses the same infrastructure for
      enabling C1E promotion on every CPU. It changes the boolean
      'disable_promotion_to_c1e' variable to a tri-state 'c1e_promotion'
      variable.
      
      Tested on a 2-socket SPR system. I verified the following combinations:
      
       * C1E promotion enabled and disabled in BIOS.
       * Booted with and without the 'intel_idle.preferred_cstates=4' kernel
         argument.
      
      In all 4 cases C1E promotion was correctly set on all CPUs.
      
      Also tested on an old Broadwell system, just to make sure it does not cause
      a regression. C1E promotion was correctly disabled on that system, both C1
      and C1E were exposed (as expected).
      
      Fixes: da0e58c0 ("intel_idle: add 'preferred_cstates' module argument")
      Reported-by: NJan Beulich <jbeulich@suse.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      [ rjw: Minor changelog edits ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      39c184a6
    • W
      floppy: disable FDRAWCMD by default · 233087ca
      Willy Tarreau 提交于
      Minh Yuan reported a concurrency use-after-free issue in the floppy code
      between raw_cmd_ioctl and seek_interrupt.
      
      [ It turns out this has been around, and that others have reported the
        KASAN splats over the years, but Minh Yuan had a reproducer for it and
        so gets primary credit for reporting it for this fix   - Linus ]
      
      The problem is, this driver tends to break very easily and nowadays,
      nobody is expected to use FDRAWCMD anyway since it was used to
      manipulate non-standard formats.  The risk of breaking the driver is
      higher than the risk presented by this race, and accessing the device
      requires privileges anyway.
      
      Let's just add a config option to completely disable this ioctl and
      leave it disabled by default.  Distros shouldn't use it, and only those
      running on antique hardware might need to enable it.
      
      Link: https://lore.kernel.org/all/000000000000b71cdd05d703f6bf@google.com/
      Link: https://lore.kernel.org/lkml/CAKcFiNC=MfYVW-Jt9A3=FPJpTwCD2PL_ULNCpsCVE5s8ZeBQgQ@mail.gmail.com
      Link: https://lore.kernel.org/all/CAEAjamu1FRhz6StCe_55XY5s389ZP_xmCF69k987En+1z53=eg@mail.gmail.comReported-by: NMinh Yuan <yuanmingbuaa@gmail.com>
      Reported-by: syzbot+8e8958586909d62b6840@syzkaller.appspotmail.com
      Reported-by: Ncruise k <cruise4k@gmail.com>
      Reported-by: NKyungtae Kim <kt0755@gmail.com>
      Suggested-by: NLinus Torvalds <torvalds@linuxfoundation.org>
      Tested-by: NDenis Efremov <efremov@linux.com>
      Signed-off-by: NWilly Tarreau <w@1wt.eu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      233087ca
  4. 27 4月, 2022 7 次提交