1. 19 2月, 2021 4 次提交
  2. 17 2月, 2021 5 次提交
  3. 16 2月, 2021 9 次提交
    • A
      net: ipa: initialize all resources · 25c5a7e8
      Alex Elder 提交于
      We configure the minimum and maximum number of various types of IPA
      resources in ipa_resource_config().  It iterates over resource types
      in the configuration data and assigns resource limits to each
      resource group for each type.
      
      Unfortunately, we are repeatedly initializing the resource data for
      the first type, rather than initializing each of the types whose
      limits are specified.
      
      Fix this bug.
      
      Fixes: 4a0d7579 ("net: ipa: avoid going past end of resource group array")
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25c5a7e8
    • S
      ibmvnic: serialize access to work queue on remove · 4a41c421
      Sukadev Bhattiprolu 提交于
      The work queue is used to queue reset requests like CHANGE-PARAM or
      FAILOVER resets for the worker thread. When the adapter is being removed
      the adapter state is set to VNIC_REMOVING and the work queue is flushed
      so no new work is added. However the check for adapter being removed is
      racy in that the adapter can go into REMOVING state just after we check
      and we might end up adding work just as it is being flushed (or after).
      
      The ->rwi_lock is already being used to serialize queue/dequeue work.
      Extend its usage ensure there is no race when scheduling/flushing work.
      
      Fixes: 6954a9e4 ("ibmvnic: Flush existing work items before device removal")
      Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.ibm.com>
      Cc:Uwe Kleine-König <uwe@kleine-koenig.org>
      Cc:Saeed Mahameed <saeed@kernel.org>
      Reviewed-by: NDany Madden <drt@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a41c421
    • L
      ibmvnic: skip send_request_unmap for timeout reset · 7d3a7b9e
      Lijun Pan 提交于
      Timeout reset will trigger the VIOS to unmap it automatically,
      similarly as FAILVOER and MOBILITY events. If we unmap it
      in the linux side, we will see errors like
      "30000003: Error 4 in REQUEST_UNMAP_RSP".
      So, don't call send_request_unmap for timeout reset.
      
      Fixes: ed651a10 ("ibmvnic: Updated reset handling")
      Signed-off-by: NLijun Pan <ljp@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d3a7b9e
    • L
      ibmvnic: add memory barrier to protect long term buffer · 42557dab
      Lijun Pan 提交于
      dma_rmb() barrier is added to load the long term buffer before copying
      it to socket buffer; and dma_wmb() barrier is added to update the
      long term buffer before it being accessed by VIOS (virtual i/o server).
      
      Fixes: 032c5e82 ("Driver for IBM System i/p VNIC protocol")
      Signed-off-by: NLijun Pan <ljp@linux.ibm.com>
      Acked-by: NThomas Falcon <tlfalcon@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      42557dab
    • H
      r8169: fix resuming from suspend on RTL8105e if machine runs on battery · 7ce189fa
      Heiner Kallweit 提交于
      Armin reported that after referenced commit his RTL8105e is dead when
      resuming from suspend and machine runs on battery. This patch has been
      confirmed to fix the issue.
      
      Fixes: e80bd76f ("r8169: work around power-saving bug on some chip versions")
      Reported-by: NArmin Wolf <W_Armin@gmx.de>
      Tested-by: NArmin Wolf <W_Armin@gmx.de>
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7ce189fa
    • T
      net: wan/lmc: dont print format string when not available · a67f0616
      Tong Zhang 提交于
      dev->name is determined only after calling register_hdlc_device(),
      however ,it is used by printk before the name is fully determined.
      
        [    4.565137] hdlc%d: detected at e8000000, irq 11
      
      Instead of printing out a %d, print hdlc directly
      Signed-off-by: NTong Zhang <ztong0001@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a67f0616
    • T
      net: wan/lmc: unregister device when no matching device is found · 62e69bc4
      Tong Zhang 提交于
      lmc set sc->lmc_media pointer when there is a matching device.
      However, when no matching device is found, this pointer is NULL
      and the following dereference will result in a null-ptr-deref.
      
      To fix this issue, unregister the hdlc device and return an error.
      
      [    4.569359] BUG: KASAN: null-ptr-deref in lmc_init_one.cold+0x2b6/0x55d [lmc]
      [    4.569748] Read of size 8 at addr 0000000000000008 by task modprobe/95
      [    4.570102]
      [    4.570187] CPU: 0 PID: 95 Comm: modprobe Not tainted 5.11.0-rc7 #94
      [    4.570527] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-48-gd9c812dda519-preb4
      [    4.571125] Call Trace:
      [    4.571261]  dump_stack+0x7d/0xa3
      [    4.571445]  kasan_report.cold+0x10c/0x10e
      [    4.571667]  ? lmc_init_one.cold+0x2b6/0x55d [lmc]
      [    4.571932]  lmc_init_one.cold+0x2b6/0x55d [lmc]
      [    4.572186]  ? lmc_mii_readreg+0xa0/0xa0 [lmc]
      [    4.572432]  local_pci_probe+0x6f/0xb0
      [    4.572639]  pci_device_probe+0x171/0x240
      [    4.572857]  ? pci_device_remove+0xe0/0xe0
      [    4.573080]  ? kernfs_create_link+0xb6/0x110
      [    4.573315]  ? sysfs_do_create_link_sd.isra.0+0x76/0xe0
      [    4.573598]  really_probe+0x161/0x420
      [    4.573799]  driver_probe_device+0x6d/0xd0
      [    4.574022]  device_driver_attach+0x82/0x90
      [    4.574249]  ? device_driver_attach+0x90/0x90
      [    4.574485]  __driver_attach+0x60/0x100
      [    4.574694]  ? device_driver_attach+0x90/0x90
      [    4.574931]  bus_for_each_dev+0xe1/0x140
      [    4.575146]  ? subsys_dev_iter_exit+0x10/0x10
      [    4.575387]  ? klist_node_init+0x61/0x80
      [    4.575602]  bus_add_driver+0x254/0x2a0
      [    4.575812]  driver_register+0xd3/0x150
      [    4.576021]  ? 0xffffffffc0018000
      [    4.576202]  do_one_initcall+0x84/0x250
      [    4.576411]  ? trace_event_raw_event_initcall_finish+0x150/0x150
      [    4.576733]  ? unpoison_range+0xf/0x30
      [    4.576938]  ? ____kasan_kmalloc.constprop.0+0x84/0xa0
      [    4.577219]  ? unpoison_range+0xf/0x30
      [    4.577423]  ? unpoison_range+0xf/0x30
      [    4.577628]  do_init_module+0xf8/0x350
      [    4.577833]  load_module+0x3fe6/0x4340
      [    4.578038]  ? vm_unmap_ram+0x1d0/0x1d0
      [    4.578247]  ? ____kasan_kmalloc.constprop.0+0x84/0xa0
      [    4.578526]  ? module_frob_arch_sections+0x20/0x20
      [    4.578787]  ? __do_sys_finit_module+0x108/0x170
      [    4.579037]  __do_sys_finit_module+0x108/0x170
      [    4.579278]  ? __ia32_sys_init_module+0x40/0x40
      [    4.579523]  ? file_open_root+0x200/0x200
      [    4.579742]  ? do_sys_open+0x85/0xe0
      [    4.579938]  ? filp_open+0x50/0x50
      [    4.580125]  ? exit_to_user_mode_prepare+0xfc/0x130
      [    4.580390]  do_syscall_64+0x33/0x40
      [    4.580586]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [    4.580859] RIP: 0033:0x7f1a724c3cf7
      [    4.581054] Code: 48 89 57 30 48 8b 04 24 48 89 47 38 e9 1d a0 02 00 48 89 f8 48 89 f7 48 89 d6 48 891
      [    4.582043] RSP: 002b:00007fff44941c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
      [    4.582447] RAX: ffffffffffffffda RBX: 00000000012ada70 RCX: 00007f1a724c3cf7
      [    4.582827] RDX: 0000000000000000 RSI: 00000000012ac9e0 RDI: 0000000000000003
      [    4.583207] RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000001
      [    4.583587] R10: 00007f1a72527300 R11: 0000000000000246 R12: 00000000012ac9e0
      [    4.583968] R13: 0000000000000000 R14: 00000000012acc90 R15: 0000000000000001
      [    4.584349] ==================================================================
      Signed-off-by: NTong Zhang <ztong0001@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      62e69bc4
    • C
      b43: N-PHY: Fix the update of coef for the PHY revision >= 3case · 4773acf3
      Colin Ian King 提交于
      The documentation for the PHY update [1] states:
      
      Loop 4 times with index i
      
          If PHY Revision >= 3
              Copy table[i] to coef[i]
          Otherwise
              Set coef[i] to 0
      
      the copy of the table to coef is currently implemented the wrong way
      around, table is being updated from uninitialized values in coeff.
      Fix this by swapping the assignment around.
      
      [1] https://bcm-v4.sipsolutions.net/802.11/PHY/N/RestoreCal/
      
      Fixes: 2f258b74 ("b43: N-PHY: implement restoring general configuration")
      Addresses-Coverity: ("Uninitialized scalar variable")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Acked-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4773acf3
    • A
      cxgb4/chtls/cxgbit: Keeping the max ofld immediate data size same in cxgb4 and ulds · 2355a677
      Ayush Sawal 提交于
      The Max imm data size in cxgb4 is not similar to the max imm data size
      in the chtls. This caused an mismatch in output of is_ofld_imm() of
      cxgb4 and chtls. So fixed this by keeping the max wreq size of imm data
      same in both chtls and cxgb4 as MAX_IMM_OFLD_TX_DATA_WR_LEN.
      
      As cxgb4's max imm. data value for ofld packets is changed to
      MAX_IMM_OFLD_TX_DATA_WR_LEN. Using the same in cxgbit also.
      
      Fixes: 36bedb3f ("crypto: chtls - Inline TLS record Tx")
      Signed-off-by: NAyush Sawal <ayush.sawal@chelsio.com>
      Acked-by: NJakub Kicinski <kuba@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2355a677
  4. 13 2月, 2021 2 次提交
    • R
      net: axienet: Handle deferred probe on clock properly · 57baf8cc
      Robert Hancock 提交于
      This driver is set up to use a clock mapping in the device tree if it is
      present, but still work without one for backward compatibility. However,
      if getting the clock returns -EPROBE_DEFER, then we need to abort and
      return that error from our driver initialization so that the probe can
      be retried later after the clock is set up.
      
      Move clock initialization to earlier in the process so we do not waste as
      much effort if the clock is not yet available. Switch to use
      devm_clk_get_optional and abort initialization on any error reported.
      Also enable the clock regardless of whether the controller is using an MDIO
      bus, as the clock is required in any case.
      
      Fixes: 09a0354c ("net: axienet: Use clock framework to get device clock rate")
      Signed-off-by: NRobert Hancock <robert.hancock@calian.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      57baf8cc
    • D
      ibmvnic: change IBMVNIC_MAX_IND_DESCS to 16 · a6f2fe5f
      Dany Madden 提交于
      The supported indirect subcrq entries on Power8 is 16. Power9
      supports 128. Redefined this value to 16 to minimize the driver from
      having to reset when migrating between Power9 and Power8. In our rx/tx
      performance testing, we found no performance difference between 16 and
      128 at this time.
      
      Fixes: f019fb63 ("ibmvnic: Introduce indirect subordinate Command Response Queue buffer")
      Signed-off-by: NDany Madden <drt@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a6f2fe5f
  5. 12 2月, 2021 20 次提交