1. 26 1月, 2018 2 次提交
  2. 22 12月, 2017 3 次提交
  3. 19 12月, 2017 5 次提交
  4. 10 11月, 2017 1 次提交
  5. 01 11月, 2017 1 次提交
  6. 25 10月, 2017 1 次提交
    • M
      locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns... · 6aa7de05
      Mark Rutland 提交于
      locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE()
      
      Please do not apply this to mainline directly, instead please re-run the
      coccinelle script shown below and apply its output.
      
      For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
      preference to ACCESS_ONCE(), and new code is expected to use one of the
      former. So far, there's been no reason to change most existing uses of
      ACCESS_ONCE(), as these aren't harmful, and changing them results in
      churn.
      
      However, for some features, the read/write distinction is critical to
      correct operation. To distinguish these cases, separate read/write
      accessors must be used. This patch migrates (most) remaining
      ACCESS_ONCE() instances to {READ,WRITE}_ONCE(), using the following
      coccinelle script:
      
      ----
      // Convert trivial ACCESS_ONCE() uses to equivalent READ_ONCE() and
      // WRITE_ONCE()
      
      // $ make coccicheck COCCI=/home/mark/once.cocci SPFLAGS="--include-headers" MODE=patch
      
      virtual patch
      
      @ depends on patch @
      expression E1, E2;
      @@
      
      - ACCESS_ONCE(E1) = E2
      + WRITE_ONCE(E1, E2)
      
      @ depends on patch @
      expression E;
      @@
      
      - ACCESS_ONCE(E)
      + READ_ONCE(E)
      ----
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: davem@davemloft.net
      Cc: linux-arch@vger.kernel.org
      Cc: mpe@ellerman.id.au
      Cc: shuah@kernel.org
      Cc: snitzer@redhat.com
      Cc: thor.thayer@linux.intel.com
      Cc: tj@kernel.org
      Cc: viro@zeniv.linux.org.uk
      Cc: will.deacon@arm.com
      Link: http://lkml.kernel.org/r/1508792849-3115-19-git-send-email-paulmck@linux.vnet.ibm.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      6aa7de05
  7. 13 7月, 2017 1 次提交
    • B
      sfc: don't read beyond unicast address list · c70d6815
      Bert Kenward 提交于
      If we have more than 32 unicast MAC addresses assigned to an interface
      we will read beyond the end of the address table in the driver when
      adding filters. The next 256 entries store multicast addresses, so we
      will end up attempting to insert duplicate filters, which is mostly
      harmless. If we add more than 288 unicast addresses we will then read
      past the multicast address table, which is likely to be more exciting.
      
      Fixes: 12fb0da4 ("sfc: clean fallbacks between promisc/normal in efx_ef10_filter_sync_rx_mode")
      Signed-off-by: NBert Kenward <bkenward@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c70d6815
  8. 30 6月, 2017 1 次提交
  9. 23 6月, 2017 1 次提交
  10. 22 5月, 2017 1 次提交
  11. 06 4月, 2017 1 次提交
    • E
      sfc: don't insert mc_list on low-latency firmware if it's too long · 148cbab6
      Edward Cree 提交于
      If the mc_list is longer than 256 addresses, we enter mc_promisc mode.
      If we're in mc_promisc mode and the firmware doesn't support cascaded
       multicast, normally we also insert our mc_list, to prevent stealing by
       another VI.  However, if the mc_list was too long, this isn't really
       helpful - the MC groups that didn't fit in the list can still get
       stolen, and having only some of them stealable will probably cause
       more confusing behaviour than having them all stealable.  Since
       inserting 256 multicast filters takes a long time and can lead to MCDI
       state machine timeouts, just skip the mc_list insert in this overflow
       condition.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      148cbab6
  12. 04 3月, 2017 2 次提交
  13. 18 2月, 2017 3 次提交
    • P
      sfc: do not device_attach if a reset is pending · 9c568fd8
      Peter Dunning 提交于
      efx_start_all can return without initialising queues as a reset is pending.
       This means that when netif_device_attach is called, the kernel can start
       sending traffic without having an initialised TX queue to send to.
      This patch avoids this by not calling netif_device_attach if there is a
       pending reset.
      
      Fixes: e283546c ("sfc:On MCDI timeout, issue an FLR (and mark MCDI to fail-fast)")
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9c568fd8
    • B
      sfc: forget filters from sw table if hw replies ENOENT on removing them · 105eac6c
      Bert Kenward 提交于
      If the hw doesn't think they exist, we should defer to its authority.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      105eac6c
    • J
      sfc: fix filter_id misinterpretation in edge case · 0ccb998b
      Jon Cooper 提交于
      On EF10, hardware filter IDs are 13 bits, but in some places we store
       32-bit "full filter IDs" in which higher order bits encode the filter
       match-priority.  This could cause a filter to have a full filter ID of
       0xffff, which is also the value EFX_EF10_FILTER_ID_INVALID which we use
       in 16-bit "short" filter IDs (without match-priority bits).  This would
       occur if the hardware filter ID was 0x1fff and the match-priority was 7.
      Unfortunately, some code that checks for EFX_EF10_FILTER_ID_INVALID can
       be called on full filter IDs, and will WARN_ON if this ever happens.
      So, since we have plenty of spare bits in the full filter ID, this patch
       shifts the priority bits left one bit when constructing the full filter
       IDs, ensuring that the 0x2000 bit of a full filter ID will always be 0
       and thus no full filter ID can ever equal EFX_EF10_FILTER_ID_INVALID.
      
      This patch also replaces open-coded full<->short filter ID conversions
       with calls to functions, thus keeping the definition of the full filter
       ID format in one place.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ccb998b
  14. 15 2月, 2017 1 次提交
  15. 12 2月, 2017 1 次提交
  16. 10 2月, 2017 3 次提交
  17. 08 2月, 2017 1 次提交
  18. 01 2月, 2017 1 次提交
  19. 28 1月, 2017 3 次提交
  20. 26 1月, 2017 1 次提交
  21. 18 1月, 2017 2 次提交
  22. 17 1月, 2017 2 次提交
    • E
      sfc: get PIO buffer size from the NIC · c634700f
      Edward Cree 提交于
      The 8000 series SFC NICs have 4K PIO buffers, rather than the 2K of
       the 7000 series.  Rather than having a hard-coded PIO buffer size
       (ER_DZ_TX_PIOBUF_SIZE), read it from the GET_CAPABILITIES_V2 MCDI
       response.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c634700f
    • E
      sfc: allow PIO more often · de1deff9
      Edward Cree 提交于
      If an option descriptor has been sent on a queue but not followed by a
       packet, there will have been no completion event, so the read and write
       counts won't match and we'll think we can't do PIO.  This combines with
       the fact that we have two TX queues (for en/disable checksum offload),
       and that both must be empty for PIO to happen.
      This patch adds a separate "packet_write_count" that tracks the most
       recent write_count we expect to see a completion event for; this excludes
       option descriptors but _includes_ PIO descriptors (even though they look
       like option descriptors).  This is then used, rather than write_count,
       in efx_nic_tx_is_empty().
      We only bother to maintain packet_write_count on EF10, since on Siena
       (a) there are no option descriptors and it always equals write_count, and
       (b) there's no PIO, so we don't need it anyway.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de1deff9
  23. 11 1月, 2017 2 次提交