1. 25 1月, 2022 8 次提交
    • S
      ionic: stretch heartbeat detection · ec8ee714
      Shannon Nelson 提交于
      The driver can be premature in detecting stalled firmware
      when the heartbeat is not updated because the firmware can
      occasionally take a long time (more than 2 seconds) to service
      a request, and doesn't update the heartbeat during that time.
      
      The firmware heartbeat is not necessarily a steady 1 second
      periodic beat, but better described as something that should
      progress at least once in every DECVMD_TIMEOUT period.
      The single-threaded design in the FW means that if a devcmd
      or adminq request launches a large internal job, it is stuck
      waiting for that job to finish before it can get back to
      updating the heartbeat.  Since all requests are "guaranteed"
      to finish within the DEVCMD_TIMEOUT period, the driver needs
      to less aggressive in checking the heartbeat progress.
      
      We change our current 2 second window to something bigger than
      DEVCMD_TIMEOUT which should take care of most of the issue.
      We stop checking for the heartbeat while waiting for a request,
      as long as we're still watching for the FW status.  Lastly,
      we make sure our FW status is up to date before running a
      devcmd request.
      
      Once we do this, we need to not check the heartbeat on DEV
      commands because it may be stalled while we're on the fw_down
      path.  Instead, we can rely on the is_fw_running check.
      
      Fixes: b2b9a8d7 ("ionic: avoid races in ionic_heartbeat_check")
      Signed-off-by: NBrett Creeley <brett@pensando.io>
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ec8ee714
    • B
      ionic: Query FW when getting VF info via ndo_get_vf_config · f16f5be3
      Brett Creeley 提交于
      Currently when an administrator configures a VF via ndo_set_vf*,
      the driver will send the set command to FW and then update the
      cached value.  The cached value is then used when reporting
      VF info via ndo_get_vf_config.
      
      A problem is that the VF info may have been updated between
      the last ndo_set_vf* and ndo_get_vf_info commands via some
      other method, i.e. a VF changes its MAC address (assuming it's
      allowed to do so) and since this is all managed by the FW,
      this new value won't be reflected in the PF's cache of values.
      
      To fix this, update the driver to always get the latest VF
      information by making use of the IONIC_CMD_VF_GETATTR dev
      command. The FW may not support getting all the attributes for
      IONIC_CMD_VF_GETATTR, so the driver will only update the cached
      VF config members if their associated IONIC_CMD_VF_GETATTR
      was successful. Otherwise the cached VF config members will
      remain the same as what was set in ndo_set_vf*.
      
      Fixes: fbb39807 ("ionic: support sr-iov operations")
      Signed-off-by: NBrett Creeley <brett@pensando.io>
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f16f5be3
    • B
      ionic: Allow flexibility for error reporting on dev commands · b640b552
      Brett Creeley 提交于
      When dev commands fail, an error message will always be printed,
      which may be overly alarming the to system administrators,
      especially if the driver shouldn't be printing the error due
      to some unsupported capability.
      
      Similar to recent adminq request changes, we can update the
      dev command interface with the ability to selectively print
      error messages to allow the driver to prevent printing errors
      that are expected.
      Signed-off-by: NBrett Creeley <brett@pensando.io>
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b640b552
    • B
      ionic: Correctly print AQ errors if completions aren't received · bc43ed4f
      Brett Creeley 提交于
      Recent changes went into the driver to allow flexibility when
      printing error messages. Unfortunately this had the unexpected
      consequence of printing confusing messages like the following:
      
      IONIC_CMD_RX_FILTER_ADD (31) failed: IONIC_RC_SUCCESS (-6)
      
      In cases like this the completion of the admin queue command never
      completes, so the completion status is 0, hence IONIC_RC_SUCCESS
      is printed even though the command clearly failed. For example,
      this could happen when the driver tries to add a filter and at
      the same time the FW goes through a reset, so the AQ command
      never completes.
      
      Fix this by forcing the FW completion status to IONIC_RC_ERROR
      in cases where we never get the completion.
      
      Fixes: 8c9d956a ("ionic: allow adminq requests to override default error message")
      Signed-off-by: NBrett Creeley <brett@pensando.io>
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bc43ed4f
    • S
      ionic: fix up printing of timeout error · 4cc787bd
      Shannon Nelson 提交于
      Make sure we print the TIMEOUT string if we had a timeout
      error, rather than printing the wrong status.
      
      Fixes: 8c9d956a ("ionic: allow adminq requests to override default error message")
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4cc787bd
    • S
      ionic: add FW_STOPPING state · 398d1e37
      Shannon Nelson 提交于
      Between fw running and fw actually stopped into reset, we need
      a fw_stopping concept to catch and block some actions while
      we're transitioning to FW_RESET state.  This will help to be
      sure the fw_up task is not scheduled until after the fw_down
      task has completed.
      
      On some rare occasion timing, it is possible for the fw_up task
      to try to run before the fw_down task, then not get run after
      the fw_down task has run, leaving the device in a down state.
      This is possible if the watchdog goes off in between finding the
      down transition and starting the fw_down task, where the later
      watchdog sees the FW is back up and schedules a fw_up task.
      
      Fixes: c672412f ("ionic: remove lifs on fw reset")
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      398d1e37
    • B
      ionic: Don't send reset commands if FW isn't running · b8fd0271
      Brett Creeley 提交于
      It's possible the FW is already shutting down while the driver is being
      removed and/or when the driver is going through reset. This can cause
      unexpected/unnecessary errors to be printed:
      
      eth0: DEV_CMD IONIC_CMD_PORT_RESET (12) error, IONIC_RC_ERROR (29) failed
      eth1: DEV_CMD IONIC_CMD_RESET (3) error, IONIC_RC_ERROR (29) failed
      
      Fix this by checking the FW status register before issuing the reset
      commands.
      
      Also, since err may not be assigned in ionic_port_reset(), assign it a
      default value of 0, and remove an unnecessary log message.
      
      Fixes: fbfb8031 ("ionic: Add hardware init and device commands")
      Signed-off-by: NBrett Creeley <brett@pensando.io>
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b8fd0271
    • S
      ionic: fix type complaint in ionic_dev_cmd_clean() · bc0bf9de
      Shannon Nelson 提交于
      Sparse seems to have gotten a little more picky lately and
      we need to revisit this bit of code to make sparse happy.
      
      warning: incorrect type in initializer (different address spaces)
         expected union ionic_dev_cmd_regs *regs
         got union ionic_dev_cmd_regs [noderef] __iomem *dev_cmd_regs
      warning: incorrect type in argument 2 (different address spaces)
         expected void [noderef] __iomem *
         got unsigned int *
      warning: incorrect type in argument 1 (different address spaces)
         expected void volatile [noderef] __iomem *
         got union ionic_dev_cmd *
      
      Fixes: d701ec32 ("ionic: clean up sparse complaints")
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bc0bf9de
  2. 10 10月, 2021 1 次提交
  3. 02 10月, 2021 2 次提交
  4. 28 8月, 2021 1 次提交
  5. 28 7月, 2021 1 次提交
  6. 03 4月, 2021 2 次提交
  7. 19 3月, 2021 1 次提交
  8. 11 3月, 2021 1 次提交
  9. 02 12月, 2020 1 次提交
  10. 24 10月, 2020 1 次提交
  11. 03 10月, 2020 2 次提交
  12. 30 9月, 2020 1 次提交
  13. 19 9月, 2020 2 次提交
  14. 03 9月, 2020 1 次提交
  15. 28 8月, 2020 1 次提交
  16. 13 5月, 2020 4 次提交
  17. 22 4月, 2020 1 次提交
    • L
      drivers: Remove inclusion of vermagic header · 1c79031f
      Leon Romanovsky 提交于
      Get rid of linux/vermagic.h includes, so that MODULE_ARCH_VERMAGIC from
      the arch header arch/x86/include/asm/module.h won't be redefined.
      
        In file included from ./include/linux/module.h:30,
                         from drivers/net/ethernet/3com/3c515.c:56:
        ./arch/x86/include/asm/module.h:73: warning: "MODULE_ARCH_VERMAGIC"
      redefined
           73 | # define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY
              |
        In file included from drivers/net/ethernet/3com/3c515.c:25:
        ./include/linux/vermagic.h:28: note: this is the location of the
      previous definition
           28 | #define MODULE_ARCH_VERMAGIC ""
              |
      
      Fixes: 6bba2e89 ("net/3com: Delete driver and module versions from 3com drivers")
      Co-developed-by: NBorislav Petkov <bp@suse.de>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Acked-by: Shannon Nelson <snelson@pensando.io> # ionic
      Acked-by: Sebastian Reichel <sre@kernel.org> # power
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1c79031f
  18. 31 3月, 2020 1 次提交
    • S
      ionic: remove lifs on fw reset · c672412f
      Shannon Nelson 提交于
      When the FW RESET event comes to the driver from the firmware,
      or the fw_status goes to 0 (stopped) or to 0xff (no PCI
      connection), then shut down the driver activity.  This event
      signals a FW upgrade where we need to quiesce all operations and
      wait for the FW to restart.  The FW will continue the update
      process once it sees all the LIFs are reset.  When the update
      process is done it will set the fw_status back to RUNNING.
      Meanwhile, the heartbeat check continues and when the fw_status
      is seen as set to running we can restart the driver operations.
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c672412f
  19. 22 3月, 2020 2 次提交
  20. 18 3月, 2020 1 次提交
  21. 10 3月, 2020 1 次提交
  22. 08 1月, 2020 1 次提交
  23. 06 1月, 2020 1 次提交
  24. 26 10月, 2019 1 次提交
  25. 23 10月, 2019 1 次提交