1. 13 4月, 2018 2 次提交
    • 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
    • K
      ibmvnic: Define vnic_login_client_data name field as unsized array · 08ea556e
      Kees Cook 提交于
      The "name" field of struct vnic_login_client_data is a char array of
      undefined length. This should be written as "char name[]" so the compiler
      can make better decisions about the field (for example, not assuming
      it's a single character). This was noticed while trying to tighten the
      CONFIG_FORTIFY_SOURCE checking.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      08ea556e
  2. 09 4月, 2018 5 次提交
    • N
      ibmvnic: Do not reset CRQ for Mobility driver resets · 30f79625
      Nathan Fontenot 提交于
      When resetting the ibmvnic driver after a partition migration occurs
      there is no requirement to do a reset of the main CRQ. The current
      driver code does the required re-enable of the main CRQ, then does
      a reset of the main CRQ later.
      
      What we should be doing for a driver reset after a migration is to
      re-enable the main CRQ, release all the sub-CRQs, and then allocate
      new sub-CRQs after capability negotiation.
      
      This patch updates the handling of mobility resets to do the proper
      work and not reset the main CRQ. To do this the initialization/reset
      of the main CRQ had to be moved out of the ibmvnic_init routine
      and in to the ibmvnic_probe and do_reset routines.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30f79625
    • 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
    • T
      ibmvnic: Fix reset scheduler error handling · af894d23
      Thomas Falcon 提交于
      In some cases, if the driver is waiting for a reset following
      a device parameter change, failure to schedule a reset can result
      in a hang since a completion signal is never sent.
      
      If the device configuration is being altered by a tool such
      as ethtool or ifconfig, it could cause the console to hang
      if the reset request does not get scheduled. Add some additional
      error handling code to exit the wait_for_completion if there is
      one in progress.
      Signed-off-by: NThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      af894d23
    • T
      ibmvnic: Zero used TX descriptor counter on reset · 41f71467
      Thomas Falcon 提交于
      The counter that tracks used TX descriptors pending completion
      needs to be zeroed as part of a device reset. This change fixes
      a bug causing transmit queues to be stopped unnecessarily and in
      some cases a transmit queue stall and timeout reset. If the counter
      is not reset, the remaining descriptors will not be "removed",
      effectively reducing queue capacity. If the queue is over half full,
      it will cause the queue to stall if stopped.
      Signed-off-by: NThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41f71467
    • T
      ibmvnic: Fix DMA mapping mistakes · 37e40fa8
      Thomas Falcon 提交于
      Fix some mistakes caught by the DMA debugger. The first change
      fixes a unnecessary unmap that should have been removed in an
      earlier update. The next hunk fixes another bad unmap by zeroing
      the bit checked to determine that an unmap is needed. The final
      change fixes some buffers that are unmapped with the wrong
      direction specified.
      Signed-off-by: NThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      37e40fa8
  3. 02 4月, 2018 1 次提交
  4. 26 3月, 2018 1 次提交
  5. 18 3月, 2018 6 次提交
  6. 15 3月, 2018 1 次提交
    • J
      ibmvnic: Fix reset return from closed state · e676d81c
      John Allen 提交于
      The case in which we handle a reset from the state where the device is
      closed seems to be bugged for all types of reset. For most types of reset
      we currently exit the reset routine correctly, but don't set the state to
      indicate that we are back in the "closed" state. For some specific cases,
      we don't exit the reset routine at all and resetting will cause a closed
      device to be opened.
      
      This patch fixes the problem by unconditionally checking the reset_state
      and correctly setting the adapter state before returning.
      Signed-off-by: NJohn Allen <jallen@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e676d81c
  7. 13 3月, 2018 5 次提交
  8. 09 3月, 2018 3 次提交
  9. 28 2月, 2018 5 次提交
  10. 23 2月, 2018 3 次提交
  11. 22 2月, 2018 6 次提交
  12. 21 2月, 2018 2 次提交