1. 20 8月, 2020 1 次提交
  2. 11 3月, 2020 1 次提交
  3. 27 11月, 2019 1 次提交
  4. 25 9月, 2019 2 次提交
    • J
      net/ibmvnic: prevent more than one thread from running in reset · 7ed5b31f
      Juliet Kim 提交于
      The current code allows more than one thread to run in reset. This can
      corrupt struct adapter data. Check adapter->resetting before performing
      a reset, if there is another reset running delay (100 msec) before trying
      again.
      Signed-off-by: NJuliet Kim <julietk@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7ed5b31f
    • J
      net/ibmvnic: unlock rtnl_lock in reset so linkwatch_event can run · b27507bb
      Juliet Kim 提交于
      Commit a5681e20 ("net/ibmnvic: Fix deadlock problem in reset")
      made the change to hold the RTNL lock during a reset to avoid deadlock
      but linkwatch_event is fired during the reset and needs the RTNL lock.
      That keeps linkwatch_event process from proceeding until the reset
      is complete. The reset process cannot tolerate the linkwatch_event
      processing after reset completes, so release the RTNL lock during the
      process to allow a chance for linkwatch_event to run during reset.
      This does not guarantee that the linkwatch_event will be processed as
      soon as link state changes, but is an improvement over the current code
      where linkwatch_event processing is always delayed, which prevents
      transmissions on the device from being deactivated leading transmit
      watchdog timer to time-out.
      
      Release the RTNL lock before link state change and re-acquire after
      the link state change to allow linkwatch_event to grab the RTNL lock
      and run during the reset.
      
      Fixes: a5681e20 ("net/ibmnvic: Fix deadlock problem in reset")
      Signed-off-by: NJuliet Kim <julietk@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b27507bb
  5. 24 5月, 2019 1 次提交
  6. 11 5月, 2019 1 次提交
  7. 28 4月, 2019 1 次提交
  8. 20 3月, 2019 1 次提交
  9. 11 12月, 2018 1 次提交
    • T
      ibmvnic: Convert reset work item mutex to spin lock · 6c5c7489
      Thomas Falcon 提交于
      ibmvnic_reset can create and schedule a reset work item from
      an IRQ context, so do not use a mutex, which can sleep. Convert
      the reset work item mutex to a spin lock. Locking debugger generated
      the trace output below.
      
      BUG: sleeping function called from invalid context at kernel/locking/mutex.c:908
      in_atomic(): 1, irqs_disabled(): 1, pid: 120, name: kworker/8:1
      4 locks held by kworker/8:1/120:
       #0: 0000000017c05720 ((wq_completion)"events"){+.+.}, at: process_one_work+0x188/0x710
       #1: 00000000ace90706 ((linkwatch_work).work){+.+.}, at: process_one_work+0x188/0x710
       #2: 000000007632871f (rtnl_mutex){+.+.}, at: rtnl_lock+0x30/0x50
       #3: 00000000fc36813a (&(&crq->lock)->rlock){..-.}, at: ibmvnic_tasklet+0x88/0x2010 [ibmvnic]
      irq event stamp: 26293
      hardirqs last  enabled at (26292): [<c000000000122468>] tasklet_action_common.isra.12+0x78/0x1c0
      hardirqs last disabled at (26293): [<c000000000befce8>] _raw_spin_lock_irqsave+0x48/0xf0
      softirqs last  enabled at (26288): [<c000000000a8ac78>] dev_deactivate_queue.constprop.28+0xc8/0x160
      softirqs last disabled at (26289): [<c0000000000306e0>] call_do_softirq+0x14/0x24
      CPU: 8 PID: 120 Comm: kworker/8:1 Kdump: loaded Not tainted 4.20.0-rc6 #6
      Workqueue: events linkwatch_event
      Call Trace:
      [c0000003fffa7a50] [c000000000bc83e4] dump_stack+0xe8/0x164 (unreliable)
      [c0000003fffa7aa0] [c00000000015ba0c] ___might_sleep+0x2dc/0x320
      [c0000003fffa7b20] [c000000000be960c] __mutex_lock+0x8c/0xb40
      [c0000003fffa7c30] [d000000006202ac8] ibmvnic_reset+0x78/0x330 [ibmvnic]
      [c0000003fffa7cc0] [d0000000062097f4] ibmvnic_tasklet+0x1054/0x2010 [ibmvnic]
      [c0000003fffa7e00] [c0000000001224c8] tasklet_action_common.isra.12+0xd8/0x1c0
      [c0000003fffa7e60] [c000000000bf1238] __do_softirq+0x1a8/0x64c
      [c0000003fffa7f90] [c0000000000306e0] call_do_softirq+0x14/0x24
      [c0000003f3f87980] [c00000000001ba50] do_softirq_own_stack+0x60/0xb0
      [c0000003f3f879c0] [c0000000001218a8] do_softirq+0xa8/0x100
      [c0000003f3f879f0] [c000000000121a74] __local_bh_enable_ip+0x174/0x180
      [c0000003f3f87a60] [c000000000bf003c] _raw_spin_unlock_bh+0x5c/0x80
      [c0000003f3f87a90] [c000000000a8ac78] dev_deactivate_queue.constprop.28+0xc8/0x160
      [c0000003f3f87ad0] [c000000000a8c8b0] dev_deactivate_many+0xd0/0x520
      [c0000003f3f87b70] [c000000000a8cd40] dev_deactivate+0x40/0x60
      [c0000003f3f87ba0] [c000000000a5e0c4] linkwatch_do_dev+0x74/0xd0
      [c0000003f3f87bd0] [c000000000a5e694] __linkwatch_run_queue+0x1a4/0x1f0
      [c0000003f3f87c30] [c000000000a5e728] linkwatch_event+0x48/0x60
      [c0000003f3f87c50] [c0000000001444e8] process_one_work+0x238/0x710
      [c0000003f3f87d20] [c000000000144a48] worker_thread+0x88/0x4e0
      [c0000003f3f87db0] [c00000000014e3a8] kthread+0x178/0x1c0
      [c0000003f3f87e20] [c00000000000bfd0] ret_from_kernel_thread+0x5c/0x6c
      Signed-off-by: NThomas Falcon <tlfalcon@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6c5c7489
  10. 20 11月, 2018 1 次提交
  11. 02 10月, 2018 3 次提交
  12. 08 8月, 2018 1 次提交
  13. 25 5月, 2018 2 次提交
    • T
      ibmvnic: Introduce hard reset recovery · 2770a798
      Thomas Falcon 提交于
      Introduce a recovery hard reset to handle reset failure as a result of
      change of device context following a transport event, such as a
      backing device failover or partition migration. These operations reset
      the device context to its initial state. If this occurs during a reset,
      any initialization commands are likely to fail with an invalid state
      error as backing device firmware requests reinitialization.
      
      When this happens, make one more attempt by performing a hard reset,
      which frees any resources currently allocated and performs device
      initialization. If a transport event occurs during a device reset, a
      flag is set which will trigger a new hard reset following the
      completionof the current reset event.
      Signed-off-by: NThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2770a798
    • T
      ibmvnic: Introduce active CRQ state · 5153698e
      Thomas Falcon 提交于
      Introduce an "active" state for a IBM vNIC Command-Response Queue. A CRQ
      is considered active once it has initialized or linked with its partner by
      sending an initialization request and getting a successful response back
      from the management partition.  Until this has happened, do not allow CRQ
      commands to be sent other than the initialization request.
      
      This change will avoid a protocol error in case of a device transport
      event occurring during a initialization. When the driver receives a
      transport event notification indicating that the backing hardware
      has changed and needs reinitialization, any further commands other
      than the initialization handshake with the VIOS management partition
      will result in an invalid state error. Instead of sending a command
      that will be returned with an error, print a warning and return an
      error that will be handled by the caller.
      Signed-off-by: NThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5153698e
  14. 13 4月, 2018 1 次提交
    • N
      ibmvnic: Handle all login error conditions · 64d92aa2
      Nathan Fontenot 提交于
      There is a bug in handling the possible return codes from sending the
      login CRQ. The current code treats any non-success return value,
      minus failure to send the crq and a timeout waiting for a login response,
      as a need to re-send the login CRQ. This can put the drive in an
      infinite loop of trying to login when getting return values other
      that a partial success such as a return code of aborted. For these
      scenarios the login will not ever succeed at this point and the
      driver would need to be reset again.
      
      To resolve this loop trying to login is updated to only retry the
      login if the driver gets a return code of a partial success. Other
      return codes are treated as an error and the driver returns an error
      from ibmvnic_login().
      
      To avoid infinite looping in the partial success return cases, the
      number of retries is capped at the maximum number of supported
      queues. This value was chosen because the driver does a renegotiation
      of capabilities which sets the number of queues possible and allows
      the driver to attempt a login for possible value for the number
      of queues supported.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64d92aa2
  15. 09 4月, 2018 1 次提交
    • T
      ibmvnic: Fix failover case for non-redundant configuration · 5a18e1e0
      Thomas Falcon 提交于
      There is a failover case for a non-redundant pseries VNIC
      configuration that was not being handled properly. The current
      implementation assumes that the driver will always have a redandant
      device to communicate with following a failover notification. There
      are cases, however, when a non-redundant configuration can receive
      a failover request. If that happens, the driver should wait until
      it receives a signal that the device is ready for operation.
      
      The driver is agnostic of its backing hardware configuration,
      so this fix necessarily affects all device failover management.
      The driver needs to wait until it receives a signal that the device
      is ready for resetting. A flag is introduced to track this intermediary
      state where the driver is waiting for an active device.
      Signed-off-by: NThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5a18e1e0
  16. 18 3月, 2018 3 次提交
  17. 23 2月, 2018 1 次提交
  18. 22 2月, 2018 1 次提交
  19. 21 2月, 2018 1 次提交
  20. 23 1月, 2018 1 次提交
  21. 20 12月, 2017 2 次提交
  22. 14 11月, 2017 1 次提交
  23. 11 11月, 2017 1 次提交
  24. 27 10月, 2017 2 次提交
  25. 19 10月, 2017 1 次提交
  26. 04 8月, 2017 1 次提交
  27. 22 6月, 2017 2 次提交
  28. 27 5月, 2017 3 次提交
  29. 03 5月, 2017 1 次提交
    • N
      ibmvnic: Updated reset handling · ed651a10
      Nathan Fontenot 提交于
      The ibmvnic driver has multiple handlers for resetting the driver
      depending on the reason the reset is needed (failover, lpm,
      fatal erors,...). All of the reset handlers do essentially the same
      thing, this patch moves this work to a common reset handler.
      
      By doing this we also allow the driver to better handle situations
      where we can get a reset while handling a reset.
      
      The updated reset handling works by adding a reset work item to the
      list of resets and then scheduling work to perform the reset. This
      step is necessary because we can receive a reset in interrupt context
      and we want to handle the reset out of interrupt context.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ed651a10