1. 10 May, 2012 24 commits
    • Jacob Keller's avatar
      ixgbe: support software timestamping · aa7bd467
      Jacob Keller authored
      Kernel software timestamping requires that the driver calls skb_tx_timestamp
      just before passing the skb to the MAC, in order to provide the best software
      timestamps. This patch adds this call for that support.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      aa7bd467
    • Jacob Keller's avatar
      ixgbe: add support for get_ts_info · e3aac889
      Jacob Keller authored
      This patch adds support for the ethtool get_ts_info operation, which enables
      access of available timestamp/timesync support for that device. It can query
      which ptp clock device is associated with the particular port.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarStephen Ko <stephen.s.ko@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e3aac889
    • Jacob Keller's avatar
      ixgbe: correct disable_rx_buff timeout · db76ad47
      Jacob Keller authored
      The current value of the udelay timeout for ixgbe_disable_rx_buff is too
      short. This causes the security path to not not be properly disabled during
      the section that is meant to have it turned off. The end result causes a race
      condition that results in RX issues.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      db76ad47
    • Jacob E Keller's avatar
      ixgbe: Enable timesync clock-out feature for PPS support on X540 · 681ae1ad
      Jacob E Keller authored
      This patch enables the PPS system in the PHC framework, by enabling
      the clock-out feature on the X540 device. Causes the SDP0 to be set as
      a 1Hz clock. Also configures the timesync interrupt cause in order to
      report each pulse to the PPS via the PHC framework, which can be used
      for general system clock synchronization. (This allows a stable method
      for tuning the general system time via the on-board SYSTIM register
      based clock.)
      Signed-off-by: default avatarJacob E Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarStephen Ko <stephen.s.ko@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      681ae1ad
    • Jacob Keller's avatar
      ixgbe: Hardware Timestamping + PTP Hardware Clock (PHC) · 3a6a4eda
      Jacob Keller authored
      This patch enables hardware timestamping for use with PTP software by
      extracting a ns counter from an arbitrary fixed point cycles counter.
      The hardware generates SYSTIME registers using the DMA tick which
      changes based on the current link speed. These SYSTIME registers are
      converted to ns using the cyclecounter and timecounter structures
      provided by the kernel. Using the SO_TIMESTAMPING api, software can
      enable and access timestamps for PTP packets.
      
      The SO_TIMESTAMPING API has space for 3 different kinds of timestamps,
      SYS, RAW, and SOF. SYS hardware timestamps are hardware ns values that
      are then scaled to the software clock. RAW hardware timestamps are the
      direct raw value of the ns counter. SOF software timestamps are the
      software timestamp calculated as close as possible to the software
      transmit, but are not offloaded to the hardware. This patch only
      supports the RAW hardware timestamps due to inefficiency of the SYS
      design.
      
      This patch also enables the PHC subsystem features for atomically
      adjusting the cycle register, and adjusting the clock frequency in
      parts per billion. This frequency adjustment works by slightly
      adjusting the value added to the cycle registers each DMA tick. This
      causes the hardware registers to overflow rapidly (approximately once
      every 34 seconds, when at 10gig link). To solve this, the timecounter
      structure is used, along with a timer set for every 25 seconds. This
      allows for detecting register overflow and converting the cycle
      counter registers into ns values needed for providing useful
      timestamps to the network stack.
      
      Only the basic required clock functions are supported at this time,
      although the hardware supports some ancillary features and these could
      easily be enabled in the future.
      
      Note that use of this hardware timestamping requires modifying daemon
      software to use the SO_TIMESTAMPING API for timestamps, and the
      ptp_clock PHC framework for accessing the clock. The timestamps have
      no relation to the system time at all, so software must use the posix
      clock generated by the PHC framework instead.
      Signed-off-by: default avatarJacob E Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarStephen Ko <stephen.s.ko@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3a6a4eda
    • Greg Rose's avatar
      ixgbe: Fix bogus error message · 44b82dde
      Greg Rose authored
      If the VF sends a MACVLAN request with index of zero then it is not
      actually trying to add a filter.  Check the index value and only
      indicate that operation is not allowed when the VF is actually trying
      to add a filter.
      Signed-off-by: default avatarGreg Rose <gregory.v.rose@intel.com>
      Tested-by: default avatarSibai Li <sibai.li@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      44b82dde
    • Alexander Duyck's avatar
      ixgbe: Set Drop_EN bit when multiple Rx queues are present w/o flow control · 3ebe8fde
      Alexander Duyck authored
      The drop enable bit can be used to improve the performance of the adapter
      in the case of multiple queues being present.  This performance gain is due
      to the fact that some slower CPUs can cause the FIFO to backfill preventing
      faster CPUs from receiving additional work.  By setting the drop enable bit
      we prevent this and instead just drop the packets that would have been
      bound for the slower CPU.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
      Tested-by: default avatarRoss Brattain <ross.b.brattain@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3ebe8fde
    • Alexander Duyck's avatar
      ixgbe: Clean up priority based flow control · 943561d3
      Alexander Duyck authored
      This change cleans up the logic in the priority based flow control
      configuration routines.  Both the 82599 and 82598 based routines perform
      similar functions however they are both arranged completely differently.
      This patch goes over both of them to clean up the code.
      
      In addition I am dropping the ixgbe_fc_pfc flow control mode and instead
      just replacing it with checks for if priority flow control is enabled.
      This allows us to maintain some of the link flow control information which
      allows for an easier transition between link and priority flow control.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
      Tested-by: default avatarRoss Brattain <ross.b.brattain@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      943561d3
    • Alexander Duyck's avatar
      ixgbe: Exit on error case in VF message processing · dcaccc82
      Alexander Duyck authored
      Previously we would get a mailbox error and still process the message.
      Instead we should exit on error.
      
      In addition we should also be flushing the ACK of the message so that we
      can guarantee that the other end is aware we have received the message
      while we are processing it.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
      Tested-by: default avatarSibai Li <sibai.li@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      dcaccc82
    • Koki Sanagi's avatar
      igb: output register's information related to RX/TX queue[4-15] · 7e3b4ffb
      Koki Sanagi authored
      Current igb outputs registers related to TX/RX queues(ex. RDT, RDH, TDT, TDH).
      But it thinks the number of RX/TX queues is 4. But 82576 has 16 RX/TX queues.
      This patch modifies igb to output the rest of the registers if the device is
      82576.
      Signed-off-by: default avatarKoki Sanagi <sanagi.koki@jp.fujitsu.com>
      Acked-by: default avatarCarolyn Wyborny <carolyn.wyborny@intel.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      7e3b4ffb
    • Jeff Kirsher's avatar
    • Joe Perches's avatar
      dsa: Convert compare_ether_addr to ether_addr_equal · 8feedbb4
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8feedbb4
    • Joe Perches's avatar
      wireless: Convert compare_ether_addr to ether_addr_equal by hand · 4c764729
      Joe Perches authored
      spatch/coccinelle isn't perfect.  It doesn't understand
      __aligned(x) and doesn't convert functions it can't parse.
      
      Convert the remaining compare_ether_addr uses.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c764729
    • Joe Perches's avatar
      wireless: Convert compare_ether_addr to ether_addr_equal · ac422d3c
      Joe Perches authored
      Use the new bool function ether_addr_equal to add
      some clarity and reduce the likelihood for misuse
      of compare_ether_addr for sorting.
      
      I removed a conversion from scan.c/cmp_bss_core
      that appears to be a sorting function.
      
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ac422d3c
    • Joe Perches's avatar
      netfilter: Convert compare_ether_addr to ether_addr_equal · 8561cf99
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8561cf99
    • Joe Perches's avatar
      mac80211: Convert compare_ether_addr to ether_addr_equal by hand · 3bc7945e
      Joe Perches authored
      spatch/coccinelle isn't perfect.  It doesn't understand
      __aligned(x) and doesn't convert functions it can't parse.
      
      Convert the remaining compare_ether_addr uses.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3bc7945e
    • Joe Perches's avatar
      mac80211: Convert compare_ether_addr to ether_addr_equal · b203ca39
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b203ca39
    • Joe Perches's avatar
      bluetooth: Convert compare_ether_addr to ether_addr_equal · c47fc981
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c47fc981
    • Joe Perches's avatar
      atm: Convert compare_ether_addr to ether_addr_equal · 150238eb
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      150238eb
    • Joe Perches's avatar
      bridge: Convert compare_ether_addr to ether_addr_equal · 9a7b6ef9
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9a7b6ef9
    • Joe Perches's avatar
      bridge: netfilter: Convert compare_ether_addr to ether_addr_equal · 171fe5ef
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Acked-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      171fe5ef
    • Joe Perches's avatar
      8021q: Convert compare_ether_addr to ether_addr_equal · 53a2b3a1
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      53a2b3a1
    • Joe Perches's avatar
      802: Convert compare_ether_addr to ether_addr_equal · 28b29801
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      28b29801
    • Joe Perches's avatar
      etherdevice.h: Add ether_addr_equal · a599b0f5
      Joe Perches authored
      Add a boolean function to check if 2 ethernet addresses
      are the same.
      
      This is to avoid any confusion about compare_ether_addr
      returning an unsigned, and not being able to use the
      compare_ether_addr function for sorting ala memcmp.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a599b0f5
  2. 09 May, 2012 8 commits
  3. 08 May, 2012 8 commits