1. 11 7月, 2012 1 次提交
  2. 11 5月, 2012 1 次提交
    • J
      drivers/net: Convert compare_ether_addr to ether_addr_equal · 2e42e474
      Joe Perches 提交于
      Use the new bool function ether_addr_equal to add
      some clarity and reduce the likelihood for misuse
      of compare_ether_addr for sorting.
      
      Done via cocci script:
      
      $ cat compare_ether_addr.cocci
      @@
      expression a,b;
      @@
      -	!compare_ether_addr(a, b)
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	compare_ether_addr(a, b)
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) == 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) != 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) == 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) != 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!!ether_addr_equal(a, b)
      +	ether_addr_equal(a, b)
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e42e474
  3. 10 5月, 2012 6 次提交
  4. 09 5月, 2012 1 次提交
    • B
      sfc: Fix division by zero when using one RX channel and no SR-IOV · 3132d282
      Ben Hutchings 提交于
      If RSS is disabled on the PF (efx->n_rx_channels == 1) we try to set
      up the indirection table so that VFs can use it, setting
      efx->rss_spread = efx_vf_size(efx).  But if SR-IOV was disabled at
      compile time, this evaluates to 0 and we end up dividing by zero when
      initialising the table.
      
      I considered changing the fallback definition of efx_vf_size() to
      return 1, but its value is really meaningless if we are not going to
      enable VFs.  Therefore add a condition of efx_sriov_wanted(efx) in
      efx_probe_interrupts().
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      3132d282
  5. 27 3月, 2012 2 次提交
  6. 07 3月, 2012 10 次提交
  7. 25 2月, 2012 1 次提交
    • B
      sfc: Fix assignment of ip_summed for pre-allocated skbs · ff3bc1e7
      Ben Hutchings 提交于
      When pre-allocating skbs for received packets, we set ip_summed =
      CHECKSUM_UNNCESSARY.  We used to change it back to CHECKSUM_NONE when
      the received packet had an incorrect checksum or unhandled protocol.
      
      Commit bc8acf2c ('drivers/net: avoid
      some skb->ip_summed initializations') mistakenly replaced the latter
      assignment with a DEBUG-only assertion that ip_summed ==
      CHECKSUM_NONE.  This assertion is always false, but it seems no-one
      has exercised this code path in a DEBUG build.
      
      Fix this by moving our assignment of CHECKSUM_UNNECESSARY into
      efx_rx_packet_gro().
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      ff3bc1e7
  8. 24 2月, 2012 1 次提交
  9. 23 2月, 2012 5 次提交
  10. 16 2月, 2012 12 次提交