1. 30 9月, 2020 1 次提交
    • S
      net: ionic: Replace in_interrupt() usage. · 1800eee1
      Sebastian Andrzej Siewior 提交于
      The in_interrupt() usage in this driver tries to figure out which context
      may sleep and which context may not sleep. in_interrupt() is not really
      suitable as it misses both preemption disabled and interrupt disabled
      invocations from task context.
      
      Conditionals like that in driver code are frowned upon in general because
      invocations of functions from invalid contexts might not be detected
      as the conditional papers over it.
      
      ionic_lif_addr() and _ionoc_lif_rx_mode() can be called from:
      
       1) ->ndo_set_rx_mode() which is under netif_addr_lock_bh()) so it must not
          sleep.
      
       2) Init and setup functions which are in fully preemptible task context.
      
      ionic_link_status_check_request() has two call paths:
      
       1) NAPI which obviously cannot sleep
      
       2) Setup which is again fully preemptible task context
      
      Add arguments which convey the execution context to the affected functions
      and let the callers provide the context instead of letting the functions
      deduce it.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1800eee1
  2. 17 9月, 2020 1 次提交
  3. 15 9月, 2020 1 次提交
  4. 03 9月, 2020 1 次提交
  5. 28 8月, 2020 12 次提交
  6. 12 8月, 2020 1 次提交
  7. 04 8月, 2020 2 次提交
  8. 31 7月, 2020 1 次提交
  9. 23 7月, 2020 1 次提交
  10. 22 7月, 2020 3 次提交
  11. 21 7月, 2020 3 次提交
  12. 08 7月, 2020 1 次提交
    • S
      ionic: centralize queue reset code · 086c18f2
      Shannon Nelson 提交于
      The queue reset pattern is used in a couple different places,
      only slightly different from each other, and could cause
      issues if one gets changed and the other didn't.  This puts
      them together so that only one version is needed, yet each
      can have slighty different effects by passing in a pointer
      to a work function to do whatever configuration twiddling is
      needed in the middle of the reset.
      
      This specifically addresses issues seen where under loops
      of changing ring size or queue count parameters we could
      occasionally bump into the netdev watchdog.
      
      v2: added more commit message commentary
      
      Fixes: 4d03e00a ("ionic: Add initial ethtool support")
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Acked-by: NJakub Kicinski <kuba@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      086c18f2
  13. 27 6月, 2020 1 次提交
  14. 21 6月, 2020 1 次提交
  15. 18 6月, 2020 2 次提交
  16. 12 6月, 2020 1 次提交
  17. 10 6月, 2020 1 次提交
    • S
      ionic: wait on queue start until after IFF_UP · 976ee3b2
      Shannon Nelson 提交于
      The netif_running() test looks at __LINK_STATE_START which
      gets set before ndo_open() is called, there is a window of
      time between that and when the queues are actually ready to
      be run.  If ionic_check_link_status() notices that the link is
      up very soon after netif_running() becomes true, it might try
      to run the queues before they are ready, causing all manner of
      potential issues.  Since the netdev->flags IFF_UP isn't set
      until after ndo_open() returns, we can wait for that before
      we allow ionic_check_link_status() to start the queues.
      
      On the way back to close, __LINK_STATE_START is cleared before
      calling ndo_stop(), and IFF_UP is cleared after.  Both of
      these need to be true in order to safely stop the queues
      from ionic_check_link_status().
      
      Fixes: 49d3b493 ("ionic: disable the queues on link down")
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      976ee3b2
  18. 13 5月, 2020 6 次提交